|
Hi,
I'm developing an application that runs in a Windows CE 5.0 environment and I'm using VB.NET in Visual Studio 2008 Pro.
In a Form I have a TabControl with some pages.
My problem is to understand when a page of the TabControl is selected to perform some actions in that page automatically.
In the Compact Framework there isn't the event Control.Enter so I can't use it, that would be the right one...
Does anyone have any idea?
Thanks
|
|
|
|
|
Taking a look at the documentation....
Documentation
Shows us that the Tab Control notifies the PARENT object using WM_Notify messaging.
So you need to look into WM_Notfication messages.
A little more can be found here
Look under Notification section
|
|
|
|
|
Thank you Zaf.
You gave me some useful information.
I honestly do not know well how to use the WM_NOTIFY messages but looking on google I found various information about it, maybe something like this:
Const WM_MESSAGE_TO_MANAGE As Integer = ...
Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
If m.Msg = WM_MESSAGE_TO_MANAGE Then
End If
MyBase.WndProc(m)
End Sub
In the specific situation I solved my problem in an alternative way (I don't use more different pages of the TabControl but on a single page I add N UserControl and step from one to another with buttons and I use the Click event to do what it takes) but surely this method can be useful to me on other occasions so I will look into the subject.
Thank you very much.
|
|
|
|
|
Hello Steve,
I came across the WM_NOTIFY message and (inter?) windows messaging in the REBAR control (ribbon/taskbar) manipulation code sample on the microsoft website which also provided me with a sample implementation that i found understandable, during the time when i was learning microsoft VB5 CCE.
|
|
|
|