473,383 Members | 1,829 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Use modal form in a panel, or how to create a 'ShowDialog' like solution

Hi,

We are writing a touch screen application with two panels on the main (SDI)
form.

One panel is used for several forms, the other for selections. The
selections panel communicates with the forms panel.

In some cases we need to wait for a selection of the user. Displaying a new
modal form will move away from our main form and the selection panel is not
accessible.

We solved it for the time being with our own messageloop which is not
preffered. Another way could be with callback making the application much
complicated.

Is there an approach in C#/.NET how to solve this? Or are we stuck with our
own messageloop?

In pseudo code what we want:

// from anywhere in the application we will call:
Selection = AskSomeSelection("A", "B", "C", "D" );

if ( Selection == "A" ) DoSomethingA();
string AskSomeSelection()
{
// tell this form wants to be on the form panel
FormsPanel.Update (this);

// update selections panel
SelectionsPanel.Update (bla bla);

// wait till the user selected something
this.ShowDialog()

// return the selected option
returh this.Selected;

}
Rene


Nov 17 '05 #1
0 1898

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: kids_pro | last post by:
Hi there, I want to create a Modal dialog from. Normally in vb it won't allow to click the parent form. But I tried that in C# using form.ShowDialog(this); I still can click on the mainForm...
4
by: Paul Aspinall | last post by:
Can anyone advise how to display a form on top, and modal, without using ShowDialog?? Thanks
2
by: jamie | last post by:
I have a class that based on a timer will pop up a dialog based on a lasped amount of time. The problem is that in the timer elapsed event I create and use ShowDialog to show the timeout form:...
6
by: Samuel R. Neff | last post by:
I'm having weird results with a form that is already displayed modally (via ShowDialog) displaying a second form via ShowDialog. The last form is not modal even though it's called with ShowDialog....
10
by: Chris Petchey | last post by:
My App is an MDI Parent with MDI Child forms. One of the child forms calls a modal dialog form. I would like the modal dialog form to be INSIDE the mdi parent window. I am not bothered about...
4
by: mpreston | last post by:
I'm following the example from the MSDN library on how to create modal dialog boxes in C#, but something isn't working properly. If I create a modal dialog box and show it using ShowDialog(), the...
2
by: John Brock | last post by:
At work we are using a virtual desktop manager called AltDesk (http://www.astonshell.com/), and it is causing a weird and extremely annoying problem with the VB.NET application I am developing. ...
23
by: Chukkalove | last post by:
Im sorry, I dont know the correct description for a hierarchy of parent and child forms. I have a main form that opens a child form modally. This child form in turn opens it's own child form...
5
by: Rob | last post by:
In Access there was a modal property of a form... it required that the current form be "answered" before getting to another form within the program. Is there such a property in VB.net ? If...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.