VB: Modal Forms
This is in VB and My scenario is like this.
1. i have MainForm, Form1 and Form2.
2. When i click a button on MainForm it show Form1.
3. Then when i click on a button in Form1 it show Form2.
4. When i click on button at Form2, i want it to show the Form1 again.
However, i encountered error if i continue to use Form1.ShowDialog() because Form1 is visible.
Forms can be easily show up if i use modeless form. But i need the modal feature like disable to edit Forms behind the form on top.
How do i show the Form1? Please advise. Thank you.
In Form2, use Me.Close() which will close it so that you will be back at Form1.
My idea is like displaying both Form and switching to front whenever it click.
I have an idea but its not work which might because it is modal form. But It works in modeless form.
or just simply Form1.Show() then the form behind the first Form will bring to front.
Any idea on it?
I'm not sure why you are so keen on modal.
If you can find a way to make it work modeless, then use it.
Am I missing something here?
ok. i've got it. Thanks. :)