นี่โค้ดค่ะ
นี่โค้ดหน้าฟอร์มคิดเงิน
Private Sub New(ByVal CurrentString As String)
InitializeComponent()
lblPaid.Text = CurrentString
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Hide()
End Sub
Private Sub btnExchange_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExchange.Click
Label5.Text = CStr(CDbl(TextBox1.Text) - CDbl(lblPaid.Text))
End Sub
โค้ดฟอร์มสมาชิก
Private Sub btnExchange_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExchange.Click
Dim frm As New frmExchange(txtPaid.Text)
frm.ShowDialog()
End Sub
มันขึ้นErrorว่า : Error frmExchange.Private Sub New(CurrentString As String)' is not accessible in this context because it is 'Private'.
มันไม่หายอ่ะค่ะ
มันยังerror อยู่เลย
มันขึ้นว่า Error Argument not specified for parameter 'CurrentString' of 'Public Sub New(CurrentString As String)'.
นี่โค้ดค่ะ
นี่โค้ดหน้าฟอร์มคิดเงิน
Private Sub New(ByVal CurrentString As String)
InitializeComponent()
lblPaid.Text = CurrentString
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.Hide()
End Sub
Private Sub btnExchange_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExchange.Click
Label5.Text = CStr(CDbl(TextBox1.Text) - CDbl(lblPaid.Text))
End Sub
โค้ดฟอร์มสมาชิก
Private Sub btnExchange_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnExchange.Click
Dim frm As New frmExchange(txtPaid.Text)
frm.ShowDialog() *มันError ตรง frm
End Sub
มันขึ้นErrorว่า : Error frmExchange.Private Sub New(CurrentString As String)' is not accessible in this context because it is 'Private'.