Results 1 to 7 of 7

Thread: on top forms . . .

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jan 1999
    Location
    Israel
    Posts
    79

    Unhappy

    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 ?


  2. #2
    Hyperactive Member
    Join Date
    Nov 1999
    Posts
    363
    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.
    Wade

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jan 1999
    Location
    Israel
    Posts
    79
    this i know, it solves only one problem.
    but what with the alt+tab ?
    i dont know how to deal with that...

  4. #4
    Hyperactive Member
    Join Date
    Nov 1999
    Posts
    363
    You can either make the About screen a separate executable or set up an MDI form.
    Wade

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Jan 1999
    Location
    Israel
    Posts
    79
    how do i set up MDI form ?
    i never used that....

    if you have code example i will be greatful.

  6. #6
    Hyperactive Member
    Join Date
    Nov 1999
    Posts
    363
    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.
    Wade

  7. #7
    _______ HeSaidJoe's Avatar
    Join Date
    Jun 1999
    Location
    Canada
    Posts
    3,946

    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


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width