Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

windows forms MsgBox function OK button click event

Posted on 2016-08-04
1
Medium Priority
?
103 Views
Last Modified: 2016-08-04
Hi experts,

I have a Windows Forms application using VB as the language.

I have a windows forms page with has some textboxes and a submit button.

If you fill out the wrong data in the textboxes I have some vb code that validates the textboxes for good data.

If it's bad data I'm using MsgBox function. To display a MsgBox window with the errors.

I'm not familiar with the MsgBox function.   Right now I believe I have MsgBoxStyle property set to the MsgBoxStyle.OkOnly
Which displays an OK button in the window. If I click the OK button the windows closes.

MsgBox Function (Visual Basic)
https://msdn.microsoft.com/en-us/library/139z2azd(v=vs.90).aspx

If I want to add something to the MsgBox OK button click event.

Anyone know how to access the click event for MsgBox OK button?
0
Comment
Question by:maqskywalker
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 2000 total points
ID: 41743263
You cannot. The ok button is just to acknowledge the message and close it. If you want to add something, you just need to add the code for this something right after the msgbox statement. The MsgBox is blocking until the user actually click the ok button.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In a previous article published here at Experts Exchange, Signature Image with Transparent Background (http://www.experts-exchange.com/Web_Development/Document_Imaging/A_12380-Signature-Image-with-Transparent-Background.html), I explained how to cre…
The Adobe PDF proprietary file format is recognized as secure and formulated. But these PDF files are also prone to corruption and any external threat like virus attacks, improper storage can hit PDF file integrity.This type of damages can make cruc…
In this third video of the Xpdf series, we discuss and demonstrate the PDFtoText utility, which converts PDF files into plain text files. Download and install the software.: You may have already downloaded and installed the Xpdf tools while watching…
In this video, we show how to convert an image-only PDF file into a PDF Searchable Image file, that is, a file with both the image (typically from scanning) and text, which is created in an automated fashion with Optical Character Recognition (OCR) …

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question