Results 1 to 11 of 11

Thread: Form always on top.

  1. #1

    Thread Starter
    Member
    Join Date
    May 2005
    Posts
    46

    Form always on top.

    I now how to make my Form always on top before you post the WindowsPos code. What I am after is... When my Form is on top, I do not want users to be able to access anything behind it. Although it is on top you could still type in notepad etc...

    What I am after is the same sort of result you get from a MessageBox, when you click out the MessageBox you get a beep and the title bar flashes, I am not after the beep and the flash, just full focus on my Form like the MessageBox.

    Thanks,

    TrUz

  2. #2

  3. #3

    Thread Starter
    Member
    Join Date
    May 2005
    Posts
    46

    Re: Form always on top.

    Hi MartinLiss,

    I have tried that, it only seems to work with other forms in my application.

    Truz

  4. #4

  5. #5

    Thread Starter
    Member
    Join Date
    May 2005
    Posts
    46

    Re: Form always on top.

    Yeah I understand that and that works yes, but only for Forms in my application. I need this to happend for all applications, desktop etc...

    I do not want users to be able to do anything until they have done whats required on this form.

    Cheers,

    TrUz

  6. #6

  7. #7

    Thread Starter
    Member
    Join Date
    May 2005
    Posts
    46

    Re: Form always on top.

    Yes I did. Let me explain again.

    I am using the API call to make my form on top already. But, even though my form is on top I can still use the start button or type in notepad etc...

    What I want to be able to do is stop this like MessageBox's do, i.e. the user must do what's required on my form before he/she can do anything else in Windows.

    Hope this makes it clearer,

    TrUz

  8. #8
    Addicted Member
    Join Date
    Apr 2006
    Location
    USA
    Posts
    207

    Re: Form always on top.

    I'm sorry, please don't take any offense. But, "the user must do what's required on my form before he/she can do anything else in Windows" is just wrong in so many ways.

    I can't see any good coming from this. It's the user's PC, if he/she wants to minimize a window, put it behind another window, etc.. That is his/her choice. We must all respect the end user.

    Under what possible legitimate reason would you need to do this ?
    Keith_VB6

    If you have any further questions, just ask.
    If this solves things, then please mark the thread resolved.
    [Thread Tools] --> [Mark Thread Resolved]

  9. #9
    PowerPoster Simply Me's Avatar
    Join Date
    Aug 2003
    Posts
    2,748

    Re: Form always on top.

    I agree with Keith. If you do that you are defeating the purpose of multi-tasking.
    To give is always to be NOBLE...
    To received is always to be BLESSED....
    Each day strive to be NOBLE
    Each day strive to be BLESSED

    If this post has helped you. Please take time to rate it.

    >=|+|=< Simply Me >=|+|=<

    ----------------------------------------
    Connection Strings | Number Only in Textbox | Splash Screen with Progress Bar | Printing to 1/2 of perforated bond paper |
    Freeze 2005 DataGridView Column

  10. #10

    Thread Starter
    Member
    Join Date
    May 2005
    Posts
    46

    Re: Form always on top.

    Well it is for work and it is an application that stops applications from running, some people are allowed to run these applications. The form that is displayed is a login form, I do not want to the users to be able use anything else until they either login or cancel. If they cancel it closes the application, if they login they can carry on using it.

    TrUz

  11. #11
    PowerPoster
    Join Date
    May 2006
    Posts
    2,988

    Re: Form always on top.

    Check out the System Locker code in this link ..

    http://www.pscode.com/vb/scripts/Sho...61991&lngWId=1

    Used primarily for security apps ..

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