There are 2 possible ways to perform multiple actions with a single press of a button:
1) Create these actions in your PLC ladder logic. Your ladder logic could control output relays directly or indirectly (attached is a picture showing simple example for ladder logic).
2) In the AdvancedHMI, write the code inside the Click event to perform these actions. In addition, you could use button properties for one of the addresses.
If you double-click the button it will take you to button's Click event, where you can add code similar to this:
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
SerialDF1forSLCMicroCom1.Write("B3:0/0", "1")
SerialDF1forSLCMicroCom1.Write("B3:0/3", "1")
SerialDF1forSLCMicroCom1.Write("N7:0", "225")
SerialDF1forSLCMicroCom1.Read("N7:1")
End Sub
My suggestion: Don't use a code to write directly to Inputs or Outputs of your PLC. Setup your ladder logic instead.