-
in my new app im making an about form. the about form is on top.
but i want it to disapear if i press alt+tab, or click my original program form, or . . . make the about firm locked(like MsgBox).
i tried unloading it on Form_LostFocus, but it doesnt always work, and pressing alt+tab dont affect it.
what can i do to fix this ?
-
Alt+Tab doesn't work for forms within the same app (unless maybe you set a global hook and then intercept and process the message generated; but you can't do this from vb).
If you don't load the About form modally, you can click on your first form and Form_LostFocus will be triggered in your About screen.
-
this i know, it solves only one problem.
but what with the alt+tab ?
i dont know how to deal with that...
-
You can either make the About screen a separate executable or set up an MDI form.
-
how do i set up MDI form ?
i never used that....
if you have code example i will be greatful.
-
MDI is normally used if you want to have child windows embedded within a main window (like in Word). But you can make an MDI About form for your purpose also. You can't change a form into an MDI form, so...from the Project menu, select 'Add MDI Form' and copy the code from your existing About screen into this new one. Alt Tab will work now.
-
click original
As per your asking if you could unload the about form
by clicking on your main form:
put the unload code in your main forms click event
unload frmAbout
then when you click anywhere on the main form your
abut form will unload