-
It's probably just me but I can never get most "useful" API calls to work. Does anyone know any rules to get from the declare statement to an actual working call ??
Today's API is GetCharWidth(32), all I need is a piece of working sample code to prove that API's aren't another cruel MS Joke.
If anyone could supply me with some code I'd be very grateful. Please don't assume anything ie. variable declarations etc.
I'm trying to find the minimum width I can set for a text box, in case anyone is interested.
-
Most API, works for me. You just have to learn how to use them. Type mismaches are typical problems for some people. I'm still not sure what you're doing but if you want the width of chr(32), that is " ", You can use TextWidth (" "). If I'm=wrong then :o else :)
-
API's With strings are hard to work, I've never used GetCharWidth32 so I don't know if that takes a string or not, Huge books have been written on how to get APIs with strings working but putting ByVal Before the string when you pass it usually works.
otherwise put a break point over the api and check the Parameters when they go in, Most APIs have a meaningful return value so check that, most return 0 if they fail.
Hope this helps