Results 1 to 11 of 11

Thread: Top"Almost"

  1. #1

    Thread Starter
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808

    Top"Almost"

    I know there's a way to set a form to be TopMost. However, I have a question which I cannot answer myself right now 'cos I don't have VB at the reach to prove it. If I set a form to be at topmost, would that form still be visible if my app weren't the active one?? (e.g. if I change the app with Alt-Tab, or I select another task from the taskbar)

    If that's so... how do I set it as Top"Almost"??
    Emiliano F. Martín


    If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
    Encourage the person who helped you to keep doing it, and give him the points he deserves.


    MP3 Organizer: Freeware to logically organize all your MP3s.

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    The answer to your first question is yes. I just tested this will a program I've written which places a window as always on top, and I alt-tabbed to another app, and my window was still the foremost window.

    As far as "almost", I think it is either the top most window or it isn't.

  3. #3

    Thread Starter
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808
    So I guess the only answer would be to set it as topmost, and have a timer analysing whether my app is active or not. If not, reset the topmost "property". I don't like it... but if it's the only solution.


    P.S.: The reason why I want to do this is to allow the user to have floating toolbars. Maybe someone has a better idea.
    Emiliano F. Martín


    If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
    Encourage the person who helped you to keep doing it, and give him the points he deserves.


    MP3 Organizer: Freeware to logically organize all your MP3s.

  4. #4
    Addicted Member Michael Woolsey's Avatar
    Join Date
    Nov 2000
    Location
    Calgary, Alberta, Canada.
    Posts
    243
    I have never really had luck with .ZOrder, but it may provide some functionality that you desire.

    From the Help file:
    Places a specified MDIForm, Form, or control at the front or back of the z-order within its graphical level. Doesn't support named arguments.
    Hope this helps.
    Michael
    Application/Web Developer

    Visual Basic 6.0 SP5
    Active Server Pages
    Oracle 9i
    - I'm going to live forever, or die trying!

  5. #5

    Thread Starter
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808
    I'll try it... since it's nicer than the timer thingy. But, I'm not very fond of it.
    Emiliano F. Martín


    If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
    Encourage the person who helped you to keep doing it, and give him the points he deserves.


    MP3 Organizer: Freeware to logically organize all your MP3s.

  6. #6
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649
    You can have a form to stay above an other form in your project if you show it modeless and pass the owner form as the second argument in the Show method.
    This form will now stay above the other form at all time. It will also be minimized if you minimize the owner form.
    VB Code:
    1. frmFind.Show vbModeless, Me
    This is especially usefull for a Find/Replace dialog that you may not want to show modal because you might want to let the user edit some text in the main form while the Find form is still visible.

    Best regards

  7. #7

    Thread Starter
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808
    Thanks a lot, Joacim Andersson That was exactly what I was looking for.
    Last edited by Mc Brain; Nov 1st, 2001 at 11:45 AM.
    Emiliano F. Martín


    If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
    Encourage the person who helped you to keep doing it, and give him the points he deserves.


    MP3 Organizer: Freeware to logically organize all your MP3s.

  8. #8
    Addicted Member Michael Woolsey's Avatar
    Join Date
    Nov 2000
    Location
    Calgary, Alberta, Canada.
    Posts
    243
    Now that is entirely too easy!

    Great tip, thanks Joacim Andersson.

    Michael
    Application/Web Developer

    Visual Basic 6.0 SP5
    Active Server Pages
    Oracle 9i
    - I'm going to live forever, or die trying!

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

    Thumbs up

    Very nice Joacim. That little tip has been tucked away in my Code Library, and I'm sure it will get used.

  10. #10
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649
    Originally posted by Michael Woolsey
    Now that is entirely too easy!

    Great tip, thanks Joacim Andersson.

    Michael
    Well you know, the best things in life is free and the best code is the one you don't have to write

  11. #11

    Thread Starter
    Need-a-life Member Mc Brain's Avatar
    Join Date
    Apr 2000
    Location
    Buenos Aires, Argentina
    Posts
    6,808
    LMAO

    That's so true!! And if it has to be written... just wait your co-worker (or anybody else) do it
    Emiliano F. Martín


    If a post has helped you then please Rate it! (and give the user points he/she deserves by clicking on the image).
    Encourage the person who helped you to keep doing it, and give him the points he deserves.


    MP3 Organizer: Freeware to logically organize all your MP3s.

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