Solved

Changing Forms Cursor

Posted on 1997-06-28
2
176 Views
Last Modified: 2010-04-04
I am having problems with cursor in Deplhi.

I have a TQuery Component. I change the SQL statement property programaticaly in this control. Before I change the SQL statement I first close the query and when the new SELECT statement is formed I open the query to show the new
data.

Before closing the query I change cursor to hourglass and change it to default after opening the query. Here I have problems because, cursor changes to default before opening the query. The cursor changes only when I first open the query. Then it doesn't change any more. It is like the lines for changing cursor are ignored. The cursor stays default.
0
Comment
Question by:marko020397
2 Comments
 
LVL 1

Accepted Solution

by:
sleach earned 100 total points
ID: 1337936
Try placing:

Application.processmessages;

immediately after the line of code that changes the cursor.

That should force any pending messages to be processed.
Hope this does the trick ;)


0
 
LVL 4

Author Comment

by:marko020397
ID: 1337937
I have tried it but it didn't help.

I have solved the problem just after I sent the question.
I used forms variable Cursor like this

Cursor := crHourGlass;

Then I tried Screens variable Cursor and now it works just fine:

Screen.Cursor := crHourGlass;
0

Featured Post

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Syntax Check Delphi Seattle IOS app without MAC ? 1 97
FMX StringGrid1->Canvas->FillRect Problem 3 151
Printing problem 2 93
Firemonkey allowing RTL on android 6 32
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
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…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

773 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