Private Sub cmdformico_Click()
Dim flag As Boolean, strpicpath As String
strpicpath = ap_GetFileDialog(False, CurrentProject.Path & "\ico\*.ico", "选择指定的图片", "图标文件 (*. ico)" & Chr(0) & "*.ico" & Chr(0))
MsgBox strpicpath
SetFormIcon 0&, strpicpath
End Sub
改为
Private Sub cmdformico_Click()
Dim flag As Boolean, strpicpath As String
strpicpath = ap_GetFileDialog(False, CurrentProject.Path & "\ico\*.ico", "选择指定的图片", "图标文件 (*. ico)" & Chr(0) & "*.ico" & Chr(0))
MsgBox strpicpath
SetFormIcon Me.hWnd, strpicpath
End Sub