Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Thread Tools Display Modes
Old 01-11-2001, 03:12 AM
anuragkohli anuragkohli is offline
Junior Member
Join Date: Jan 2001
Posts: 4
Default PostMessagefunction

Can we use Tapplication.Processmessages without using the postmessage function.
Reply With Quote
Old 01-11-2001, 03:24 AM
digitiger digitiger is offline
Senior Member
Join Date: Jan 2001
Posts: 716
Default RE: PostMessagefunction

though you have not given much in your question but normaly you do use them without using the other

application.processmessage is used inside long loops to make your application a little more responsive like
in following loop

i := 0;
while i < 9999999999999 do
i := i + 1;

in the above example the application will take about 3 mnts to complete the loop and if processmessages is not used then the user may get restless or he may take it as the hanged machine and more importantly he will not be able to do any other work in the meantime. but using processmessage you give him a option to do what ever he feel like in the mean time

on the other hand postmessage function is used to send the messages to some other windows programmatically

if you think the answer solves your problem reasonably then do click on the ACCEPT ANSWERE above
Reply With Quote
Old 01-11-2001, 04:49 AM
pascal.enz pascal.enz is offline
Join Date: Jan 2001
Posts: 73
Default RE: PostMessagefunction

I dont understand the question. But may be it helps to look the Windows 32 Programmers Reference to find out more about the diferences between PostMessage and SendMessage.
Reply With Quote
Old 01-11-2001, 10:57 AM
Lapince Lapince is offline
Senior Member
Join Date: Jan 2001
Posts: 163
Default RE: PostMessagefunction

These are 2 differents things :
Application.ProcessMessages allows your app to process messages coming from Windows, like Painting message, so that the interface isn't frozen during long computing...
PostMessage allows you to send a message to another window without having to wait for the window to respond.
Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump

All times are GMT. The time now is 05:00 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.