?
Solved

set an application like a backgroud procces

Posted on 2003-03-24
10
Medium Priority
?
251 Views
Last Modified: 2010-04-04
Hi Experts,

i have an application in the System Tray, and is working well, my problem is when tha application is running (every 20 minutes) the cursor change an is set like an hour glass of course. I don't want this, i wonder if exist a way to not show the hour glass cursor while the application is proccesing.

Thanks in advance. Sorry about my english.

0
Comment
Question by:Pique
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
  • 2
10 Comments
 
LVL 2

Expert Comment

by:PeterLarsen
ID: 8197181
Does your program show a window ?
What does the program do ?
0
 

Expert Comment

by:Imagine
ID: 8197367
You have to call

application.processmessages

in your functions.
0
 
LVL 2

Expert Comment

by:PeterLarsen
ID: 8201189
It could probably solve the problem, but it shouldn't be necessarily because the program is running in its own thread.
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:Pique
ID: 8203341
Thanks Imagine. It works and Thanks PeterLarsen i want to know what do you mean and recommend of course if you have time, any way thanks. The program upload some information to a database from plain text files every 20 minutes. Also the program could show a Window but only if you want to call the procces in then middle of the period, but most of the the time the window is hide. In the other hand i have a function to animate the icon in the tray system while the upload process is running and of course it doesn't work because the program is busy in the process. Thank you.
0
 

Expert Comment

by:Imagine
ID: 8204085
No problem :-)
0
 
LVL 2

Expert Comment

by:PeterLarsen
ID: 8205275
I need to know a few informations about your program :
How do you decide when its time to upload data - and how do you animate the icon (TTimer ?) ??
0
 

Author Comment

by:Pique
ID: 8205385
In both cases i use TTimer.
0
 
LVL 2

Accepted Solution

by:
PeterLarsen earned 150 total points
ID: 8208912
The problem is that your update function probably run in a loop which leaves very little time to other processes e.g. changing the icon in the taskbar.

To solve this problem, your update function should run in its own thread (TThread). In the thread you must remember to use Sleep(50) or WaitForSingleObject. This will allow other processes to run smoothly.
0
 

Author Comment

by:Pique
ID: 8302870
Thanks a lot.
0
 
LVL 2

Expert Comment

by:PeterLarsen
ID: 8321744
thanks
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
Suggested Courses

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question