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
Solved

Showdialog

Posted on 2016-11-23
8
32 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
  • 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
Master Your Team's Linux and Cloud Stack

Come see why top tech companies like Mailchimp and Media Temple use Linux Academy to build their employee training programs.

 

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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

829 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