Solved

Changing Forms Cursor

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
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…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

708 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

10 Experts available now in Live!

Get 1:1 Help Now