Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID

Categories

We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact lee@programmersheaven.com if you have questions.
Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Form to stay at front even when lost focus

chris_hurleychris_hurley Posts: 37Member
Hi,

I'm writing an app with multiple forms,
There is a navigation form with several buttons (each corresponding to a form containing various components) that i need to remain in view at all times so it does not dissapear when i click on one of the component forms (all component forms are full screen).

At present i get around this by having the component forms placed to the right of the navigation form so when focus is lost it is still visible. However i want to display the component forms full screen so desktop can't be seen when it's used on alternative sized monitors.

Is there a way I can permanently set the navigation form to be at the front regardless of focus. Any help would be much appreciated.

Cheers, Chris

Comments

  • lionblionb Posts: 1,685Member
    [b][red]This message was edited by lionb at 2006-3-6 5:57:49[/red][/b][hr]

    Try this
    Command1 control placed on Form1.
    [code]
    Private Sub Command1_Click()
    Form2.Show
    Form1.ZOrder
    End Sub
    [/code]


  • infidelinfidel Posts: 2,900Member
    : [b][red]This message was edited by lionb at 2006-3-6 5:57:49[/red][/b][hr]
    :
    : Try this
    : Command1 control placed on Form1.
    : [code]
    : Private Sub Command1_Click()
    : Form2.Show
    : Form1.ZOrder
    : End Sub
    : [/code]

    Will Form1 continue to be on top if the user clicks on Form2? I think there's an API call to do what the user wants, by setting some kind of special attribute value on the window.


    [size=5][italic][blue][RED]i[/RED]nfidel[/blue][/italic][/size]

    [code]
    $ select * from users where clue > 0
    no rows returned
    [/code]

  • lionblionb Posts: 1,685Member
    [b][red]This message was edited by lionb at 2006-3-7 11:23:57[/red][/b][hr]
    [b][red]This message was edited by lionb at 2006-3-7 11:16:6[/red][/b][hr]
    : : [b][red]This message was edited by lionb at 2006-3-6 5:57:49[/red][/b][hr]
    : :
    : : Try this
    : : Command1 control placed on Form1.
    : : [code]
    : : Private Sub Command1_Click()
    : : Form2.Show
    : : Form1.ZOrder
    : : End Sub
    : : [/code]
    :
    : Will Form1 continue to be on top if the user clicks on Form2? I think there's an API call to do what the user wants, by setting some kind of special attribute value on the window.
    :
    :
    : [size=5][italic][blue][RED]i[/RED]nfidel[/blue][/italic][/size]
    :
    : [code]
    : $ select * from users where clue > 0
    : no rows returned
    : [/code]
    :
    :
    I am not sure about API but it will, if you write code like this
    [code]
    Private Sub Form_Click() 'Form2
    Form1.ZOrder
    End Sub
    [/code]
    I think ZOrder method calls that API




  • lionblionb Posts: 1,685Member
    :
    : Will Form1 continue to be on top if the user clicks on Form2? I think there's an API call to do what the user wants, by setting some kind of special attribute value on the window.
    :
    :
    : [size=5][italic][blue][RED]i[/RED]nfidel[/blue][/italic][/size]
    :
    : [code]
    : $ select * from users where clue > 0
    : no rows returned
    : [/code]
    :
    :
    Do you mean this API SetWindowPos? I have never tried it.
Sign In or Register to comment.