> sorry to appear stupid but how do i use PostMessage?

There are 4 things to do:
1) Define the message number (a constant starting from WM_USER)
2) Declare the message handler (usually in your form declaration)
3) Implement the message handler (what you want to do when the message is
delivered)
4) PostMessage to "send" the message to the window (for example the handle
of the form where you defined the handler)

Search for WM_APPSTARTUP in ICS demo programs (FtpServ1.pas and others) and
you'll see a simple usage.

Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
--
[EMAIL PROTECTED]
Author of ICS (Internet Component Suite, freeware)
Author of MidWare (Multi-tier framework, freeware)
http://www.overbyte.be


----- Original Message ----- 
From: "A49 Consultants" <[EMAIL PROTECTED]>
To: "ICS support mailing" <twsocket@elists.org>
Sent: Thursday, August 10, 2006 2:20 PM
Subject: Re: [twsocket] Can't reconnect TftpClient


> sorry to appear stupid but how do i use PostMessage?
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> Behalf Of Francois Piette
> Sent: 10 August 2006 12:54
> To: ICS support mailing
> Subject: Re: [twsocket] Can't reconnect TftpClient
>
>
> > I suspect it is to do with where i call it for the second time.
>
> Yes, indeed. But I can't help you much if you don't show your code.
> To start a second connection, I would do it from the OnRequestDone event
> when you get the reply from the Quit command. To be in the exact same
> situation as when you start it from a button click, you should use
> PostMessage to post a custom message to your form and from the
corresponding
> message handler, start your new connection just as you do from your
> buttonclick event. You may even directly call your buttonclick event
> handler.
>
>
> Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
> --
> [EMAIL PROTECTED]
> Author of ICS (Internet Component Suite, freeware)
> Author of MidWare (Multi-tier framework, freeware)
> http://www.overbyte.be
>
>
> ----- Original Message -----
> From: "A49 Consultants" <[EMAIL PROTECTED]>
> To: "ICS support mailing" <twsocket@elists.org>
> Sent: Thursday, August 10, 2006 1:45 PM
> Subject: Re: [twsocket] Can't reconnect TftpClient
>
>
> > Did that and test works properly by button press and so does my code
> > provided I press a button to call the code.
> > So for example if i want to upload twice then if i click the my upload
> > button and let it cycle til it finishes then click it a second time that
> > works perfectly.
> > but if i try to get it to run twice automatically from ONE click then it
> > always locks on the second call
> >
> > I suspect it is to do with where i call it for the second time.
> >
> > The only thing is i really need it all to be called from 1 button
> >
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > Behalf Of A49 Consultants
> > Sent: 10 August 2006 08:13
> > To: ICS support mailing
> > Subject: Re: [twsocket] Can't reconnect TftpClient
> >
> >
> > FtpTst doesn't open properly, gives following error
> >
> > Error reading FtpClient1.BandwidthLimit: Property BandwidthLimit Does
not
> > exist.
> > and
> > Error reading FtpClient1.BandwidthSampling: Property BandwidthSampling
> Does
> > not exist.
> >
> > How would i go about uninstalling package properly to reinstall?
> >
> > Thanks
> >
> >
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
> > Behalf Of Francois Piette
> > Sent: 10 August 2006 07:35
> > To: ICS support mailing
> > Subject: Re: [twsocket] Can't reconnect TftpClient
> >
> >
> > What if you try with FtpTst sample program delivered with ICS ?
> > Are you able to reconnect after the first disconnect ?
> > If not, then you have something broken in your ICS installtion.
> > If yes, then there is something wrong in your own code and it is
difficult
> > to tell you what without seeing it.
> >
> > Contribute to the SSL Effort. Visit http://www.overbyte.be/eng/ssl.html
> > --
> > [EMAIL PROTECTED]
> > Author of ICS (Internet Component Suite, freeware)
> > Author of MidWare (Multi-tier framework, freeware)
> > http://www.overbyte.be
> >
> >
> > ----- Original Message -----
> > From: "A49 Consultants" <[EMAIL PROTECTED]>
> > To: <twsocket@elists.org>
> > Sent: Thursday, August 10, 2006 12:29 AM
> > Subject: [twsocket] Can't reconnect TftpClient
> >
> >
> > > My problem is essentially very simple and It has been asked a number
of
> > > times before but i just don't understand the answers.
> > >
> > > If i connect an ftpclient, upload some files, and disconnect, then
> > > everything is fine
> > > If I attempt to reconnect It simply doens't work
> > >
> > > the memo output is as below
> > >
> > > < 257 "/public_html" is your current location
> > > Executing Requested Command
> > > > QUIT
> > > < 221-Goodbye. You uploaded 6 and downloaded 0 kbytes.
> > > < 221 Logout.
> > > Executing Requested Command
> > >
> > > you can see the logout, but it doesn't log back in again it just stops
> as
> > > above.
> > >
> > > I have tried adding
> > >
> > >   ftpclient1.Abort;
> > >
> > > before reconnecting with
> > >
> > >   ExecuteCmd(FtpClient1.Connect, FtpClient1.ConnectAsync);
> > >
> > > this changes the output slightly to
> > >
> > > > QUIT
> > > < 221-Goodbye. You uploaded 6 and downloaded 0 kbytes.
> > > < 221 Logout.
> > > Executing Requested Command
> > > < 220---------- Welcome to Pure-FTPd [TLS] ----------
> > > < 220-You are user number 1 of 50 allowed.
> > > < 220-Local time is now 15:23. Server port: 21.
> > > < 220 You will be disconnected after 15 minutes of inactivity.
> > >
> > > but it stops here instead (no mention of username or password)
> > >
> > > ftpclient1.state is ftpReady before the connect is called.
> > >
> > > I have no training as a programmer at all, which is probably why i
don't
> > > understand any of the previous answers, but i have been programming
for
> 20
> > > years
> > >
> > > Thanks for any help
> > >
> > > --
> > > To unsubscribe or change your settings for TWSocket mailing list
> > > please goto http://www.elists.org/mailman/listinfo/twsocket
> > > Visit our website at http://www.overbyte.be
> >
> > --
> > To unsubscribe or change your settings for TWSocket mailing list
> > please goto http://www.elists.org/mailman/listinfo/twsocket
> > Visit our website at http://www.overbyte.be
> >
> >
> > --
> > To unsubscribe or change your settings for TWSocket mailing list
> > please goto http://www.elists.org/mailman/listinfo/twsocket
> > Visit our website at http://www.overbyte.be
> >
> >
> > --
> > To unsubscribe or change your settings for TWSocket mailing list
> > please goto http://www.elists.org/mailman/listinfo/twsocket
> > Visit our website at http://www.overbyte.be
>
> --
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be
>
>
> -- 
> To unsubscribe or change your settings for TWSocket mailing list
> please goto http://www.elists.org/mailman/listinfo/twsocket
> Visit our website at http://www.overbyte.be

-- 
To unsubscribe or change your settings for TWSocket mailing list
please goto http://www.elists.org/mailman/listinfo/twsocket
Visit our website at http://www.overbyte.be

Reply via email to