Results 1 to 6 of 6

Thread: One Form on Top of the Other (Always) (Resolved)

  1. #1

    Thread Starter
    Frenzied Member Tec-Nico's Avatar
    Join Date
    Jun 2002
    Location
    México
    Posts
    1,192

    Resolved One Form on Top of the Other (Always) (Resolved)

    I was wondering if there is a way to achieve the same Paint does:

    To have a form always on top of it but this form won't be on top of any other application.

    I am trying to achieve a similar effect with my application. Could someone please give me an advice on this one?

    I have tried the SetWindowPos API but it seems I must be doing it wrong... I would love to hear any suggestion.
    Attached Images Attached Images  
    Last edited by Tec-Nico; Feb 1st, 2005 at 11:25 AM. Reason: Solved
    We miss you, friend... Rest in Peace, we will take care of the rest of it.

    [vbcode]
    On Error Me.Fault = False
    [/vbcode]
    - Silence is the human way to share ignorance
    Tec-Nico

  2. #2
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: One Form on Top of the Other (Always)

    Try SetParent. It may help you do what you want.

  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: One Form on Top of the Other (Always)

    Form1.Show, vbModal

  4. #4
    Former Admin/Moderator MartinLiss's Avatar
    Join Date
    Sep 1999
    Location
    San Jose, CA
    Posts
    33,431

    Re: One Form on Top of the Other (Always)

    Tec-Nico you probably already figured out that Form1 in Hack's example is the form that you want to show on top. In case you don't want to show that form modally, you can do this and have it still be on top.

    VB Code:
    1. frmOnTop.Show , frmUnder

    That indicates that frmUnder owns formOnTop.

  5. #5

    Thread Starter
    Frenzied Member Tec-Nico's Avatar
    Join Date
    Jun 2002
    Location
    México
    Posts
    1,192

    Re: One Form on Top of the Other (Always)

    Thank you for all your replies, guys.

    I will try your suggestions.

    David: I tried yesterday with setParent API, I hope your example shows how to do it without the form being "inside" (Because the thumbnail would be useless if you can't move it to one side of the form)

    Hack: Thank you for your reply... Unfortunatelly I don't want the form to be modal... I will try it, though.

    Martin: Thanks for your suggestion, I am going to try it right now.
    We miss you, friend... Rest in Peace, we will take care of the rest of it.

    [vbcode]
    On Error Me.Fault = False
    [/vbcode]
    - Silence is the human way to share ignorance
    Tec-Nico

  6. #6

    Thread Starter
    Frenzied Member Tec-Nico's Avatar
    Join Date
    Jun 2002
    Location
    México
    Posts
    1,192

    Re: One Form on Top of the Other (Always)

    Thank you, everyone! I got it working now... I tried Martin's suggestion and it did just what I wanted.

    (How could I miss that? :P I guess I am really tired lately)
    We miss you, friend... Rest in Peace, we will take care of the rest of it.

    [vbcode]
    On Error Me.Fault = False
    [/vbcode]
    - Silence is the human way to share ignorance
    Tec-Nico

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