开发者

VB6: Obtaining the picture of a label control?

开发者 https://www.devze.com 2023-02-17 15:02 出处:网络
Is it possible to obtain the \'picture\' of a label control in order to load it into a picture or image control?

Is it possible to obtain the 'picture' of a label control in order to load it into a picture or image control?

Sort of like:

 开发者_运维技巧 Picture1.Picture = Label1.Picture

Except, of course, the label control doesn't have a picture property.

Thanks!


You could utilize the GDI32 API to capture what the label looks like. Years ago I found this Microsoft article that outlines how to do it, with source: http://support.microsoft.com/kb/161299

In my case, I utilized it for capturing a form, but it should also work for capturing a label. A picture object is returned, which you could then utilize elsewhere in your app.

0

精彩评论

暂无评论...
验证码 换一张
取 消