borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder

AndreaVB | Forum | News | Downloads | Register | Help | Member List | Statistics | Search | PM | Profile

Print This Topic
Previous Topic (Class with an array of another class in it)Next Topic (url\'s on command buttons) New Topic New Poll Post Reply
AndreaVB Forum : VB.Net : VB.NET 2005 MsgBox Problems Solved Topic
Poster Message
gregind
Level: Protégé

Registered: 22-03-2006
Posts: 5

icon VB.NET 2005 MsgBox Problems

Im am using VB.NET 2005 Express to do some coding for an on going project. The idea is we have been working with data from an older version of a clients DB. Recently we decided it would be a good idea to update our version with their latest copy. The program is working just fine in express but there is one small problem. I use MsgBox throughout to display different stats to the user. When the user clicks ok or whatever the program continues on the problem is that parts of the message box visually stick around and so the screen looks like a mess until the program finishes ruinning the SQL statements.  The problem with this is that this program is dealing with a very large DB and so the program appears to lock up but it hasn't it is just running my SQL statements.

What can I do to get rid of the msgbox before continuing?

10-05-2006 at 02:56 PM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
steve_w
Level: Moderator


Registered: 18-04-2003
Posts: 1156
icon Re: VB.NET 2005 MsgBox Problems

Don't know if such a thing exists in vb.net , but in vb6 I would follow the msgbox with a doevents statement

MsgBox "Hello"
DoEvents
'sql stuff


Steve

10-05-2006 at 02:58 PM
View Profile Send Email to User Show All Posts | Quote Reply
gregind
Level: Protégé

Registered: 22-03-2006
Posts: 5
icon Re: VB.NET 2005 MsgBox Problems

I think you can still call that through the Application class
ie Application.DoEvents

10-05-2006 at 03:20 PM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
gregind
Level: Protégé

Registered: 22-03-2006
Posts: 5
icon Re: VB.NET 2005 MsgBox Problems

that seems to work. thanks but can i sound like a dumbass and ask why?

10-05-2006 at 03:22 PM
View Profile Send Email to User Show All Posts Visit Homepage | Quote Reply
steve_w
Level: Moderator


Registered: 18-04-2003
Posts: 1156
icon Re: VB.NET 2005 MsgBox Problems

Cos the screen drawing events need to be run, and without a doevents the program execution will not be diverted.

Steve  

10-05-2006 at 03:35 PM
View Profile Send Email to User Show All Posts | Quote Reply
AndreaVB Forum : VB.Net : VB.NET 2005 MsgBox Problems Solved Topic
Previous Topic (Class with an array of another class in it)Next Topic (url\'s on command buttons) New Topic New Poll Post Reply
Surf To:


Not Logged In? Username: Password: Lost your password?
Partners: Download Actual Software | Free Software Download
borderAndreaVB free resources for Visual Basic developersborder

borderAndreaVB Visual Basic and VB.NET source code resources - Copyright © 1999-2007 Andrea Tincaniborder