473,405 Members | 2,160 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Modal form

Rob
In Access there was a modal property of a form... it required that the
current form be "answered" before getting to another form within the
program. Is there such a property in VB.net ? If not, how might you
accomplish this ?

Thanks!
May 25 '07 #1
5 3000
Use Form.ShowDialog to display a modal form.

---------
- G Himangi, Sky Software http://www.ssware.com
Shell MegaPack : GUI Controls For Drop-In Windows Explorer like Shell
Browsing Functionality For Your App (.Net & ActiveX Editions).
EZNamespaceExtensions.Net : Develop namespace extensions rapidly in .Net
EZShellExtensions.Net : Develop all shell extensions,explorer bars and BHOs
rapidly in .Net
---------
"Rob" <ro***@yahoo.comwrote in message
news:G4******************************@comcast.com. ..
In Access there was a modal property of a form... it required that the
current form be "answered" before getting to another form within the
program. Is there such a property in VB.net ? If not, how might you
accomplish this ?

Thanks!

May 25 '07 #2
Two things..

1) You can look at the form border type property to control what buttons and
options are availabel on that form when shown. One of them is fixed dialog.

2) When you show the form use the ShoeDialog method:

Dim frm As New FormToShow
frm.ShowDialog

You can even get a dialog result from the from as it closes just like a real
standard dialog box by setting the forms DialogResult values.

Dim frm As New FormToShow
Dim retval as DialogResult

retval = frmShowDialog

If retval = DialogResult.OK

Else

End If

In this example the frm would have a setting as such:

Me.DialogResult = Windows.Forms.DialogResult.OK
"Rob" <ro***@yahoo.comwrote in message
news:G4******************************@comcast.com. ..
In Access there was a modal property of a form... it required that the
current form be "answered" before getting to another form within the
program. Is there such a property in VB.net ? If not, how might you
accomplish this ?

Thanks!

May 25 '07 #3
What if the form that needs to be modal is not a Top-level form. For example
it is embedded as a docked control in a panel on another form?
"Ray Cassick" <rc******@enterprocity.comwrote in message
news:OO**************@TK2MSFTNGP02.phx.gbl...
Two things..

1) You can look at the form border type property to control what buttons
and options are availabel on that form when shown. One of them is fixed
dialog.

2) When you show the form use the ShoeDialog method:

Dim frm As New FormToShow
frm.ShowDialog

You can even get a dialog result from the from as it closes just like a
real standard dialog box by setting the forms DialogResult values.

Dim frm As New FormToShow
Dim retval as DialogResult

retval = frmShowDialog

If retval = DialogResult.OK

Else

End If

In this example the frm would have a setting as such:

Me.DialogResult = Windows.Forms.DialogResult.OK
"Rob" <ro***@yahoo.comwrote in message
news:G4******************************@comcast.com. ..
>In Access there was a modal property of a form... it required that the
current form be "answered" before getting to another form within the
program. Is there such a property in VB.net ? If not, how might you
accomplish this ?

Thanks!

May 26 '07 #4
On May 25, 9:29 pm, "gadgeteer" <nos...@spam.comwrote:
What if the form that needs to be modal is not a Top-level form. For example
it is embedded as a docked control in a panel on another form?

"Ray Cassick" <rcass...@enterprocity.comwrote in message

news:OO**************@TK2MSFTNGP02.phx.gbl...
Two things..
1) You can look at the form border type property to control what buttons
and options are availabel on that form when shown. One of them is fixed
dialog.
2) When you show the form use the ShoeDialog method:
Dim frm As New FormToShow
frm.ShowDialog
You can even get a dialog result from the from as it closes just like a
real standard dialog box by setting the forms DialogResult values.
Dim frm As New FormToShow
Dim retval as DialogResult
retval = frmShowDialog
If retval = DialogResult.OK
Else
End If
In this example the frm would have a setting as such:
Me.DialogResult = Windows.Forms.DialogResult.OK
"Rob" <r...@yahoo.comwrote in message
news:G4******************************@comcast.com. ..
In Access there was a modal property of a form... it required that the
current form be "answered" before getting to another form within the
program. Is there such a property in VB.net ? If not, how might you
accomplish this ?
Thanks!
I didn't know you could dock a form in a panel?

Thanks,

Seth Rowe

May 26 '07 #5
Of course you can!!!!!!

form.Parent = control

I think the question should have been:

Why on earth would one want to use a docked form as a modal dialog?
"rowe_newsgroups" <ro********@yahoo.comwrote in message
news:11**********************@p47g2000hsd.googlegr oups.com...
On May 25, 9:29 pm, "gadgeteer" <nos...@spam.comwrote:
>What if the form that needs to be modal is not a Top-level form. For
example
it is embedded as a docked control in a panel on another form?

"Ray Cassick" <rcass...@enterprocity.comwrote in message

news:OO**************@TK2MSFTNGP02.phx.gbl...
Two things..
1) You can look at the form border type property to control what
buttons
and options are availabel on that form when shown. One of them is fixed
dialog.
2) When you show the form use the ShoeDialog method:
Dim frm As New FormToShow
frm.ShowDialog
You can even get a dialog result from the from as it closes just like a
real standard dialog box by setting the forms DialogResult values.
Dim frm As New FormToShow
Dim retval as DialogResult
retval = frmShowDialog
If retval = DialogResult.OK
Else
End If
In this example the frm would have a setting as such:
Me.DialogResult = Windows.Forms.DialogResult.OK
"Rob" <r...@yahoo.comwrote in message
news:G4******************************@comcast.com ...
In Access there was a modal property of a form... it required that the
current form be "answered" before getting to another form within the
program. Is there such a property in VB.net ? If not, how might
you
accomplish this ?
>Thanks!

I didn't know you could dock a form in a panel?

Thanks,

Seth Rowe
May 26 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: martin de vroom | last post by:
Hi, I have a web page that opens a modal dialog (client side) in the following manner onclick="window.showModalDialog('/dialog.asp',null,'dialogHeight: 200px; dialogWidth: 400px; dialogTop:...
2
by: Matt | last post by:
I want to know how to submit the form data to a modal dialog window? The following is page1.asp, and when the user clicks submit button, it will post the form data to page2.asp by opening a new...
4
by: Kyralessa | last post by:
In Access 2000, I have a base form with a ListBox of conference registrants. In the form's declarations section I include Dim f as Form To add a registrant I'm doing this: Set f = New...
4
by: Paul Aspinall | last post by:
Can anyone advise how to display a form on top, and modal, without using ShowDialog?? Thanks
23
by: Chukkalove | last post by:
Im sorry, I dont know the correct description for a hierarchy of parent and child forms. I have a main form that opens a child form modally. This child form in turn opens it's own child form...
2
by: Mike | last post by:
Hi, I'm having a problem with modal forms on windows. I've written a very short test program, with a main window and a form called from the main window. The form is set to modal with...
1
by: samentu | last post by:
Hi there. I'm having a little problem here with some forms. Let me describe the problem: my application has a MDI parent form (the form that starts with the application); then when I click a button...
2
by: diogenes | last post by:
I have created many shortcut/popup (aka context, or right-click) menus for my application - instead of toolbars or standard drop-down menus. Within my custom menu, I am using...
4
by: =?Utf-8?B?Z2luYWNyZXNzZQ==?= | last post by:
I am trying to close/dispose multiple instances of a form but because they are modal and hidden, they do not show up in My.Application.OpenForms. They must be modal, so making them modeless is not...
1
by: Mohit | last post by:
Hi all, I am working on a windows based client server application with multiple forms. All forms are having custom title bars with no default bars. There is one main form. Some forms are opened up...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.