Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8671045
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T18:51:08+00:00 2026-06-12T18:51:08+00:00

I have a 1080p touchscreen application. When a modal pops up, i want to

  • 0

I have a 1080p touchscreen application. When a modal pops up, i want to emphasize that by darkening the main form.

Right now i use a second form, the size of the main form, that is black and has 50% opacity. Whenever a modal needs to appear, i open the opaque form, and then open the desired modal.

I feel this is a bit devious for my purpose. Its also not asshole-proof that when the user alt tabs, the forms will glitch out of sequence.

Is there a better way to achieve the darkening effect. Perhaps by darkening the main form from within itself?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T18:51:10+00:00Added an answer on June 12, 2026 at 6:51 pm

    Here is some code, very similar to the method in Thomas’s answer. Note to use the Darkness property in a Try...Finally block, to make sure you never leave the form in the dark state.

    Public Class Form1
    
    
    Private _PB As PictureBox
    
    Public WriteOnly Property Darkness
        Set(value)
            If value Then
                Dim Bmp = New Bitmap(Bounds.Size.Width, Bounds.Size.Height)
                Me.DrawToBitmap(Bmp, New Rectangle(Point.Empty, Bounds.Size))
                Using g = Graphics.FromImage(Bmp)
                    Dim Brush As New SolidBrush(Color.FromArgb(125, Color.Black))
                    g.FillRectangle(Brush, New Rectangle(Point.Empty, Bmp.Size))
                End Using
                _PB = New PictureBox
                Me.Controls.Add(_PB)
                _PB.Size = Bounds.Size
                _PB.Location = Bounds.Location - PointToScreen(Point.Empty)
                _PB.Image = Bmp
                _PB.BringToFront()
            Else
                If _PB IsNot Nothing Then
                    Me.Controls.Remove(_PB)
                    _PB.Dispose()
                End If
            End If
        End Set
    End Property
    
    Private Sub btnDialog_Click(sender As Object, e As EventArgs) Handles btnDialog.Click
        Try
            Darkness = True
    
            MsgBox("Modal dialog")
    
        Finally
            Darkness = False
        End Try
    End Sub
    End Class
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

My application processes URLs entered manually by users. I have discovered that some of
everyone! I have a 2D vector filled with unsigned chars. Now I want to
I have a client/server application that remotely connects to a server via Java's SSLSocket.
I have a webcam that is capable of 1080p 30fps which I have confirmed
We have an application that reads a GigE YUV video stream and displays it
I have a small web application developed using Icefaces 1.8.2 and jsf 1.1 which
I have a web layout originally designed for use with televisions (running from a
I have 2 AIR applications ( A and B ) that are able to
I am learning Java and want to create my own IRC client. I have
If I have an IMG that is 482 pixels in height, but I just

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.