Solved

Changing Forms Cursor

Posted on 1997-06-28
2
170 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Mobile Keyboard covers the display of the TMemo 3 78
LAN or WAN ? 11 81
tvirtualstringtree freeze when load too manny images 10 52
Base1 Encode/Decode 3 67
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…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Both in life and business – not all partnerships are created equal. As the demand for cloud services increases, so do the number of self-proclaimed cloud partners. Asking the right questions up front in the partnership, will enable both parties …

911 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now