Click here to Skip to main content
16,005,162 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Please help me!!! Web Button Pin
FeRtoll25-Mar-06 2:18
FeRtoll25-Mar-06 2:18 
QuestionPlease Helpp!! Pin
İsmail Durmaz24-Mar-06 13:41
İsmail Durmaz24-Mar-06 13:41 
AnswerRe: Please Helpp!! Pin
Steve Pullan24-Mar-06 19:20
Steve Pullan24-Mar-06 19:20 
Questionhow do I start a thread? Pin
blucas200524-Mar-06 13:39
blucas200524-Mar-06 13:39 
GeneralRe: how do I start a thread? Pin
Guffa24-Mar-06 21:59
Guffa24-Mar-06 21:59 
QuestionCustom Control Propertygrid help Pin
HaloZa24-Mar-06 12:46
HaloZa24-Mar-06 12:46 
AnswerRe: Custom Control Propertygrid help Pin
Danilo Corallo10-Apr-06 3:03
Danilo Corallo10-Apr-06 3:03 
QuestionTrying to trap error messagebox brought up by broswer Pin
Rob Boucher24-Mar-06 12:26
Rob Boucher24-Mar-06 12:26 
Hi folks,
I'm wondering if anyone can give me some pointers to how to trap a MessageBox put up by a web broswer that's lauched by VB.NET. Or you can offer advice on what I should be doing.

Here's the scenario.
I'm on a Windows Server 2003 system in VB.NET. I send information up to a web site. If an error occurs, an HTML page with Javascript code is returned. That javascript contains the line

<body background="/images/comsplit1.gif" onload = loadDates(document.Schedules_form),fieldFocus(document.Schedules_form),noSchedulesFound()>

The noSchedulesFound() is an example of one of a number of function calls in the code indicating the error. All the error functions call the JavaScript alert() function with a text message, which basically brings up a message box with this information. The problem is that this is automated system running on a server. No one is going to be there to see the message box.

What I want to do is trap the message being displayed and write it somewhere else. I could of course parse through the HTML file and Javascript code, but that seems not as robust. I don't have control over that and I'd rather trap the message itself at the MessageBox level so if the structure of the messages changes, nothing breaks. It's safer to assume that it's always going bring up a Messagebox since this is an interactive HTML page. I could also intercept the HTML page and write in some
Javascript code which would send the message elsewhere, but again that is very dependent on the structure of the code.

So if I were going to trap the MessageBox, how would I do that? I've not been able to find anything on how to tell me to do that easily in VB.NET. I can't find an event I can hook when a MessageBox comes up. I'm hoping I don't have to go down to the subclassing the window level in Windows Programming. That's not something I've done before.

Any pointers would be much appreciated.



Rob
Questionhow to embed crystel report in vs 2.0 2005 express Pin
syed rahman24-Mar-06 9:50
syed rahman24-Mar-06 9:50 
Questionhow to bind datagrid view n 2.0 2005 express with radio buttons Pin
syed rahman24-Mar-06 9:47
syed rahman24-Mar-06 9:47 
QuestionHow to save image of PictureBox? Pin
NatBest24-Mar-06 5:32
NatBest24-Mar-06 5:32 
AnswerRe: How to save image of PictureBox? Pin
Guffa24-Mar-06 6:51
Guffa24-Mar-06 6:51 
AnswerRe: How to save image of PictureBox? Pin
NatBest24-Mar-06 7:45
NatBest24-Mar-06 7:45 
JokeRe: How to save image of PictureBox? Pin
Guffa24-Mar-06 9:50
Guffa24-Mar-06 9:50 
GeneralRe: How to save image of PictureBox? Pin
nzmike24-Mar-06 21:49
nzmike24-Mar-06 21:49 
AnswerRe: How to save image of PictureBox? Pin
Guffa25-Mar-06 7:36
Guffa25-Mar-06 7:36 
QuestionDeploy .chm help file wity Setup.exe Pin
nutrino14924-Mar-06 4:45
nutrino14924-Mar-06 4:45 
AnswerRe: Deploy .chm help file wity Setup.exe Pin
Ed.Poore24-Mar-06 7:48
Ed.Poore24-Mar-06 7:48 
GeneralRe: Deploy .chm help file wity Setup.exe Pin
nutrino14924-Mar-06 9:40
nutrino14924-Mar-06 9:40 
GeneralRe: Deploy .chm help file wity Setup.exe Pin
Ed.Poore24-Mar-06 10:59
Ed.Poore24-Mar-06 10:59 
GeneralRe: Deploy .chm help file wity Setup.exe Pin
nutrino14927-Mar-06 2:07
nutrino14927-Mar-06 2:07 
GeneralRe: Oops you are correct. Pin
nutrino14927-Mar-06 2:41
nutrino14927-Mar-06 2:41 
GeneralRe: Oops you are correct. Pin
Ed.Poore27-Mar-06 5:46
Ed.Poore27-Mar-06 5:46 
QuestionHow to Do a Grid Frame in Vb.net Pin
rams_988549886424-Mar-06 4:12
rams_988549886424-Mar-06 4:12 
AnswerRe: How to Do a Grid Frame in Vb.net Pin
Purple Monk24-Mar-06 4:49
Purple Monk24-Mar-06 4:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.