I'm having trouble understanding how to show/hide/dispose/bringtofront forms. Here's what I'm trying to do-
FrmMain_Load
User is looking at frmMain
User makes a selection from comboBox1
comboBox1_SelectedIndexChanged calls sub New() in Module1
(*1) sub New puts frmDialog on top of frmMain
frmDialog has 3 btns (btnNew, btnCopy btnCancel)
User clicks btnNew
frmDialog/btnNew_SelectedIndexChanged code sets strResponse to "New"
(*2) frmDialog disappears
Back to sub New()
[code]
(*3) sub New/ Case(strResponse), Case "New" puts frmDialog on top of frmMain AGAIN
[strResponse not needed after this]
User clicks btnCopy this time
frmDialog/btnCopy_SelectedIndexChanged code sets strResponse to "Copy"
(*4) frmDialog disappears, frmMain is there
Back to sub New/ Case(strResponse), Case "Copy"
[strResponse not needed after this]
[code copies a file]
(*5) end sub New (Exit??)
(*6) Return to frmMain to make another selection using comboBox1
Can you tell me what commands to use for *1 - *6? to do what I want to do?
I've tried many combinations.
so far...
frmDialog.ShowDialog() seems to work at *1
Me.Close at *2
frmDialog.ShowDialog() at *3
Me.Close at *4
If I do this at *5, *6
frmMain.Visible = falseit looks like it works but it runs frmMain_Load again which does a bunch of stuff I don't want to do.
frmMain.ShowDialog()
So *5 and *6 are the problem (I think)
Can you help??
Thanx Paul.James@snet.net