谁告诉我那个GUI里面的状态栏是怎么用的【已解决】
本帖最后由 love5173 于 2011-4-12 00:04 编辑当按下按钮1的时候,希望在界面上显示出来我黏贴板上的信息,请问使用什么函数,语法是怎样的
是StatusBar吗?绝对不能在GUI界面可以修改的重新点下按钮1的时候要吧原来的内容替换掉 用什么控件呢?函数我知道状态栏能不能起这个作用? 实在没看懂楼主的意思,正在看春晚,祝大家新年快乐!{:face (411):} #Region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_outfile=..\..\绑手机令牌辅助程序.exe
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <GuiStatusBar.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=d:\MyDoc\Form1.kxf
$Form1 = GUICreate("辅助程序", 235, 438, 192, 114)
$Group1 = GUICtrlCreateGroup("VPN", 24, 32, 185, 89)
$Input1 = GUICtrlCreateInput("", 48, 64, 57, 37)
GUICtrlSetFont(-1, 18, 400, 0, "MS Sans Serif")
$Button1 = GUICtrlCreateButton("变更", 128, 64, 57, 33)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group2 = GUICtrlCreateGroup("序列号", 24, 184, 185, 113)
$Button2 = GUICtrlCreateButton("copy", 80, 216, 73, 41)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$StatusBar1 = _GUICtrlStatusBar_Create($Form1)
_GUICtrlStatusBar_SetMinHeight($StatusBar1, 49)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
RunWait(@ComSpec & " /c " & 'Rasphone -h 222.162.143.66')
$c=GUICtrlRead($Input1)
RunWait(@ComSpec & " /c " & 'Rasdial 222.162.143.66 '& $c &'ip7 qazwsx')
Case $Button2
$bak = ClipGet()
RunWait(@ComSpec & " /c " & 'echo '& $bak &' >> D:\UserFile\Desktop\序列号.txt')
EndSwitch
WEnd#Region ;**** 参数创建于 ACNWrapper_GUI ****
#AutoIt3Wrapper_outfile=..\..\绑手机令牌辅助程序.exe
#EndRegion ;**** 参数创建于 ACNWrapper_GUI ****
#include <ButtonConstants.au3>
#include <EditConstants.au3>
#include <GUIConstantsEx.au3>
#include <GuiStatusBar.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=d:\MyDoc\Form1.kxf
$Form1 = GUICreate("辅助程序", 235, 438, 192, 114)
$Group1 = GUICtrlCreateGroup("VPN", 24, 32, 185, 89)
$Input1 = GUICtrlCreateInput("", 48, 64, 57, 37)
GUICtrlSetFont(-1, 18, 400, 0, "MS Sans Serif")
$Button1 = GUICtrlCreateButton("变更", 128, 64, 57, 33)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$Group2 = GUICtrlCreateGroup("序列号", 24, 184, 185, 113)
$Button2 = GUICtrlCreateButton("copy", 80, 216, 73, 41)
GUICtrlCreateGroup("", -99, -99, 1, 1)
$StatusBar1 = _GUICtrlStatusBar_Create($Form1)
_GUICtrlStatusBar_SetMinHeight($StatusBar1, 49)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case $GUI_EVENT_CLOSE
Exit
Case $Button1
RunWait(@ComSpec & " /c " & 'Rasphone -h 222.162.143.66')
$c=GUICtrlRead($Input1)
RunWait(@ComSpec & " /c " & 'Rasdial 222.162.143.66 '& $c &'ip7 qazwsx')
Case $Button2
$bak = ClipGet()
RunWait(@ComSpec & " /c " & 'echo '& $bak &' >> D:\UserFile\Desktop\序列号.txt')
EndSwitch
WEnd
我的小软件代码在上面了,我就是想实现界面显示我刚才把什么东西复制到文本里去了,能不能在下面的状态栏显示,如果能要怎么写
如果不能用什么控件合适呢? 本帖最后由 水木子 于 2011-2-3 11:32 编辑
是这个吗?
_GUICtrlStatusBar_SetText
#include <GuiStatusBar.au3>
#include <WindowsConstants.au3>
$Form1 = GUICreate("Form1", 400, 300)
$StatusBar1 = _GUICtrlStatusBar_Create($Form1)
Dim $StatusBar1_PartsWidth = [-1]
_GUICtrlStatusBar_SetParts($StatusBar1, $StatusBar1_PartsWidth)
_GUICtrlStatusBar_SetText($StatusBar1, "", 0)
$Input1 = GUICtrlCreateInput("Input1", 50, 100, 200, 21)
$Button1 = GUICtrlCreateButton("Button1", 250, 98, 75, 25)
GUISetState()
While 1
$nMsg = GUIGetMsg()
Switch $nMsg
Case -3
Exit
Case $Button1
_GUICtrlStatusBar_SetText($StatusBar1, GUICtrlRead($Input1), 0)
EndSwitch
WEnd 水木子你太帅了,嘿嘿! 呵呵!帅有个屁用,最后还是给卒吃掉。 回复 7# 水木子
ntnnd也开始开玩笑了 呵呵!帅有个屁用,最后还是给卒吃掉。
水木子 发表于 2011-2-3 11:50 http://www.autoitx.com/images/common/back.gif
呵呵,技术高的人怎么看都帅。
页:
[1]