This code is for a my Form + ive converted from .cs to .vb
I know Imports part are at the very top but where shall the new code starts, if that makes any sense?
I know Imports part are at the very top but where shall the new code starts, if that makes any sense?
Code:
Imports System.Collections.Generic
Imports System.ComponentModel
Imports System.Data
Imports System.Drawing
Imports System.Linq
Imports System.Text
Imports System.Windows.Forms
Namespace GameTuts
Public Partial Class Form1
Inherits Form
Public Sub New()
InitializeComponent()
End Sub
Private Sub cmdLogin_Click(sender As Object, e As EventArgs)
Dim GTL As New GameTutsLogin()
If GTL.Login(txtUsername.Text, txtPassword.Text) Then
lblUserGroup.Text = String.Format("User Group: {0}", GTL.ConvertUserGroupToName(Convert.ToInt32(GTL.ReadUserDetail("group"))))
lblUsername.Text = String.Format("Username: {0}", GTL.ReadUserDetail("usf"))
lblUserTitle.Text = String.Format("User Title: {0}", GTL.ReadUserDetail("usertitle"))
lblEmail.Text = String.Format("Email: {0}", GTL.ReadUserDetail("e"))
Else
MessageBox.Show("Incorrect username or password!", Application.ProductName, MessageBoxButtons.OK, MessageBoxIcon.[Error])
End If
End Sub
Private Sub Form1_Load(sender As Object, e As EventArgs)
End Sub
End Class
End Namespace