AdvancedHMI Software
General Category => Support Questions => Topic started by: MrPike on December 29, 2014, 10:02:25 PM
-
I am trying to create someway to have an acknowledgement message or "popup" that has controls on it. As in if I add a "TEST" button and press it then a message appears that says "ARE YOU SURE". On this message is the BasicButton "YES" that actually initiates the test. I figure I can just create another form and show/hide it but i was trying to avoid creating more drivers/subscriptions to the same device Im already communicating with. how can I do this in the same form that is already open? thanks
-
- Add a Button to your form from the All Windows Forms group
- Double click the button and add the code:
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
If MsgBox("Are you sure?", Microsoft.VisualBasic.MsgBoxStyle.YesNo) = MsgBoxResult.Yes Then
ModbusRTUCom1.Write("40001", "1")
End If
End Sub