S
Supra
i have :
mainform
form2 had 2 textbox
class1.vb
class2.vb
how do i create form2 into class2.vb?
i couldn't do better. this is what i do.
in class2.vb
public class class2
public frm2 as form2
sub new()
MyBase.GetType()
frm2 = new form2
frm2.mdiparent !! <===== i wanted frm2 to be mdichild
end sub
Private Sub _Connection_onSeverMessage(ByVal szText As String) Handles
_Connection.onSeverMessage
DisplayMessage(frm2.text= szText.ToString)
End Sub
but i got error problem. it is comming from form2.
An unhandled exception of type 'System.NullReferenceException' occurred
in system.windows.forms.dll
Additional information: Object reference not set to an instance of an
object.
in class1.vb. i called from class2
Select Case C(1).Trim
Case "001" To "014", "251" To "272", "372" To "377",
"401", "422", "462", "468", "503"
Dim intA As Integer = CLi.IndexOf(Nick, 0)
RaiseEvent onSeverMessage(CLi.Substring(intA +
Nick.Length).ToString())
regards
mainform
form2 had 2 textbox
class1.vb
class2.vb
how do i create form2 into class2.vb?
i couldn't do better. this is what i do.
in class2.vb
public class class2
public frm2 as form2
sub new()
MyBase.GetType()
frm2 = new form2
frm2.mdiparent !! <===== i wanted frm2 to be mdichild
end sub
Private Sub _Connection_onSeverMessage(ByVal szText As String) Handles
_Connection.onSeverMessage
DisplayMessage(frm2.text= szText.ToString)
End Sub
but i got error problem. it is comming from form2.
An unhandled exception of type 'System.NullReferenceException' occurred
in system.windows.forms.dll
Additional information: Object reference not set to an instance of an
object.
in class1.vb. i called from class2
Select Case C(1).Trim
Case "001" To "014", "251" To "272", "372" To "377",
"401", "422", "462", "468", "503"
Dim intA As Integer = CLi.IndexOf(Nick, 0)
RaiseEvent onSeverMessage(CLi.Substring(intA +
Nick.Length).ToString())
regards