Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Masters :-)
Could anyone of you please translate the following into Visual Basic 2005 Code ? I am new to this and tried every trick but failed to translate. Any help would be highly appreciated. I can't use Graphics.DrawIcon as I don't have a IconFile , I am using ExtractIcon to get a handle to the Icon. Here's the VB6 which I am trying to Convert - - -- Declare Function DrawIcon Lib "user32" (ByVal hDC As Long, ByVal x As Long, ByVal Y As Long, ByVal hIcon As Long) As Long Declare Function ExtractIcon Lib "shell32.dll" Alias "ExtractIconA" (ByVal hInst As Long, ByVal lpszExeFileName As String, ByVal nIconIndex As Long) As Long Private Sub Form_Load() Dim li_hicon As Long li_hicon = ExtractIcon(li_my_hInst, "C:\WINNT\NOTEPAD.EXE", 0) picAplIcon.AutoRedraw = -1 li_retcode1 = DrawIcon(picAplIcon.hDC, picAplIcon.ScaleLeft, picAplIcon.ScaleTop, li_hicon) picAplIcon.Refresh End Sub Thanks to you all in advance!! Best Regards, Sudhansu |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You would probably be better asking in one of the NGs with .Net in their
name, rather than an Excel group. NickHK "Phoenix" wrote in message ps.com... Hi Masters :-) Could anyone of you please translate the following into Visual Basic 2005 Code ? I am new to this and tried every trick but failed to translate. Any help would be highly appreciated. I can't use Graphics.DrawIcon as I don't have a IconFile , I am using ExtractIcon to get a handle to the Icon. Here's the VB6 which I am trying to Convert - - -- Declare Function DrawIcon Lib "user32" (ByVal hDC As Long, ByVal x As Long, ByVal Y As Long, ByVal hIcon As Long) As Long Declare Function ExtractIcon Lib "shell32.dll" Alias "ExtractIconA" (ByVal hInst As Long, ByVal lpszExeFileName As String, ByVal nIconIndex As Long) As Long Private Sub Form_Load() Dim li_hicon As Long li_hicon = ExtractIcon(li_my_hInst, "C:\WINNT\NOTEPAD.EXE", 0) picAplIcon.AutoRedraw = -1 li_retcode1 = DrawIcon(picAplIcon.hDC, picAplIcon.ScaleLeft, picAplIcon.ScaleTop, li_hicon) picAplIcon.Refresh End Sub Thanks to you all in advance!! Best Regards, Sudhansu |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|