本帖最后由 nmgwddj 于 2010-3-11 19:19 编辑
我想设置替换图片后刷新图片资源。。但是这样做的话 图片就不显示了。又没有什么好办法啊!#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <TabConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=
$Form1 = GUICreate("Form1", 446, 377, 192, 114)
$Tab1 = GUICtrlCreateTab(16, 48, 409, 257)
GUICtrlCreateTabItem("数据1")
$Pic1 = GUICtrlCreatePic(@SystemDir & "\oemlogo.bmp", 88, 72, 249, 145)
$Button1 = GUICtrlCreateButton("替换", 152, 248, 121, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
bmp()
EndSwitch
WEnd
Func bmp()
FileCopy('d:\dj.bmp', 'c:\windows\system32\oemlogo.bmp', 1)
MsgBox(0, '', '替换成功')
GUICtrlDelete ($Pic1)
$Pic1 = GUICtrlCreatePic("c:\windows\system32\oemlogo.bmp", 40, 80, 190, 120)
EndFunc
|