关于VB的问题 复选框
哪位高手可以解答!有三个复选框分别为上海广州巴黎其中上海为选中状态广州是未选状态巴黎是灰色状态要求是在属性代码中改我没分了但是快考试了,请高手帮帮忙额...
哪位高手可以解答! 有三个复选框分别为 上海 广州 巴黎 其中上海为选中状态 广州是未选状态 巴黎是灰色状态 要求是在属性代码中改 我没分了 但是快考试了,请高手帮帮忙额
展开
5个回答
展开全部
将下了代码复制到记事本保存,改名为form1.frm即可
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 3090
ClientLeft = 60
ClientTop = 450
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3090
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.CheckBox Check3
Caption = "巴黎"
Height = 495
Left = 480
TabIndex = 2
Top = 1560
Value = 2 'Grayed
Width = 975
End
Begin VB.CheckBox Check2
Caption = "广州"
Height = 375
Left = 1920
TabIndex = 1
Top = 720
Value = 1 'Checked
Width = 735
End
Begin VB.CheckBox Check1
Caption = "上海"
Height = 495
Left = 480
TabIndex = 0
Top = 720
Width = 1095
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
Check1.Caption = "上海"
Check2.Caption = "广州"
Check3.Caption = "巴黎"
Check1.Value = 0
Check2.Value = 1
Check3.Value = 2
End Sub
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 3090
ClientLeft = 60
ClientTop = 450
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3090
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.CheckBox Check3
Caption = "巴黎"
Height = 495
Left = 480
TabIndex = 2
Top = 1560
Value = 2 'Grayed
Width = 975
End
Begin VB.CheckBox Check2
Caption = "广州"
Height = 375
Left = 1920
TabIndex = 1
Top = 720
Value = 1 'Checked
Width = 735
End
Begin VB.CheckBox Check1
Caption = "上海"
Height = 495
Left = 480
TabIndex = 0
Top = 720
Width = 1095
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
Check1.Caption = "上海"
Check2.Caption = "广州"
Check3.Caption = "巴黎"
Check1.Value = 0
Check2.Value = 1
Check3.Value = 2
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
Private Sub Form_Load()
With Check1
.Caption = "上海"
.Value = 1
End With
With Check2
.Caption = "广州"
.Value = 0
End With
With Check3
.Caption = "巴黎"
.Enabled = 0
End With
End Sub
With Check1
.Caption = "上海"
.Value = 1
End With
With Check2
.Caption = "广州"
.Value = 0
End With
With Check3
.Caption = "巴黎"
.Enabled = 0
End With
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
Check1.Caption = "上海"
Check1.Value = vbChecked
Check2.Caption = "广州"
Check2.Value = vbUnchecked
Check3.Caption = "巴黎"
Check3.Value = vbGrayed
Check1.Value = vbChecked
Check2.Caption = "广州"
Check2.Value = vbUnchecked
Check3.Caption = "巴黎"
Check3.Value = vbGrayed
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
上海的复选框.Value=1
广州的不用改什么
巴黎的.Enabled=False
广州的不用改什么
巴黎的.Enabled=False
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询
广告 您可能关注的内容 |