Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[EO] Very Simple Log-In Delay


adr990
 Share

Recommended Posts

Hello everyone,

I wanted to add a delay on login, to avoid kind of problems you could possibly have if there wasn't a delay. :P
There probably are like almost none, but just in case.

Well here is the code:

Make a picturebox in frmMenu (I have it all over the Menu).
Name the picture box "delaypic", and set it to False.

Find "If isLoginLegal(txtLUser.text, txtLPass.text) Then", under "Private Sub lblLAccept_Click()", in frmMenu.

Replace everything under it with:
```
    MsgBox "Please wait a while, until the Delay is over."
        frmMenu.delaypic.Visible = True
          frmMenu.delaypic.Picture = LoadPicture(App.Path & "\data files\graphics\load\" & "delay.bmp")
    Sleep 10000
        frmMenu.delaypic.Visible = False
          Call MenuState(MENU_STATE_LOGIN)
                End If

    ' Error handler
    Exit Sub
errorhandler:
    HandleError "lblLAccept_Click", "frmMenu", Err.Number, Err.Description, Err.Source, Err.HelpContext
    Err.Clear
    Exit Sub
End Sub
```
Ofcourse you can modify it to what every suits you.
I've got the idea from Reign of London's Eyecatch Framework.

And yes, I know the 'Msgbox' probably could be like a GUI pop up, I probably will update the tutorial for that later.

~Adr990
Link to comment
Share on other sites

@adr990:

> frmMenu.delaypic.Picture = LoadPicture(App.Path & "\data files\graphics\load\" & "delay.bmp")

If it's only loading one image, shouldn't you just hard-code it, with the properties?

Still, it's a cool and simple addition, that can have a good use.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...