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

Main menu login (and optional login menu login)


Ice - Fire
 Share

Recommended Posts

Dear member(s),

Ok ill make it simple,

I have source edits where the login delete, register, exit ect are at the bottom i have the news, and then i have a quick access bar it shows different text boxes and all depending on if you click the other login, register, delete, i want it so players can go to a new menu or login register and delete there accounts all on one menu but every time i try to login it says: "password must consist of apha-numeric characters" then the frmlogin pops up help is needed at the moment i do not want this message to pop up eclipse stuff posted below:

Version: Eclipse Evelution 2.7

Main menu source:

```
Option Explicit

Private Sub Form_Load()
    Dim i As Long
    Dim Ending As String

    For i = 1 To 3
        If i = 1 Then
            Ending = ".gif"
        End If

        If i = 2 Then
            Ending = ".jpg"
        End If

        If i = 3 Then
            Ending = ".png"
        End If

        If FileExists("GUI\MainMenu" & Ending) Then
            frmMainMenu.Picture = LoadPicture(App.Path & "\GUI\MainMenu" & Ending)
        End If
        Next i
    Call MainMenuInit
        frmMainMenu.Text1.Text = Trim$(ReadINI("CONFIG", "Account", App.Path & "\config.ini"))
    frmMainMenu.Text2.Text = Trim$(ReadINI("CONFIG", "Password", App.Path & "\config.ini"))

    If AutoLogin = 1 Then
        Check2.Value = Checked
        Check1.Value = Checked
    End If

    If LenB(frmMainMenu.Text2.Text) <> 0 Then
        Check1.Value = Checked
    Else
        Check1.Value = Unchecked
    End If
End Sub

Private Sub Form_GotFocus()
    If frmMirage.Socket.State = 0 Then
        frmMirage.Socket.Connect
    End If
End Sub

Private Sub picAutoLogin_Click()
    If ConnectToServer = False Or (ConnectToServer = True And AutoLogin = 1 And AllDataReceived) Then
        Call MenuState(MENU_STATE_AUTO_LOGIN)
    End If
End Sub

Private Sub picIpConfig_Click()
    Me.Visible = False
    frmIpconfig.Visible = True
End Sub

Private Sub Label1_Click()
Dim answer As String
answer = MsgBox("Pressing this button will Close Dukandia press ok to continue or cancel to return to Dukandia", vbOKCancel, "Warning...")
If answer = vbOK Then
    Call GameDestroy
    Else
    End If
End Sub

Private Sub Label15_Click()
  If AllDataReceived Then
        If LenB(Text1.Text) < 6 Then
            Call MsgBox("Your username must be at least three characters in length.")
            Exit Sub
        End If

        If LenB(Text2.Text) < 6 Then
            Call MsgBox("Your password must be at least three characters in length.")
            Exit Sub
        End If

        Call WriteINI("CONFIG", "Account", Text1.Text, (App.Path & "\config.ini"))

        If Check1.Value = Checked Then
            Call WriteINI("CONFIG", "Password", Text2.Text, (App.Path & "\config.ini"))
        Else
            Call WriteINI("CONFIG", "Password", vbNullString, (App.Path & "\config.ini"))
        End If

        If Check2.Value = Checked Then
            Call WriteINI("CONFIG", "Auto", 1, (App.Path & "\config.ini"))
        Else
            Call WriteINI("CONFIG", "Auto", 0, (App.Path & "\config.ini"))
        End If

        Call MenuState(MENU_STATE_LOGIN)
    End If
End Sub

Private Sub Label2_Click()
If ReadINI("CONFIG", "Auto", App.Path & "\config.ini") = 0 Then
    If LenB(frmLogin.txtPassword.Text) <> 0 Then
        frmLogin.Check1.Value = Checked
    Else
        frmLogin.Check1.Value = Unchecked
    End If
    frmLogin.Visible = True
    Me.Visible = False
Else
        If AllDataReceived Then
        If LenB(frmLogin.txtName.Text) < 6 Then
            Call MsgBox("Your username must be at least three characters in length.")
            Exit Sub
        End If

        If LenB(frmLogin.txtPassword.Text) < 6 Then
            Call MsgBox("Your password must be at least three characters in length.")
            Exit Sub
        End If

        Call WriteINI("CONFIG", "Account", frmLogin.txtName.Text, (App.Path & "\config.ini"))
        Call MenuState(MENU_STATE_LOGIN)
        Me.Visible = False
    End If
End If
End Sub

Private Sub Label3_Click()
    Me.Visible = False
    frmNewAccount.Visible = True
End Sub

Private Sub Label4_Click()
    frmDeleteAccount.Visible = True
    Me.Visible = False
End Sub

Private Sub lblOnline_Click()

End Sub

Private Sub picNewAccount_Click()
    Me.Visible = False
    frmNewAccount.Visible = True
End Sub

Private Sub picDeleteAccount_Click()
    frmDeleteAccount.Visible = True
    Me.Visible = False
End Sub

Private Sub picLogin_Click()
If ReadINI("CONFIG", "Auto", App.Path & "\config.ini") = 0 Then
    If LenB(frmLogin.txtPassword.Text) <> 0 Then
        frmLogin.Check1.Value = Checked
    Else
        frmLogin.Check1.Value = Unchecked
    End If
    frmLogin.Visible = True
    Me.Visible = False
Else
        If AllDataReceived Then
        If LenB(frmLogin.txtName.Text) < 6 Then
            Call MsgBox("Your username must be at least three characters in length.")
            Exit Sub
        End If

        If LenB(frmLogin.txtPassword.Text) < 6 Then
            Call MsgBox("Your password must be at least three characters in length.")
            Exit Sub
        End If

        Call WriteINI("CONFIG", "Account", frmLogin.txtName.Text, (App.Path & "\config.ini"))
        Call MenuState(MENU_STATE_LOGIN)
        Me.Visible = False
    End If
End If
End Sub

Private Sub picCredits_Click()
    Me.Visible = False
    frmCredits.Visible = True
End Sub

Private Sub picQuit_Click()
Dim answer As String
answer = MsgBox("Pressing this button will Close Dukandia press ok to continue or cancel to return to Dukandia", vbOKCancel, "Warning...")
If answer = vbOK Then
    Call GameDestroy
    Else
    End If
End Sub

Private Sub Status_Timer()
    If ConnectToServer = True Then
        If Not AllDataReceived Then
            Call SendData("givemethemax" & END_CHAR)
        Else
            lblOnline.Caption = lblOnline.Caption & " Sync with Ducandia servers succsessfull"
        End If
    Else
        picNews.Caption = "Could not connect, please check your internet connect and server status from [Duakndia sitewill go here] if you still fail to connect contact the Dukandia staff from the main site [Duakndia site posted again], Thank you"

        lblOnline.Caption = lblOnline.Caption & "  Could not find Dukandia servers"
    End If
End Sub

```
Yours truly,

- Ice
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...