Click to See Complete Forum and Search --> : Convert


AndyK
October 14th, 2000, 01:50 AM
I have this code which supposed to change title of a window with iHandle handle
1. titl = "hello"
2. SendMessage iHandle, WM_SETTEXT, 0&, titl



but everytime i run it it gives me errors. If i declare titl as string, it will give me type mismach on line 2. If i will declare titl as long, it will give me error on line 1. So I have no idea how to make it work because it worked before, I think on VB5 it did, but I know that this method of changing title of a window works, just not in my case :(. Please let me know what am I doing wrong. Thank You.

Programs and requests for them for FREE.
http://falstok.fly.to

Jean-Guy2000
October 14th, 2000, 09:49 AM
titl must be a Long pointer to a String Not a string. all messages take 2 LONG's as params. You have to send the string ByRef.