Click here to Skip to main content
15,891,372 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
Is Anyone tell me how to read Messagebox or AlertBox content in .net
I don't want HeaderText. I need Content of AlertBox or MessageBox.


Thank you in Advance
Posted
Updated 28-May-13 1:31am
v3
Comments
Prasad Khandekar 24-May-13 6:45am    
Hello Arun,

You can use Windows API for this purpose. Please see this MSDN documentation (http://msdn.microsoft.com/en-us/library/ms632627(VS.85).aspx). Also look at the ManageSpy code sample (http://msdn.microsoft.com/en-us/magazine/cc163617.aspx) or have a look at this link (http://msdn.microsoft.com/en-us/magazine/cc301438.aspx).

Regards,
Arun Vasu 24-May-13 7:11am    
i refer all site which you gave me.. but sorry.. i not find any exact solution
Prasad Khandekar 24-May-13 7:32am    
What you are really trying to do is called screen scraping. The sites I referred contains information on how to do this. Basically AlerBox or a MessageBox are windows and you need to retrieve the text present in one of the labels of that window. The typical steps to do this are
1. Find the matching window (by say title)
2. Get a list of child controls
3. Go through each and get the text content if supported.

This is one more link (http://stackoverflow.com/questions/5978879/how-do-i-read-messagebox-text-using-winapi)
ZurdoDev 28-May-13 9:01am    
Can you explain why so that we can understand how to help properly?
Arun Vasu 31-May-13 1:23am    
My need is:
I have one web application. After One process a page shows one message box, it may successfully inserted, or updated or its return guid() value or if any exception in process it will show in that application. My requirement is i want to read that message box content using that i need to take some action. for this i need the solutions.


This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900