substitute for Handle property in CF

  • Thread starter Thread starter saima ashraf
  • Start date Start date
S

saima ashraf

Hi,
I need a handle to a control in VB.NET CF. Now the problem is that
control.Handle property is not supported in Compact Framework. Anybody
has any idea , how to do it? I do not want to use any win32 routines for
this.

Plz help.
regards,
Saima.
 
Hi All,
Tahnks for the replies. you are right it is only possible through the
win32 api calls.I got it working now.Btw the Getcapture method is not
working instead the "GetFocus()as intptr" is doing the job.

regards,
Saima.

The sample code is as below:

'*********************************************
Imports System.Runtime.InteropServices
' import the window function declaration as follows
Declare Function GetFocus Lib "CoreDll.dll" () As IntPtr
' do as follows in any method
Dim hwnd As IntPtr = GetFocus
 
Back
Top