Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding dialog forms to another control

Status
Not open for further replies.

sillysod

Technical User
Jan 6, 2004
300
GB
Hi There,

Im trying to create a tabbed style main form, so that all my forms which are open can be tabbed between within the mdi

To do this im using a tab control and each time a form is opened creating a new tab and adding the form i want to show to the controls collection.

This work ok, however i need to show dialog forms so that the user can select from a list of values.

i do this by passing a sql query to a function within form which contains a listview and a private string variable, the result are shown in the listview and when the user double clicks the listview the variable is assigned a value and this is returned by the forms function.

In order for this to work correctly i need the form which called my list form to "pause" until the user selects a value and the form closes. so i use f.showdialog.

The problem is, if tab 1 for instance contains a customer maintenance form and the user clicks the select customer button i need to value list form to only be modal for that tab and not lock the whole app, ie while the dialog form is open the user should still be able to tab through any other forms they may have open.

VB doesnt allow me to add a dialog form to another control

Anyone got any ideas? or ways i could make it so my select value list doesnt need to be modal?

Cheers
Daniel
 
Daniel:

Have you tried using the Topmost property? This way, your "Dialog" form always remains on top, but the user can still click the tabs on the main form.

Just a thought.



Ron Repp
 
Hi, thanks for the reply

The problem is that the dialog does need to be modal, becuase the user shouldnt be able to click off the select value form back onto the data entry form, but they should be able to move off his form onto another if you get my drift
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top