Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Image control DC

Hi,
Does Image control have a DC?
If yes, how to find it?

Thanks.
Mike.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 214
Default Image control DC

Hi Mile510,
A control image does not have a hdc, but a userform yes. If you place the
image on the userform, you can recover the hdc with:
Private Declare Function GetDC Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" _
(ByVal lpClassName As String, ByVal lpWindowName As String) As Long

Private Sub UserForm_Initialize()
Dim MehDC As Long
MehDC = GetDC(FindWindow(vbNullString, Me.Caption))
End Sub

MP

"Mile510" a écrit dans le message de
...
Hi,
Does Image control have a DC?
If yes, how to find it?

Thanks.
Mike.


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default Image control DC

Mike510 wrote:
I assume that Image in VBA is the same as Picture Box
in VB.


Not quite. A VB picturebox is a container object. Userform controls
that are containers include frame and mulipage which do have a hWnd
(but is hard to find without a caption <g).

Jamie.

--

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Thank you very much for your help.

Thank you all for your help.

Mike.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Image control ojv[_2_] Excel Programming 2 October 13th 04 12:33 PM
image edit control JT[_2_] Excel Programming 0 September 21st 04 11:25 PM
Displaying a Tif image in the Image Control Neil Excel Programming 1 September 21st 04 12:56 AM
copy shape image into image control Luc Benninger Excel Programming 2 July 15th 04 11:14 AM
Click on Image Control disables it Wexler Excel Programming 0 October 7th 03 05:35 PM


All times are GMT +1. The time now is 03:23 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"