Results 1 to 10 of 10

Thread: Always on Top

  1. #1

    Thread Starter
    Addicted Member hyousuf2's Avatar
    Join Date
    Dec 2004
    Location
    Dublin
    Posts
    226

    Always on Top

    hi i want a form to be displayed wid accurate coordinates every time like this, it should always start above the Taskbar, shoud'nt be moveable or resizeable n always be on top, like if a new window opens then it should be above that form.
    my question is similar to Spedia bar if ne body has seen it !

  2. #2
    Frenzied Member vbNeo's Avatar
    Join Date
    May 2002
    Location
    Jutland, Denmark
    Posts
    1,994

    Re: Always on Top

    Quote Originally Posted by hyousuf2
    hi i want a form to be displayed wid accurate coordinates every time like this, it should always start above the Taskbar, shoud'nt be moveable or resizeable n always be on top, like if a new window opens then it should be above that form.
    my question is similar to Spedia bar if ne body has seen it !
    This has been asked tons of times before, do a search on theese forums.
    "Lies, sanctions, and cruise missiles have never created a free and just society. Only everyday people can do that."
    - Zack de la Rocha


    Hear me roar.

  3. #3
    New Member
    Join Date
    Jan 2005
    Posts
    5

    Re: Always on Top

    if you have vb6 you can use form layout to set where you want your form to load. form layout is found in lower right hand corner of vb6. and for keeping the form on top:

    VB Code:
    1. Private Sub Form_Load()
    2. Call SetWindowPos(FrmName.hwnd, HWND_TOPMOST, 0, 0, 0, 0, FLAGS)
    3. End Sub

  4. #4
    Addicted Member VbMafia's Avatar
    Join Date
    Sep 2004
    Location
    Pilipinas
    Posts
    177

    Re: Always on Top

    Use the label method everytime you run program in the top

    Or Visit us :www.vbaccelerator.com
    " I never did anything worth doing entirely by accident.... Almost none of my inventions were derived in that manner. They were achieved by having trained myself to be analytical and to endure and tolerate hard work."

    " Many of life's failures are experienced by people who did not realize how close they were to success when they gave up. "
    - Thomas Alva Edison-

    In God We Trust

  5. #5

    Thread Starter
    Addicted Member hyousuf2's Avatar
    Join Date
    Dec 2004
    Location
    Dublin
    Posts
    226

    Re: Always on Top

    hey where to find the method SetWIndowsPos ?

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

    Re: Always on Top


  7. #7
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: Always on Top

    Here is a sample program ( a modified version of something from psc that was downloaded long time ago).
    It doesn't include SetWindowPos, trough, but it calculates Taskbar dimensions and position so you can place your form presizely where you want it.
    Last edited by RhinoBull; Jan 5th, 2005 at 10:54 AM.

  8. #8

    Thread Starter
    Addicted Member hyousuf2's Avatar
    Join Date
    Dec 2004
    Location
    Dublin
    Posts
    226

    Re: Always on Top

    well i found how to get the dimensions of the taskbar, but wat abt placing the form on Top.

  9. #9
    PowerPoster RhinoBull's Avatar
    Join Date
    Mar 2004
    Location
    New Amsterdam
    Posts
    24,132

    Re: Always on Top

    It has been suggested to you numerous times already: use SetWindowPos() api function (samples could be found in this thread).

    Regards.

  10. #10

    Thread Starter
    Addicted Member hyousuf2's Avatar
    Join Date
    Dec 2004
    Location
    Dublin
    Posts
    226

    Resolved Re: Always on Top

    thnkx well i was able to solve it eventually, check out ma next thread !

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