Make a window inactive when another window is being displayed

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello. I'm using Visual Basic .NET.

How can I make a window inactive when another windows is being displayed?

For instance, if the user clicks a menu item, a button or whatever, a new
window is displayed and the user cannot do anything with the original window
until he or she closes the newly displayed window.

Take Visual Studio as an example, if you open the Option window from Tools >
Options, then you can't work in the main Visual Studio environment until you
close Option.

Thanks.
 
Jeff,

Show your second form as dialogform

\\\
dim frm as new form2
frm.text = "name of form"
frm.showdialog
dim myval as string = frm.textbox1
frm.dispose
///

I hope this helps?

Cor
 
Xero said:
How can I make a window inactive when another windows is being displayed?

Show your form modally:

\\\
Dim f As New OptionsForm()
f.ShowDialog() ' Returns when the form is closed.
f.Dispose()
///
 
I see.
Thanks very much!

Xero
Cor Ligthert said:
Jeff,

Show your second form as dialogform

\\\
dim frm as new form2
frm.text = "name of form"
frm.showdialog
dim myval as string = frm.textbox1
frm.dispose
///

I hope this helps?

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top