找回密码
 加入
搜索
查看: 1641|回复: 4

[AU3基础] 代码出错

  [复制链接]
发表于 2010-9-2 15:15:09 | 显示全部楼层 |阅读模式
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <ListViewConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=E:\程序设计\加密解密\Form12.kxf
$Form1 = GUICreate("Form1", 492, 414, 192, 114)
$ListView1 = GUICtrlCreateListView("名称|IP|密码", 48, 72, 401, 249, -1, BitOR($GUI_SS_DEFAULT_LISTVIEWEX,$LVS_EX_GRIDLINES))
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 100)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 1, 150)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 2, 150)
$Button1 = GUICtrlCreateButton("连接", 57, 32, 89, 25)
$Button2 = GUICtrlCreateButton("添加连接", 193, 32, 89, 25)
$Button3 = GUICtrlCreateButton("删除连接", 337, 32, 89, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit

        EndSwitch
WEnd
谁帮我看看这代码错在哪里啊?
发表于 2010-9-2 15:26:18 | 显示全部楼层
$GUI_SS_DEFAULT_LISTVIEWEX

这是哪儿来的?
貌似没见过这个
发表于 2010-9-2 15:28:06 | 显示全部楼层
不清楚
以下编译通过,效果应一样吧
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <ListViewConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=E:\程序设计\加密解密\Form12.kxf
$Form1 = GUICreate("Form1", 492, 414, 192, 114)
$ListView1 = GUICtrlCreateListView("名称|IP|密码", 48, 72, 401, 249, -1, BitOR($LVS_SHOWSELALWAYS,$LVS_SINGLESEL,$LVS_EX_GRIDLINES))
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 100)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 1, 150)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 2, 150)
$Button1 = GUICtrlCreateButton("连接", 57, 32, 89, 25)
$Button2 = GUICtrlCreateButton("添加连接", 193, 32, 89, 25)
$Button3 = GUICtrlCreateButton("删除连接", 337, 32, 89, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit

        EndSwitch
WEnd
默认值(-1):$LVS_SHOWSELALWAYS, $LVS_SINGLESEL

$GUI_SS_DEFAULT_LISTVIEW 好象没有声明
发表于 2010-9-2 15:34:09 | 显示全部楼层
$GUI_SS_DEFAULT_LISTVIEWEX是不是扩展的样式啊,没见过哈呵呵
发表于 2010-9-2 20:58:48 | 显示全部楼层
#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <ListViewConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=E:\程序设计\加密解密\Form12.kxf
$Form1 = GUICreate("Form1", 492, 414, 192, 114)
$ListView1 = GUICtrlCreateListView("名称|IP|密码", 48, 72, 401, 249, -1)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 0, 100)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 1, 150)
GUICtrlSendMsg(-1, $LVM_SETCOLUMNWIDTH, 2, 150)
$Button1 = GUICtrlCreateButton("连接", 57, 32, 89, 25)
$Button2 = GUICtrlCreateButton("添加连接", 193, 32, 89, 25)
$Button3 = GUICtrlCreateButton("删除连接", 337, 32, 89, 25)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
        $nMsg = GUIGetMsg()
        Switch $nMsg
                Case $GUI_EVENT_CLOSE
                        Exit

        EndSwitch
WEnd
不知道符合不符合要求
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-9-21 22:05 , Processed in 0.077871 second(s), 21 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表