-
I have set my main form to be maximize with the taskbar not visible. I am then allowing the user to create multiple instances of another form.
The problem is when one of these new forms are minimized they disappear behind the main form. I have them set to not be displayed in the task bar. If I force them to the front using Zorder then I am unable to do any events on the main form.
Any ideas or suggestions would be welcomed.
Thanks
-
Why don't you use an MDI-form to be the main form? Then the only thing you need to change is that you need to set the MdiChild property of the child forms to True.:)
-
I am trying to avoid using the Mdi form. It would require lots of changes in my project.
Another possiblity I could use is to set the form to always on top, like you can with Winamp, but I don't know how to do these either.
Can anybody help?
-
Code:
Public Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
To use
Code:
SetWindowPos Form1.hwnd, -1, 0, 0, 0, 0, 3
-
Works great!!
Thanks guys.
-
Or use ZOrder.
Code:
Private Sub Form_LostFocus()
ZOrder
End Sub