Solved

windows forms MsgBox function OK button click event

Posted on 2016-08-04
1
47 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
1 Comment
 
LVL 69

Accepted Solution

by:
Éric Moreau earned 500 total points
Comment Utility
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

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

This article focuses on how to remove password security from multiple PDF files by Adobe Acrobat program. Sometimes it is essential to access the stored data items and to print, edit as well as copy content from Portable Document Format files in abs…
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…
Sometimes we receive PDF files that are in the wrong orientation. They may be sideways or even upside down. This most commonly happens with scanned or faxed documents. It is possible to rotate the view of these PDFs with the free Adobe Reader produc…
In this sixth video of the Xpdf series, we discuss and demonstrate the PDFtoPNG utility, which converts a multi-page PDF file to separate color, grayscale, or monochrome PNG files, creating one PNG file for each page in the PDF. It does this via a c…

762 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

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now