Shoutbox

delaying the parsecommand function - 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: delaying the parsecommand function (/showthread.php?tid=27881)

delaying the parsecommand function by factory on 06-29-2004 at 05:08 PM

hi i'm trying to build a addin that will allow a user to input fields of a seperate form and then send those fields as a message to another user. i've made a command and in its parsecommand function i have created a form with the fields. the problem is that i only want to populate the sResult object/variable after the user has inserted all the fields on the seperate form. therefore i need a way of delaying the completion of the parsecommand function until the user clicks on a button on the seperate form.

Overview of project
i am trying to creat a addin that will allow a user to send fields via MSN to a seperate user (or server with a dotNet passport) where the message can be decoded and its information can be submitted into fields of a table in a sequal server database automatically (making use of a receiveNotify function in an addin on the servers MSN).

the plan is also to make the client MSN to be able to configure the server MSN (using a different receiveNotify) and for the input forms on the clients to be dynamically created. this will allow anybody with the addin to be able to send data to any sequal server database that has MSN with its relevant plugin installed, provided they have access rights and they know the table and field names of the database.

ANY ideas or different ways of doing this will be much appreciated Thanx


RE: delaying the parsecommand function by Jutx on 06-29-2004 at 05:12 PM

If you are using VB then just show the form with this syntax:

Formname.Show VbModal, Screen.ActiveForm

ParseCommand will not continue until the form has been unloaded


RE: delaying the parsecommand function by factory on 06-29-2004 at 05:46 PM

sorry didn't say i was using VB.net

that doesn't seem to work
i used this line of code the show command doesn't take any parameters and it won't recognise anything without the brackets

frmXsendIssue.Show(VbModal, Screen.ActiveForm)


RE: delaying the parsecommand function by Jutx on 06-29-2004 at 06:40 PM

Can't say i know VB.net well but i still would have thought it would've worked. Anyway this should take care of it, although its not the best way of doing it.

in a module:

code:
Public StopThingy As boolean

' in ParseCommand

code:
StopThingy = False
frmXsendIssue.Show(VbModal, Screen.ActiveForm)
While StopThingy = False
Doevents
Wend

In forms unload procedure

code:
StopThingy = True


(PS: lol at my dodgy variable names)

edit: This is VB6 code by the way you may need to change it to VB.NET (but i'm sure you get the general idea)
RE: delaying the parsecommand function by RaceProUK on 06-29-2004 at 07:46 PM

I think vbModal stops the user using other windows, that's all.

I have something similar I want to do, so I'll look into it and see what I can find.


RE: delaying the parsecommand function by Choli on 06-29-2004 at 10:35 PM

quote:
Originally posted by factory
sorry didn't say i was using VB.net

that doesn't seem to work
i used this line of code the show command doesn't take any parameters and it won't recognise anything without the brackets

frmXsendIssue.Show(VbModal, Screen.ActiveForm)
what about

frmXsendIssue.ShowDialog()
;)
quote:
Originally posted by Jutx
Public StopThingy As boolean
:mipdodgy: @ StopThingy (both the name of the variable and the way of coding that)

quote:
Originally posted by Jutx
edit: This is VB6 code by the way you may need to change it to VB.NET (but i'm sure you get the general idea)
in fact, that's VB6 ;) in VB.NET the ".Show vbModal" has been replaced (i think) by ".ShowDialog()"
quote:
Originally posted by raceprouk
I think vbModal stops the user using other windows, that's all.
yes and not. the user can't use the window that "owns" the modal one.

in fact when you .Show vbModal a form, the code from that point isn't executed until the from is hidden (or unloaded? can't remember now). if the vbmodal isn't said, once the form has been loaded and shown, the code after the .Show line is executed.
RE: delaying the parsecommand function by factory on 07-01-2004 at 10:23 AM

Shot everyone, sorry was sick yesterday so didn't get to try it out! I'm on it now tho!


RE: delaying the parsecommand function by factory on 07-01-2004 at 10:42 AM

it works!!!!! shot YOU learn new things everyday! Jst to clarify i used the showDialog() function