In order for this site to work correctly we need to store a small file (called a cookie) on your computer. Most every site in the world does this, however since the 25th of May 2011, by law we have to get your permission first. Please abandon the forum if you disagree.

Para que este foro funcione correctamente es necesario guardar un pequeño fichero (llamado cookie) en su ordenador. La mayoría de los sitios de Internet lo hacen, no obstante desde el 25 de Marzo de 2011 y por ley, necesitamos de su permiso con antelación. Abandone este foro si no está conforme.

PostQuitMessage()

Xailer English public forum
Responder
ChrisGillard
Mensajes: 384
Registrado: Mar May 01, 2007 5:49 pm

PostQuitMessage()

Mensaje por ChrisGillard »

I want to force my application to quit after a user fails at the login
screen ...
The login form is modal so I was hoping to set the nModalResult in the login
form & detect its valye back in the main form.
Depending on the value I am using PostQuitMessage( n ) ... no effect at
present.
nResult := LoginForm():New( self ):ShowModal()
if nResult <> 1
MsgInfo( str( nResult ) ) .... this works OK
// Want to close the app
PostQuitMessage( 1 ) ... this does nothing ?
endif
Not sure if this is a way to do this, not sure what value n to put in the
message either.
Any thoughts would be appreciated please.
Chris
Gejza Horvath
Mensajes: 281
Registrado: Mar Ago 15, 2006 1:50 pm

PostQuitMessage()

Mensaje por Gejza Horvath »

Chris,
try on the msdn http://msdn2.microsoft.com/en-us/library/ms644945.aspx
Gejza Horvath
"Chris Gillard" <chris@bluesquare.co.uk> pí¹e v diskusním pøíspìvku
news:4651d379$[email=1@ozsrv2.ozlan.local...]1@ozsrv2.ozlan.local...[/email]
>I want to force my application to quit after a user fails at the login screen ...
>
> The login form is modal so I was hoping to set the nModalResult in the login form &
> detect its valye back in the main form.
>
> Depending on the value I am using PostQuitMessage( n ) ... no effect at present.
>
>
> nResult := LoginForm():New( self ):ShowModal()
>
> if nResult <> 1
> MsgInfo( str( nResult ) ) .... this works OK
> // Want to close the app
> PostQuitMessage( 1 ) ... this does nothing ?
> endif
>
> Not sure if this is a way to do this, not sure what value n to put in the message
> either.
>
> Any thoughts would be appreciated please.
>
> Chris
>
>
>
>
Avatar de Usuario
jfgimenez
Site Admin
Mensajes: 5718
Registrado: Lun Abr 06, 2015 8:48 pm
Contactar:

PostQuitMessage()

Mensaje por jfgimenez »

Chris,
read these posts:
http://sailingwithxailer.blogspot.com/2 ... nced-xaile r-techniques-application_27.html
http://sailingwithxailer.blogspot.com/2 ... nced-xaile r-techniques-application.html
I belive this is what you are looking for.
--
Regards,
Jose F. Gimenez
http://www.xailer.com
http://www.xailer.info
José F. Giménez
[Equipo de Xailer / Xailer team]
http://www.xailer.com
http://www.xailer.info
ChrisGillard
Mensajes: 384
Registrado: Mar May 01, 2007 5:49 pm

PostQuitMessage()

Mensaje por ChrisGillard »

Jose,
I had read this & printed it a couple of weeks ago ... I have used the
tecnhique and is working ok.
Thank you.
Chris
"Jose F. Gimenez" <jfgimenez@wanadoo.es> wrote in message
news:4651e069$[email=1@ozsrv2.ozlan.local...]1@ozsrv2.ozlan.local...[/email]
> Chris,
>
> read these posts:
> http://sailingwithxailer.blogspot.com/2 ... nced-xaile r-techniques-application_27.html
> http://sailingwithxailer.blogspot.com/2 ... nced-xaile r-techniques-application.html
>
> I belive this is what you are looking for.
>
>
> --
> Regards,
>
> Jose F. Gimenez
> http://www.xailer.com
> http://www.xailer.info
>
ChrisGillard
Mensajes: 384
Registrado: Mar May 01, 2007 5:49 pm

PostQuitMessage()

Mensaje por ChrisGillard »

Gejza,
Thanks for that ... I must remember msdn.
I will try to understand what it is telling me.
Chris
"Gejza Horvath" <_hsoftkn@nextra.sk> wrote in message
news:[email=4651d7af@ozsrv2.ozlan.local...]4651d7af@ozsrv2.ozlan.local...[/email]
> Chris,
>
> try on the msdn http://msdn2.microsoft.com/en-us/library/ms644945.aspx
>
>
> Gejza Horvath
>
>
> "Chris Gillard" <chris@bluesquare.co.uk> pí¹e v diskusním pøíspìvku
> news:4651d379$[email=1@ozsrv2.ozlan.local...]1@ozsrv2.ozlan.local...[/email]
>>I want to force my application to quit after a user fails at the login
>>screen ...
>>
>> The login form is modal so I was hoping to set the nModalResult in the
>> login form & detect its valye back in the main form.
>>
>> Depending on the value I am using PostQuitMessage( n ) ... no effect at
>> present.
>>
>>
>> nResult := LoginForm():New( self ):ShowModal()
>>
>> if nResult <> 1
>> MsgInfo( str( nResult ) ) .... this works OK
>> // Want to close the app
>> PostQuitMessage( 1 ) ... this does nothing ?
>> endif
>>
>> Not sure if this is a way to do this, not sure what value n to put in the
>> message either.
>>
>> Any thoughts would be appreciated please.
>>
>> Chris
>>
>>
>>
>>
>
>
Responder