NEED HELP WITH A BUG
Archived 2 years ago
K
hqns_
Verified
my error says "handles clause requires a withevents variable defined in the containing type or one of its base types" whenevr i try to input this code and idk hwo to fix
Public Class frmConcatenationText
Private Sub btnSubmit_Click(sender As Object, e As EventArgs) Handles btnSubmit.Click
' Concatenate the strings
Dim strResult As String = "Hello" & "World" & "!"
' Display the result on a pop-up message box
MsgBox(strResult)
End Sub
End Class
and also
Public Class frmConcatenationText
Private Sub BtnTest_Click(sender As Object, e As EventArgs) Handles btnTest.Click
Dim strResult As String
'Declare a variable to hold result of concatenated strings
Dim strValue1 As String = "Hello"
Dim StrValue2 As String = "World!"
strResult = strValue1 & StrValue2
'Combine the strings strValue1 and strValue2 MsgBox(strResult)
'Display the result on a pop-up message box
End Sub
End Class
( they do the same thing but that one bug is the only problem )

