Showdialog

Hello,
When a form2 is shown with showdialog  it disables the form1.
How can I disable the form but enable 3 buttons on form1.

Cheers
RIASAsked:
Who is Participating?
 
darbid73Connect With a Mentor Commented:
There is no ready made way of doing this. You will have to do it yourself.

1. To enable only 3 buttons on a form you must DISABLE all other controls.
2. If your form1 is blocked by calling showdialog then you cannot call it.
3. use Show, disable form2 and disable everything on form1 except your 3 buttons.

NUmber 3 is maybe not the best solution but it is the best based on your limited information so far.
0
 
darbid73Commented:
Are you trying to show a msgbox or a form? Are you using Win Forms or WPF?

for a msgbox you cannot show it modeless. You could create a new Thread and show the msgbox in that thread.  You would then need to "block" usage of form2 but form1 would be usable.

Otherwise if you have a form then Form.Show will make it modeless.

Here are some examples of Modal and Modaless
0
 
RIASAuthor Commented:
Hello,
i am using vb.net desktop app.
Modal is fine but,how can make 3 buttons on my main form enabled?
0
Cloud Class® Course: Amazon Web Services - Basic

Are you thinking about creating an Amazon Web Services account for your business? Not sure where to start? In this course you’ll get an overview of the history of AWS and take a tour of their user interface.

 
darbid73Commented:
You will have to make make sure the the whole form is enabled (meaning there is nothing modal affecting it) and then disable everything on the form except the 3 buttons.
0
 
RIASAuthor Commented:
whole form is enabled (meaning there is nothing modal affecting it)
How can i do this?
When i declare
form2.showdialog ,
 the parent form is disabled ,don't know how can i enable it and follow your instruction
0
 
darbid73Commented:
There may be other ways of doing what you want.

You need to use
form2.Show

Open in new window

0
 
RIASAuthor Commented:
showdialog is perfect,i have previously tried show.But only want three buttons to be enabled
0
 
RIASAuthor Commented:
Thanks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.