|
-
Apr 5th, 2000, 09:53 AM
#1
somebody has an idea ? need to get the handle of a label....
(don write now: use LABEL1.HWND ... this will not work)
taLON
-
Apr 5th, 2000, 10:08 AM
#2
Before getting a label's HWND (Hwnd is Handle of the window, so more likel you want to say Handle of the label), yes you can get it, you can get it really easily, but the thing is to be able to really get any use out of that handle, you would have to understand how the label is set as, label is a CHILD under the window that it's in, I"m not going to totally go and explain to you how to do it, but here's one way of getting the handle of your label.. get some kinda "API SPY" program and then run your program and follow the instructions of the spy and it'll give you the class name, and the handle...
-
Apr 5th, 2000, 10:34 AM
#3
ok, ok... i thing i know something about the api.
i only wanted a simple solution, because im really tired ( it now 5:30 am here).
but... problem is now already solved... and i go to bed *g*
greetz
taLON
-
Apr 5th, 2000, 04:06 PM
#4
Sorry but you can't! The simple answer is that the label doesn't have a hWnd. The label and the image are windowless controls and therefor lack a hWnd. VB draws the text you add to a label caption directly to the form.
-
Apr 7th, 2000, 01:10 PM
#5
Fanatic Member
Here is a cheating way to get the handle. Well not exactly. Stick the label inside of a picture box. Picture control has hwnd.
Chemically Formulated As:
Dr. Nitro
-
Apr 7th, 2000, 01:24 PM
#6
Addicted Member
How about using a TextBox, locking it, setting its border style to nothing, and changing its backcolor to the window backcolor? Joacim Andersson's response is correct, so you won't get it out of the Label regardless of what anyone says.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|