How to simulate mouse down on a control

W

Will Chapman

I have a tabcontrol with 3 tabpages. On page one
there is a button which starts a background process
that initiates activity that, when complete, fires an
event.

When the event fires I want to invoke a mouse tap
on another one of the tabpages so that it displays.

I have managed this (in C#) with:

tabPage3.BringToFront();

however, while this displays the content of tabPage3
the tab itself doesn't have focus (it stays with the original
tab). I've tried tabPage3.Focus() but that has no effect.

Any suggestions?
 
G

Graham McKechnie

Will,

Good to see you here Will. I see you've got the answer. Did the Palm break
or something<g>

Graham
 
W

Will Chapman

Graham said:
Will,

Good to see you here Will. I see you've got the answer. Did the Palm
break or something<g>
Hi Grum

Nope the Palm (Treo) versions of my software are working fine but
there's no doubt that the best way to write stuff for PPC is via .NET.

Being 'retired' I only have one live project and that involves using
GPS and GRPS (i.e. TCP/IP) on both PalmOS and PPC. What
is your current area of interest?

Cheers...

Will


--
Cheers.......


Will Chapman
nb Quidditch
 
W

Will Chapman

Sergey said:
Try to change tabControl.SelectedIndex property.

Sergey, that did the trick, many thanks (easy when
you know how!)

Cheers...

Will Chapman
--
Cheers.......


Will Chapman
nb Quidditch
 
G

Graham McKechnie

Will,

Went email.

Will Chapman said:
Hi Grum

Nope the Palm (Treo) versions of my software are working fine but
there's no doubt that the best way to write stuff for PPC is via .NET.

Being 'retired' I only have one live project and that involves using
GPS and GRPS (i.e. TCP/IP) on both PalmOS and PPC. What
is your current area of interest?

Cheers...

Will



--
Cheers.......


Will Chapman
nb Quidditch
 
V

Victor Paraschiv

I had the same problem. I had to use a mouse down and up for a button.
Here is my solution.
I placed a black picturebox and over it a panel (this one supports mouse
down event) with a label. The label stands for the name of the "button".
The panel was 2 pixels smaller in height and width than the picturebox
in order to create the appearence of the border.
Further implement mouse_down and up events for the panel. Don't forget
to change also la colors of the controls properly (SytemColor.Control
<-> Color.Black).
Hope this works
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top