|
-
Apr 29th, 2001, 06:13 AM
#1
Option Explicit
Private Declare Function ExtractAssociatedIcon Lib "shell32.dll" Alias "ExtractAssociatedIconA" (ByVal hInst As Long, ByVal lpIconPath As String, lpiIcon As Long) As Long
Private Declare Function DrawIcon Lib "user32" (ByVal hDC As Long, ByVal x As Long, ByVal y As Long, ByVal hIcon As Long) As Long
Private Sub Command1_Click()
Dim hIcon As Long
hIcon = ExtractAssociatedIcon(0, "Notepad.exe", 0)
If hIcon = 0 Then Exit Sub
Call DrawIcon(Picture1.hDC, 0, 0, hIcon)
End Sub
Private Sub Command2_Click()
SavePicture Picture1.Picture, "C:/pic1.ico"
End Sub
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
|