PDA

View Full Version : visual bascs mesage boxes



drumgodmaggott
03-28-2009, 01:06 AM
ok so i have googled this issues but i am looking for someone to help me better understand it.

i got bored and started making an extremely simple VB code but i ran into a problem i thought as a joke it would be funny to make the same message box appear 7 times in a row but it they all pop up in the same spot which takes all the annoyance and fun out of the joke so can anyone tell me how i can make a simple ok box pop up in different places on the screen???

And also why isn't the first msgboxes with dont deny the truth poping up when i try and cancel the box if i click ok or cancel all that shows up is i knew it was true why does this happen??:confused:


strName = InputBox ("ENTER YOUR NAME BELOW")
msgbox strName &(" sucks big floppy donkey balls!!!")
if strName=VBcancel then
msgbox("don't deny the truth!")
msgbox("don't deny the truth!")
msgbox("don't deny the truth!")
msgbox("don't deny the truth!")
msgbox("don't deny the truth!")
msgbox("don't deny the truth!")
msgbox("don't deny the truth!")
else
msgbox("i knew it was true")
msgbox("i knew it was true")
msgbox("i knew it was true")
msgbox("i knew it was true")
msgbox("i knew it was true")
msgbox("i knew it was true")
msgbox("i knew it was true")
end if

Moonbat
03-28-2009, 04:31 PM
After Googling it up, it seems a little complex. VB by default doesn't contain a simple method for positioning text boxes. This Microsoft Help and Support article (http://support.microsoft.com/kb/*80**6) seems to have the answer, but you have to use the Windows API.

drumgodmaggott
03-28-2009, 08:29 PM
yea i looked at that article but just like you said its complex i knmow i could do it but i don't want to spend the time doing it that way just for a joke now if im making and application it would be worth it im sure...

im wondering if their is a fault in Vb that if you code it right will accidentally reposition boxes???

drumgodmaggott
04-05-2009, 10:51 PM
that sounds like a good idea daniel