Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How can I make my form1 in VB6 always on top....?

Status
Not open for further replies.

Oliver76

Programmer
Oct 2, 2001
60
hello...

I have a logIn form in VB6 project, I want this LogIn.frm always on top of other applications whenever the program is in run time.... How can I do this?

tnx
 
The only way I ever came across in VB6 was to use the SetWindowPos API. A simple Google search will give you many different examples of implementation and usage.

--------------------------------------------------
Bluto: What? Over? Did you say "over"? Nothing is over until we decide it is! Was it over when the Germans bombed Pearl Harbor? No!
Otter: Germans?
Boon: Forget it, he's rolling.
--------------------------------------------------
 
If I understand your question correctly:

Form name: frmLogin

frmLogin.show vbmodal



frmLogin is a modal window and has exclusive focus, meaning, it requires user input before any other action can take place. Controls outside of the modal window(frmLogin) will not take any user interaction until the modal is dismissed.
 
vbmodal will not put your application on top of others. It will only make that particular form be top most with in your application. Other applications will still be able to set on top of it.

A dialog box is an example of application level form that is on top. The Task Manager or Windows Toolbar are examples of Top Most applications.

Unless your login form is a system level type login, then I would recommend following the Windows standard of just making it a modal form instead of Top Most.

--------------------------------------------------
Bluto: What? Over? Did you say "over"? Nothing is over until we decide it is! Was it over when the Germans bombed Pearl Harbor? No!
Otter: Germans?
Boon: Forget it, he's rolling.
--------------------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top