madhatter5501
asked on
Learning VB
I am trying to learn VB and am trying to create a simple form with the following code, what am I doing wrong? and if anyone has any input on how to learn VB I would appreciate the direction.
Public Class Form1
Dim msg As String
Dim title As String
Dim style As MsgBoxStyle
Dim response As MsgBoxResult
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Close()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
MsgBox("ok", MsgBoxStyle.OkCancel)
If MsgBoxResult.Ok Then
Close()
else
If MsgBoxResult.Cancel Then
MsgBox("are you sure you want to cancel", MsgBoxStyle.YesNo)
End If
End If
End Sub
End Class
Public Class Form1
Dim msg As String
Dim title As String
Dim style As MsgBoxStyle
Dim response As MsgBoxResult
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Close()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
MsgBox("ok", MsgBoxStyle.OkCancel)
If MsgBoxResult.Ok Then
Close()
else
If MsgBoxResult.Cancel Then
MsgBox("are you sure you want to cancel", MsgBoxStyle.YesNo)
End If
End If
End Sub
End Class
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
...what else did you need to know?
ASKER
I am looking for the best way to learn VB - Free Websites, Programs... I'll post another link for more points since this is closed.
ASKER