patulong naman po..
yun usercontrol ko, lumalabas sa panel sa from ko.
ito po kasi gusto kong mangyari, pag ni click ko yung button sa ribbon ko sa form, mag eenable yung textbox ko sa usercontrol..
ito po code sa form..
Private Sub btnNewInvoice_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNewInvoice.Click
Dim bLoad As Boolean = True
Dim f As New uscPOS
If UIPanel.HasChildren Then
If Not TypeOf (UIPanel.Controls(0)) Is uscPOS Then
bLoad = False
End If
Else
bLoad = False
End If
If bLoad Then
f.btnNewInvoice.PerformClick()
f.txtCustomerName.Enabled = True
End If
End Sub
ito yung code sa usercontrol.
Private Sub btnNewInvoice_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNewInvoice.Click
Dim y = MsgBox("na access mo ko!", MsgBoxStyle.YesNo)
If y = vbYes Then
txtCustomerName.Enabled = True
txtCustomerAddress.Enabled = True
txtContactNo.Enabled = True
End If
End Sub
trial and error lang yung silbi nung performclick.
lumalabas yung msgbox pero hindi niya na inii-enable yung textbox!
hindi ko alam kung bakit..