タイトル | : Re: MsgBoxのアイコン |
記事No | : 13165 |
投稿日 | : 2008/10/23(Thu) 00:25 |
投稿者 | : Blue |
LoadIcon APIでIDI_ERRORを指定すれば、アイコンハンドルが取れるので、 stdole.IPictureDispに変換するとか。
Option Explicit
Private Declare Function LoadIcon Lib "user32" Alias "LoadIconA" _ (ByVal hInstance As Long, ByVal lpIconName As Long) As Long Private Const IDI_ERROR As Long = &H7F01& Private Const IDI_QUESTION As Long = &H7F02& Private Const IDI_EXCLAMATION As Long = &H7F03& Private Const IDI_INFORMATION As Long = &H7F04&
Private Sub Command1_Click() Me.Picture1.Picture = CreateIconPicture(LoadIcon(0&, IDI_INFORMATION)) End Sub
※CreateIconPictureは http://park7.wakwak.com/~efc21/cgi-bin/exqalounge.cgi?print+200612/06120314.txt
|