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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a Splash Screen

Status
Not open for further replies.

dberg35

IS-IT--Management
May 12, 2006
1,003
US
I am very very new to VB so bare with me. What I am looking to do is create a splash screen so when users log on to the domain they have to agree to the terms of our corp policy. If they do not agree then the will not be able to login
 
Just create a simple form (FORM1) with your required text on. use the properties of the form to make border style fixed single. add a button (COMMAND1) saying "I AGREE" or whatever and another button (COMMAND2) saying they disagree. create the rest of your application. If you want another form to be displayed (FORM2) then add this to your COMMAND1

Sub Command1_Click()
Form2.Show
Unload Me
End Sub

If they click on command2 or try to ALT-F4 out, add these lines..

Sub Command2_Click()
Call NotAccepted
End Sub

Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
Call NotAccepted
End Sub

Sub NotAccepted()
MsgBox "You have not agreed to our terms. This program will close"
End
End Sub


 
> If they do not agree then the will not be able to login

You will find it rather tricky to get a VB program to run before the user logs in.

The registry, however, contains two setting that allow you to modify the login dialog, which would allow you to display a legal notice and warning (normal caveats about how you can render your PC inoperable if you don't know what you are doing apply):

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon

Then add or modify the following values:
LegalNoticeCaption REG_SZ Dialog Caption
LegalNoticeText REG_SZ Dialog Message

 
Great I will give this a shot...Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top