I am trying to learn API. I started out buy using the findwindow fuction.
It did not work until I changed the return type to integer.
From:
VB Code:
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" _ (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
To:
VB Code:
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" _ (ByVal lpClassName As String, ByVal lpWindowName As String) As Integer
Everywhere I look, its show the return type as Long. If I use long, my results are just random numbers.
Why?
VB.NET 2003




Reply With Quote