Shoutbox

VB-form opens before sResult gets sent - Printable Version

-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Messenger Plus! for Live Messenger (/forumdisplay.php?fid=4)
+---- Forum: Scripting (/forumdisplay.php?fid=39)
+----- Forum: Plug-Ins (/forumdisplay.php?fid=28)
+------ Thread: VB-form opens before sResult gets sent (/showthread.php?tid=14968)

VB-form opens before sResult gets sent by zigomar10 on 08-29-2003 at 09:25 AM

When I type the following code:

code:
If (StrComp(LCase(sCommand), "/xform", vbTextCompare) = 0) Then
        sResult = "I am opening a form..."
        frm1.Show vbModal, Screen.ActiveForm
        ParseCommand = True
        Exit Function
End If

the form opens before "I am opening a form..." gets sent on the network. :@+o(8o|:S:o:blah:. is there any way to avoid that? :rolleyes: *-)
RE: VB-form opens before sResult gets sent by chris on 08-29-2003 at 10:40 AM

what are you makeing?


RE: VB-form opens before sResult gets sent by Whacko on 08-29-2003 at 11:00 AM

i suggest you read a bit more about programming ;)

nah just kidding :P

sResult is the RESULT of the function your executing so its sent as the function result when the function ends. everything else in the function is executed immediately. so thats why the form is opened before the text is sent.


RE: VB-form opens before sResult gets sent by wipey on 08-29-2003 at 02:19 PM

timer?:P


RE: VB-form opens before sResult gets sent by Choli on 08-29-2003 at 06:39 PM

quote:
Originally posted by zigomar10
the form opens before "I am opening a form..." gets sent on the network. :@+o(8o|:S:o:blah:. is there any way to avoid that? :rolleyes: *-)

Of course it opens before the string is sent. That's because Plus! is "who" sends the sResult and it only gets it after the ParseCommand function has finished and then that function has already executed the .Show method.
RE: VB-form opens before sResult gets sent by wipey on 08-29-2003 at 09:00 PM

try putting sResult = .... after the msgbox code, if that dont work then maybe use a timer to delay the messagebox


RE: RE: VB-form opens before sResult gets sent by Whacko on 08-29-2003 at 10:01 PM

quote:
Originally posted by wipey
try putting sResult = .... after the msgbox code, if that dont work then maybe use a timer to delay the messagebox




ehm lol?? the point is... he wants to display the message BEFORE the form opens :P
RE: VB-form opens before sResult gets sent by wipey on 08-29-2003 at 10:22 PM

shh I'm slow:P....I still think timer if it's in vb:P:D