Howdy, Stranger!

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

Categories

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,688Member ✭✭
    [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,688Member ✭✭
    [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,688Member ✭✭
    :
    : 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.