后面加上 Erase glLargeIcons
Erase glSmallIcons试试。
Erase glSmallIcons试试。
解决方案 »
- 请高手帮忙!!!
- 在mdiform中打开一个子窗口后,如何对这个子窗口进行操作?比如说在子窗口中画图。。
- Listview中列显示重复,如何解决
- 如何将listview中的内容倒出到excel(要求对应各列宽度一致)?
- 有那位高手帮我讲一个VB中COM的编写和调用的方法(200高分求教)?
- 哪位朋友抽出3分钟时间帮我用VB6.0编一个小小的程序。
- BOM算法
- 请问一下Mscomm控件的发送Ascii问题(急!)
- 请问,如何将汉字字符转化为拼音,如“刘”--〉“liu"
- 怎么使用VB的winsock(UDP)通过代理服务器发送信息?
- 怎样在注册表里替换字符?
- 请问在VB中去掉字符串两头的空格的函数是什么??
Following code can run properlyOption Explicit
Private Declare Function ExtractIcon Lib "shell32.dll" Alias "ExtractIconA" (ByVal hInst As Long, ByVal lpszExeFileName As String, ByVal nIconIndex 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 LongPrivate Declare Function ExtractIconEx Lib "shell32.dll" Alias "ExtractIconExA" (ByVal lpszFile As String, ByVal nIconIndex As Long, phiconLarge As Long, phiconSmall As Long, ByVal nIcons As Long) As Long
Private Declare Function DestroyIcon Lib "user32" (ByVal hIcon As Long) As LongPrivate Declare Function DrawIconEx Lib "user32" (ByVal hdc As Long, ByVal xLeft As Long, ByVal yTop As Long, ByVal hIcon As Long, ByVal cxWidth As Long, ByVal cyWidth As Long, ByVal istepIfAniCur As Long, ByVal hbrFlickerFreeDraw As Long, ByVal diFlags As Long) As Long
Private Sub Command1_Click()
Dim l As Long
Dim lIcons As Long
Dim mykey As String
Dim hIcon As Long, hPrevIcon
Dim hInst As Long
hInst = App.hInstance
Dim sExeName As String
sExeName = "F:\Brood\starcraft.exe"
lIcons = ExtractIcon(hInst, sExeName, -1)
If lIcons <= 0 Then Exit Sub
Dim ss As Long
Dim lIndex As IntegerFor lIndex = 0 To lIcons - 1
hIcon = ExtractIcon(hInst, sExeName, lIndex)
With PicLarge
Set .Picture = LoadPicture("")
.AutoRedraw = False
Call DrawIcon(PicLarge.hdc, 0, 0, hIcon)
DestroyIcon hIcon
End With
Next lIndex
End Sub