'给窗口设置图标
'SetWinIco(sWnd as HWnd ,Ico as String ) 
'Ico  资源里的名称，就是FF 图像库里的名称
Sub SetWinIco(sWnd as HWnd, Ico as String) '给窗口设置图标
   Dim as HICON aa
   Dim bb as LRESULT
   aa = LoadIcon(app.hInstance, Ico) '从资源里加载图标
   bb = SendMessage(sWnd, WM_SETICON, ICON_BIG, Cast(LPARAM, aa))
   If bb <> 0 Then DeleteObject Cast(HGDIOBJ, bb)
   bb = SendMessage(sWnd, WM_SETICON, ICON_SMALL, Cast(LPARAM, aa))
   If bb <> 0 Then DeleteObject Cast(HGDIOBJ, bb)
   DeleteObject aa
   '// 设置窗口的大小图标
   '// 大图标：按下ALT+Tab键切换窗口时对应的图标
   '// 小图标：就是窗口左上角对应的那个图标
   '::SendMessage(HWnd, WM_SETICON, ICON_BIG, (LPARAM)hIcon);
   '::SendMessage(HWnd, WM_SETICON, ICON_SMALL, (LPARAM)hIcon);
End Sub