Leaders dynamic_sysop Posted May 30, 2003 Leaders Posted May 30, 2003 hi can some please shed some light on this please? WIN32API this is the line within that thread that i'm after some help with.. Win32API.GetWindowText(hwnd, s, s.Capacity) how do i get Win32API to be declared? i'm using my normal method of api ( as i would in vb6 but with the changes to Integers etc ) but i saw this thread and it made me curious as to what the Win32API part is? cheers. Quote
*Gurus* divil Posted May 30, 2003 *Gurus* Posted May 30, 2003 That just means somebody has wrapped a normal declare in a class and called it Win32API :) Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
Leaders dynamic_sysop Posted May 30, 2003 Author Leaders Posted May 30, 2003 cheers :) maybe you can answer me another quick ? i have a window handle through FindWindowEx like this... Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click Dim f As Integer Dim foo As Integer Dim fCls As Integer Dim strString As New StringBuilder(256) f = FindWindowEx(wWnd, 0, "#32770", vbNullString) f = FindWindowEx(f, 0, "ATL:37242C40", vbNullString) f = FindWindowEx(f, 0, "ATL:MSNChatListView4", vbNullString) foo = GetNextWindow(f, 2) fWnd = foo fCls = GetClassName(foo, strString, strString.Capacity) Me.Text = strString.ToString() End Sub the problem is , when i try to subclass the item ( fWnd , which is an integer ) i get an error message that i cant convert an integer to intptr 'sClass = New Subclass(fWnd) '/// here the error occurs any ideas how to combat this? cheers. Quote
Leaders dynamic_sysop Posted May 31, 2003 Author Leaders Posted May 31, 2003 it's ok i got it:) Dim ipt As IntPtr ipt = IntPtr.op_Explicit(fWnd) sClass = New Subclass(ipt) Quote
Recommended Posts