Sponsored links

Go Back   MP3Car.com > Mp3Car Technical > Software & Software Development


Reply
 
Share Thread Tools Display Modes
Old 08-29-2000, 10:48 AM   #1
Variable Bitrate
 
Join Date: Nov 1999
Location: Ishoej, Denmark
Posts: 310
darkwingduck
Question Out of topic programming question (VB)

I know that this is not the place to do it ... but i guess im just a bad boy

My problem is actually very simple, i have some ado queries that take a fairly long time. During this i have the mousepointer to vbhourglass. The problem is that i would like to animate the mousepointer while waiting.

The animation it self is very easy just set
put the following in a timer
mouseicon = loadpicture("c:....")
and mousepointer = 99
and enable the timer

However i cannot get vb to change the icons while i wait for the query to complete (because the damn timer wont run until it the the program runs "idle".

Is this just a limitation in vb or am i missing something .. any suggestions greatly appreciated, since this problem annoys me ALOT.
darkwingduck is offline   Reply With Quote
Advertisement
 
Advertisement
Advertisement Sponsored links

Old 08-30-2000, 08:35 AM   #2
Constant Bitrate
 
Join Date: Jul 2000
Posts: 188
Awol][
Post

It actually I limitation of Windows and the way it handles multitasking. You might want to try a "Do Events" in your code that does the queries. This might not work but it is worth a shot.

Do Events will tell the computer to do other events while you are waiting for some command to process. (Usually it mean while access the disk or someother I/O device) This might let the timer fire so you can animate your mouse.
__________________
Awol

my $0.02 cents (value is based on the intelligence of the person reading this message)
Awol][ is offline   Reply With Quote
Old 08-30-2000, 08:59 AM   #3
Retired Admin
 
Aaron Cake's Avatar
 
Join Date: Jan 2000
Location: London, Ontario, Canada
Posts: 2,464
Aaron Cake is on a distinguished road
Cool

You chould also multithread your app. Check out the CreateThread API call. Be warned though. Sometimes it works in VB, sometimes it doesn't. Actually, most of the time it doesn't and ends up crashing either your app or KERNEL32.DLL.

------------------
Aaron Cake
London, Ontario, Canada

Player: Cyrix 200, 32MB RAM, 10.2Gig Quantum HD, Onboard EtherNet/Sound/Video, Custom Lexan Case, Arise DC-DC, Win95 Kernal w/Custom Player
Car: '86 Mazda RX-7 w/Basic Performance Upgrades
__________________
Player: Pentium 166MMX, Amptron 598LMR MB w/onboard Sound, Video, LAN, 10.2 Gig Fujitsu Laptop HD, Arise 865 DC-DC Converter, Lexan Case, Custom Software w/Voice Interface, MS Access Based Playlists
Car: 1986 Mazda RX-7 Turbo (highly modded), 1978 RX-7 Beater (Dead, parting out), 2001 Honda Insight
"If one more body-kitted, cut-spring-lowered, farty-exhausted Civic revs on me at an intersection, I swear I'm going to get out of my car and cram their ridiculous double-decker aluminium wing firmly up their rump."
Aaron Cake is offline   Reply With Quote
Old 08-31-2000, 06:48 AM   #4
Variable Bitrate
 
Join Date: Nov 1999
Location: Ishoej, Denmark
Posts: 310
darkwingduck
Post

I dont think that do events will do the trick because im awaiting the return of a recordset.

The create thread may work, ill give it a shoot as soon as i can find the time to figure it out.

Thanks for the help guys
darkwingduck is offline   Reply With Quote
Old 08-31-2000, 11:39 AM   #5
Constant Bitrate
 
Join Date: May 2000
Location: Guadalajara, Jalisco, Mexico
Posts: 127
fjmedinaa
Post

Why to animate the mouse cursor from within your program? If I recall right you could setup a windows mouse cursor for the hourglass with an animated one, so windows will do the animation itself.

Then, the moment you activate the waiting cursor, it'll start to animate... or not?
fjmedinaa is offline   Reply With Quote
Old 09-01-2000, 07:55 AM   #6
Variable Bitrate
 
Join Date: Nov 1999
Location: Ishoej, Denmark
Posts: 310
darkwingduck
Post

fjmedinaa: Im not quite clear on how you would animate the cursor the way you describe.

As far as i know, the hourglass icon is not animated (or i dont know how to activate the right one..).

If you know of a way to make it work i would be very happy to hear about it
darkwingduck is offline   Reply With Quote
Sponsored links
Advertisement
 
Advertisement
Advertisement

Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




All times are GMT -5. The time now is 07:49 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.2
Copyright © 1999 - 2008 Mp3Car.com Inc.Ad Management by RedTyger
Message Board Statistics