|
-
Feb 12th, 2004, 11:26 AM
#1
Thread Starter
Frenzied Member
get msgbox to auto click ok ?
My prog works fine if a msgbox is at a certain place in the code. I'm not sure why but if i can get it to auto click ok then im not too bothered at the moment, something like
msgbox "", vbok = true
is this possible ? The above code is just a guess at what it would do , i dont know if this is actually ok code.
thanks.
-
Feb 12th, 2004, 11:29 AM
#2
Frenzied Member
If it'll click OK automatically, why display it at all ?
"Lies, sanctions, and cruise missiles have never created a free and just society. Only everyday people can do that."
- Zack de la Rocha
Hear me roar.
-
Feb 12th, 2004, 11:34 AM
#3
Thread Starter
Frenzied Member
Its difficult to explain , a lot of trial and error used to find this out, i think think it acts as a combination of a delay plus user input.
I use msgboxes positioned at different parts of my code to debug when the code say, compiles ok but gives runtime errors, using msgboxes i can work out which part of the code runs ok, well turned out that if i have a msgbox at a certain part of my code it runs fine, i did origianlly have a sleep(x) call there but this didnt work.
-
Feb 12th, 2004, 11:38 AM
#4
Fanatic Member
Why not use breakpoints instead of message boxes?
If wishes were fishes we'd all cast nets.
-
Feb 12th, 2004, 11:41 AM
#5
Fanatic Member
If displaying the message box keeps parts of your code running, it's because it's "pausing" the program. Try sticking a doevents in at process intensive parts of your code, I'll bet that will help and you can do away with the message boxes. Making them auto click ok would lessen the "pause" they're causing in your code, so it may not end up working.
I don't know if you can make them auto click ok anyway though, but if you make your own message box with just a form, you could make that auto click. You should probably avoid that though, doesn't sound like a good work around.
-
Feb 12th, 2004, 01:16 PM
#6
Hyperactive Member
u cud use send key enter :P
-
Feb 12th, 2004, 01:18 PM
#7
Originally posted by Mr_Zer0
u cud use send key enter :P
No you can't, because a message box is shown modally, so no code will execute until you close it.
I would try to figure out what the true problem is before doing something like this.
Laugh, and the world laughs with you. Cry, and you just water down your vodka.
Take credit, not responsibility
-
Feb 12th, 2004, 03:14 PM
#8
Supreme User
Could a timer be implemented into this somehow?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|