Log in

View Full Version : Hide Wait icon


djmayes
05-24-2003, 11:27 AM
Can an expert help an amateur beginner?

IPAQ3850 – pc2002 – eVBasic

How can I hide (or replace, or move) the system Wait Icon (rotating colored circle sectors in in grey square) which appears when loading a large bitmap file into a PictureBox using Picturebox1.DrawPictre “Test.bmp”, x, y. If I want to load a series of bitmaps or reload with the bitmap scrolled ( eg change x or y) the Icon hides the centre of the current bit map which I want to continue looking at whilst the new one is loading.

I have tried DestroyCursor(), EndWaitCursor() etc with no effect except compile error messages!!

Any ideas will be received with thanks

Don

Pony99CA
05-25-2003, 08:07 AM
Can an expert help an amateur beginner?

IPAQ3850 – pc2002 – eVBasic

How can I hide (or replace, or move) the system Wait Icon (rotating colored circle sectors in in grey square) which appears when loading a large bitmap file into a PictureBox using Picturebox1.DrawPictre “Test.bmp”, x, y. If I want to load a series of bitmaps or reload with the bitmap scrolled ( eg change x or y) the Icon hides the centre of the current bit map which I want to continue looking at whilst the new one is loading.

I have tried DestroyCursor(), EndWaitCursor() etc with no effect except compile error messages!!

The point of the wait cursor is so that the user knows the computer hasn't hung up. Getting rid of it may well make the user think he needs to soft reset the device.

Why would you need to see the center of the image? Are you doing some sort of animation that the wait cursor would cover? If so, either each bitmap should load so fast that a wait cursor is not required or I'd think your animation will look jerky.

Steve

djmayes
05-25-2003, 11:01 AM
Hi Steve

Thanks for your comments - very valiid.

I probably didn't make my requirment clear. I want to remove the cursor from within my application whilst it is running, not for good.

The application is driving a map from GPS where the the users position is in the centre of the map which scrolls as one drives along the road.

One can update the position from say every 5secs upwards. To have the wait cursor appear every time the map redraws in a new position when studying the map is a bit annoying.

One solution is to make the map bmp file smaller. I hope there is a expert who has a better solution.

Regards

Don

Pony99CA
05-25-2003, 03:42 PM
I probably didn't make my requirment clear. I want to remove the cursor from within my application whilst it is running, not for good.

No, that part was clear. I figured it was just for your application, but I wanted to make sure you knew even that could be a bad idea. However, given the explanation below, I now understand why you want to do that.

The application is driving a map from GPS where the the users position is in the centre of the map which scrolls as one drives along the road.

One can update the position from say every 5secs upwards. To have the wait cursor appear every time the map redraws in a new position when studying the map is a bit annoying.

I'm not a VB programmer, but does DrawPicture turn on the wait cursor automatically? If so, there's not likely much you can do without changing your architecture.

For example, could you load the bitmap into memory, then bitblt it onto the screen? I think that's like double buffering.

Steve

djmayes
05-27-2003, 04:00 PM
Hi Steve

Thanks for your post

The Wait Cursor seems to be associated with file transfers (or display of files).
The cursor appears when I download a .bmp file to display it – as explained before.
It also shows when ActveSync is downloading my eVB programs to the PDA,
and when using the PDA stand alone and opening a large directory (Windows) using FileExplorer.

However if I run a simple test application to copy a file from the storage card to iPAQ file store
I get no cursor, in spite of the fact that it takes 5 to 10 times as long to do the transfer as it does to download the file for display.

Thanks for the suggestion to load the display from memory – this heartened me!

In fact I find that this is what happens in VB6 on my desktop. A few lines do this

Private Sub Form_Load()
Image1.Picture LoadPicture(“map.bmp”)
Image1.Visible = False
End Sub

Private Command1_Click()
Picture1.PaintPicture Image1.Picture, x1,y1,w1,h1,x2.y2,w2,h2
End Sub

The first Sub loads the map into memory and the second takes it from memory and scrolls and sizes using x1…h2.
It then puts it into the PictureBox. This works fast even on my old
166MHz machine! (The manual says “PaintPicture can be used in place of BitBlt”).
I know little about API calls but I did manage to get the above to work with BitBlt – more or less!!

However with eVB the above code snippet will not work. The equivalent to PaintPicure is DrawPicture
and will only draw from .bmp files not memory.
Probably due to my limited knowledge I could not get BitBlt to work at all since in eVB,
since unlike VB6, PictureBoxes don’t appear to have a hDC;
forms do, but you can’t DrawPicture on to forms.
At that stage I gave up and went out and did some gardening!!

I guess I am back to making my Map tiles smaller.

Thanks for your help.

Don

djmayes
05-30-2003, 11:45 AM
I have solved it!

Use the S309PictureBox control (Free download .ocx files etc from MSDN library) It has a WaitCursor True/False property - plus dozens more.