Valhalla Legends Forums Archive | Visual Basic Programming | Do Events?

AuthorMessageTime
ObsidianWolf
I know about using DoEvents in my code and such... But I was wondering what It actually does?
February 1, 2004, 12:30 AM
kamakazie
[quote author=ObsidianWolf link=board=31;threadid=5018;start=0#msg42017 date=1075595428]
I know about using DoEvents in my code and such... But I was wondering what It actually does?
[/quote]

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbenlr98/html/vafctdoevents.asp
February 1, 2004, 12:36 AM
ObsidianWolf
Was hoping for an answer that wasnt by the book, Thanks for help anyways.
February 1, 2004, 1:13 AM
kamakazie
[quote author=ObsidianWolf link=board=31;threadid=5018;start=0#msg42022 date=1075598010]
Was hoping for an answer that wasnt by the book, Thanks for help anyways.
[/quote]

Well, I don't think it can get more clear that that. It returns the current number of forms loaded and passes control over to the CPU.
February 1, 2004, 1:33 AM
Fr0z3N
How blante can I say this?

Yields execution so that the operating system can process other events.
February 1, 2004, 3:01 AM
Newby
You know, I think he could have clicked the link Fr0z3N. You didn't have to copy/paste the first line of text from that article.
February 1, 2004, 6:45 AM
Adron
I looked at the disassembly of it some time, and among other things it seemed to have a PeekMessage/DispatchMessage loop to take care of any pending window messages.
February 1, 2004, 10:49 AM
Fr0z3N
[quote author=Newby link=board=31;threadid=5018;start=0#msg42072 date=1075617948]
You know, I think he could have clicked the link Fr0z3N. You didn't have to copy/paste the first line of text from that article.
[/quote]

"Was hoping for an answer that wasnt by the book, Thanks for help anyways. "

I took that as he didn't get what he wanted by clicking the link.
February 1, 2004, 4:08 PM
Newby
Oh, okie then. :o
February 1, 2004, 10:37 PM
TheMinistered
You know, if people actually studied visual basic and KNEW what an event was... that keyword would probably make a hell of a lot more sense to them. But who am I to argue this? ;)

[MORE!]
Do -- I think we all, by now, should know what this verb means
Events -- These are sub procedures called when something happens/etc!

Do (some) events! Get it?

I think that this is the kindergarten technique of explaining the 'DoEvents' keyword!

[EVEN MORE!]

The following block of code will execute endlessly! If it executes endlessly that means that we are in trouble because specific occurances (events) will not be handled, because the program is hung in this loop. However, if inside the loop you put the 'DoEvents' keyword; the program will 'Do (Some) Events' or handle events while this loop is processing endlessly, which can be a good thing!

[code]
Do
V=V+1
Loop
[/code]
February 2, 2004, 11:35 PM

Search