Having trouble with label_click and label_mousedown events in a pocket PC program

Sesami
02-02-2004, 02:57 PM
I recently programmed a tic-tac-toe game for the Pocket PC using Visual Basic .NET. For each square on the tic-tac-toe board, I have placed a label. I have made Label_Click and Label_MouseDown events for each of the labels.

When I build the program, I can run the program without any problems in Windows. However, when I run it on a Pocket PC or the Pocket PC emulator, the program does not respond to the click or mousedown evens with the labels. Is there any way to fix this? In the future I plan to replace the labels with pictures, would this solve the problem? Also, is there an event I can add to my code so it will respond to a click not just on a label or a form, but anywhere on the screen?

I would appreciate any help at all on this.

Thanks,

Sesami

gmeney
02-12-2004, 03:57 AM
Hello.

The Compact Framework does not support label click events. You have to implement your own label that inherits from the System.Windows.Forms.Label class that responds to click events.

You can get the code to do this at:
http://www.opennetcf.org/forums/topic.asp?TOPIC_ID=48

I have used this extensively in my PocketPC app, so let me know if you need more info.

Cheers,
Gareth.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum