?
Solved

Showdialog

Posted on 2016-11-23
8
Medium Priority
?
38 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
Quick Cloud Training

Looking for some quick training on the cloud in 2 hours or less? Check out these how-to guides in AWS, Linux, OpenStack, Azure, and more!

 

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 2000 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

Independent Software Vendors: 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…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
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 …
Suggested Courses

770 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