Solved

Changing Forms Cursor

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
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…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…

695 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