Solved

Showdialog

Posted on 2016-11-23
8
36 Views
Last Modified: 2016-11-23
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
0
Comment
Question by:RIAS
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
8 Comments
 
LVL 20

Expert Comment

by:darbid73
ID: 41898967
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
 

Author Comment

by:RIAS
ID: 41898990
Hello,
i am using vb.net desktop app.
Modal is fine but,how can make 3 buttons on my main form enabled?
0
 
LVL 20

Expert Comment

by:darbid73
ID: 41898997
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
Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

 

Author Comment

by:RIAS
ID: 41899005
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
 
LVL 20

Expert Comment

by:darbid73
ID: 41899009
There may be other ways of doing what you want.

You need to use
form2.Show

Open in new window

0
 

Author Comment

by:RIAS
ID: 41899010
showdialog is perfect,i have previously tried show.But only want three buttons to be enabled
0
 
LVL 20

Accepted Solution

by:
darbid73 earned 500 total points
ID: 41899028
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
 

Author Closing Comment

by:RIAS
ID: 41899281
Thanks!
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …

696 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question