开发者

VB6: Obtaining the picture of a label 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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜