If I have a form open already that is not modal, can I turn it modal by the click of a button on that form.
I don't suppose so. Usually you have to give the old form as a parameter in the constructor to create a modal form. The .Modal property is also read-only, so from my experience you have to indicate when creating the form.
Related
I am using modal dialogue(ShowDialog) in my project and now, user want to copy and paste few text from other application but modal dialogue will not allow them to do the same because modal pop up doesn't allow to focus on other screen. I know I can use modeless dialogue but at this point I can't. Now my question is, are there any way to have focus on other screen using modal dialogue box?
Dim f As New Form()
f.ShowDialog(Me)
The Show function shows the form in a non modal form. This means that you can click on the parent form.
ShowDialog shows the form modally, meaning you cannot go to the parent form
I have a main form maximized in Access that I do not want to be in restore window or hidden or closed when another form opens.
I observed that when I open another form by DoCmd.Restore by clicking a button in the main form, the main form is also doing the restore window.
When I clicked a button in the main form, say Add Record, with DoCmd.Restore, my main form is doing a restore window rather than staying in maximized window
Any idea?
Thanks in advance
Your question is a bit confusing. If you don't want to un-maximize your forms, don't do DoCmd.Restore.
If you want to open another form non-maximized, but keep the main form maximized, you need to make the second form a popup form.
This is how MDI windows work - you can't have maximized and non-maximized forms at the same time - except popup forms.
I'm trying to make it so that the login form pops up and the window behind that cannot be accessed until the login form is closed.
How would I do this?
Use a modal form. So use form.ShowDialog() instead of form.Show()
I have a problem stated below....
I have a MDI form having different child form. if i open the form then if related data not exist in database, a suggestion banner should appear top of the forms to enter related data first. Even, if I close the child form, suggestion banner should remain open and Onclick on that banner go to specific form to add the record. There should be different banner of different forms. so please help me to implement this scenario.
Thanks in Advance.
I want to use which control as banner. so after struggling i fount panel best as banner. Setting panel property -> AccessibleRole = Alert. So I implement scenario easily.
Instead of opening the child form, open the banner form first (which opens the child form).
Then check in the banner form if the data has been entered. If it has:- close the banner form.
in my VB.NET application, my main Form can show other Forms. That works fine, but I need to set "focus" on the newly opened form, and don't allow the user use the main form until the opened Form is closed. How do I do that?
The Form.ShowDialog() method shows a form as a dialog box; this should keep the focus on that form until it is closed (by the user or your code).
Use the Form.ShowDialog() method.
It will show you the form as a dialog box, so focusing is at total, and it will ignore all other forms or objects.