# Flexpendant GtpuMessageBox ??

**URL:** <https://tech-community.robotics.abb.com/t/flexpendant-gtpumessagebox/4520>\
**Category:** Developer Tools\
**Created:** [November 8, 2011, 5:18pm UTC](https://tech-community.robotics.abb.com/t/flexpendant-gtpumessagebox/4520 "2011-11-08T17:18:26Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![PerM](https://avatars.discourse-cdn.com/v4/letter/p/a88e4f/32.png) [@PerM](https://tech-community.robotics.abb.com/u/PerM)\
**Post date:** [November 8, 2011, 5:18pm UTC](https://tech-community.robotics.abb.com/t/flexpendant-gtpumessagebox/4520/1 "2011-11-08T17:18:26Z")

</div>

Hi,

I hope someone can help me. I’m going to use the Flexpendant GTPUMessageBox. However, in the documentation this is only described in C#, and I’m using VB. I have tried, but not succeeded in translating.

I use the follwing to call up the msgbox:

GTPUMessageBox.Show(Me, New MessageBoxEventHandler(AddressOf\_ OnServerMessageClosed), “Do you really want to activate”, “Activate?”,\_ System.Windows.Forms.MessageBoxIcon.Question,\_ System.Windows.Forms.MessageBoxButtons.YesNo)

Is that OK to begin with?

And then, how should my event sub look like?

Help would really be appreciated. I might be completely lost here 🙂

/Per Malmqvist

---

<div class="post-metadata">

**Author:** ![Lennart\_H](https://avatars.discourse-cdn.com/v4/letter/l/ac91a4/32.png) [@Lennart\_H](https://tech-community.robotics.abb.com/u/Lennart_H)\
**Post date:** [November 9, 2011, 8:48am UTC](https://tech-community.robotics.abb.com/t/flexpendant-gtpumessagebox/4520/2 "2011-11-09T08:48:20Z")

</div>

Maybe:

Private Sub Button1\_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

GTPUMessageBox.Show(Me, New MessageBoxEventHandler(AddressOf OnServerMessageClosed), “Do you really want to activate”, “Activate?”, System.Windows.Forms.MessageBoxIcon.Question, System.Windows.Forms.MessageBoxButtons.YesNo)

End Sub

Public Sub OnServerMessageClosed(ByVal sender As Object, ByVal e As ABB.Robotics.Tps.Windows.Forms.MessageBoxEventArgs)

End Sub

---

<div class="post-metadata">

**Author:** ![PerM](https://avatars.discourse-cdn.com/v4/letter/p/a88e4f/32.png) [@PerM](https://tech-community.robotics.abb.com/u/PerM)\
**Post date:** [November 9, 2011, 11:51am UTC](https://tech-community.robotics.abb.com/t/flexpendant-gtpumessagebox/4520/3 "2011-11-09T11:51:51Z")

</div>

Thanks Lennart,

Works great.

/Per Malmqvist
