Link to home
Start Free TrialLog in
Avatar of bowsermxli
bowsermxli

asked on

api FindWindowA in pb10

i try this simple code in pb10 and do not find the window.... i try the same code in pb8 and it works(return l_handle<>0):

//global external
FUNCTION ulong FindWindowA(ulong classname,string windowname) Library "user32.dll"

//script
ulong l_handle
string ls_wname

open (w1) //window with the title "Ventana de Pendientes"
ls_wname = "Ventana de Pendientes"  
l_handle = FindWindowA(0, ls_wname)
messagebox('WindowHandler',string(l_handle))


i try migrate an app from pb8 to pb10 but i use a lot of api calls... but my first trouble was most of the api calls do not work

what's wrong??

i'm using pb10.2.0 Build 8050, pb8.0.4 Build 10923

Avatar of splateaux
splateaux

We're using version 9, and have many API calls that appear to work as they did in version 8.  Worst case situation you could move to version 9, and give version 10 some time to get it's wrinkle's ironed out.
ASKER CERTIFIED SOLUTION
Avatar of gajender_99
gajender_99

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
;ansi Required if the function passes a string as an argument or returns a string that uses ANSI encoding. Even if you use the default name for an ANSI function, you must always use the ALIAS keyword if you want to specify that the string uses ANSI encoding, because you must qualify the ALIAS with the ansi keyword


Gajender

SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bowsermxli

ASKER

it works... only thing is the api calls are case sensitive then the right declare was :

FUNCTION ulong FindWindowA(ulong classname,string windowname) Library "user32.dll"  alias for "FindWindowA;Ansi"

was an error in  ...  - alias for "findwindowA;Ansi" -


....thank's