Disable the OK button on a ShowDialog() form. - compact-framework

Is it possible to disable the default OK button on a NET CF form shown using ShowDialog() ?
I am implementing my own buttons on the form.
Thanks.

Related

How to disable main form when another form is open in vb

I'm working on my project in VB. Can anyone help me how to disable my main(not close) form when I open my login form?
Like when I click on the login button the login form will appear and the main form will just stay in background and it cannot be closed or moved unless the login form will be closed?
Look into the subject of a "modal" dialog box. You can instantiate one as follows:
Dim frmLogin as New Form()
' Display frmLogin as a modal dialog
frmLogin.ShowDialog()
This means that this form will have to be handled by the user before any other forms can be used.

How do you make the TopMost form the only clickable form until its closed?

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()

Keeping one form on top of the calling form

I'm using VB.NET (VS2008) and have a form (frmMain) that calls another form (frmCleanUp) but when frmCleanUp shows it can be hidden behind frmMain.
What I'd like to have is the new form be locked and have to close to get rid of it?
Thanks..
Show the Form with .ShowDialog() instead of .Show().
This way, the form is shown as modal dialog box and will stay on top until you close it.
when you show the form, do it with ShowDialog
in frmMain do:
frmCleanUp.ShowDialog

Total focus on a Form: ignore all others

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.

Switch form to Modal after it is open?

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.