Dim gsxx As String
Private Sub Check1_Click()
If Check1Value = 1 Then
Label1(2)Visible = True
Text1(1)Visible = True
Else
Label1(2)Visible = False
Text1(1)Visible = False
End If
End Sub
Private Sub Check2_Click()
If Check1Value = 1 Then
Label1(3)Visible = True
Text1(2)Visible = True
Else
Label1(3)Visible = False
Text1(2)Visible = False
End If
End Sub
Private Sub Combo1_Click()
Dim t As String, s As String, b() As String, n As Long, m As Long
t = Combo1Text
n = InStr(gsxx, t)
' MsgBox n
If n > 0 Then
s = Right(gsxx, Len(gsxx) - n)
m = InStr(s, vbCrLf)
s = Left(s, m)
If InStr(s, "|") > 0 Then
b() = Split(s, "|")
Text1(0) = b(1)
Text1(1) = b(2)
Text1(2) = b(3)
End If
End If
End Sub
Private Sub Form_Load()
Dim j As Long
gsxx = "请选择歌手|||" & vbCrLf
gsxx = gsxx & "张韶涵|北京|金牛|亲爱的那不是爱情" & vbCrLf
gsxx = gsxx & "张惠妹|台湾|狮子|你在看我吗" & vbCrLf
Label1(0) = "姓名"
Label1(1) = "地区"
Label1(2) = "星座"
Label1(3) = "热门金曲"
Combo1AddItem "请选择歌手"
Combo1AddItem "张韶涵"
Combo1AddItem "张惠妹"
Combo1ListIndex = 0
For j = 0 To Text1Count - 1
Text1(j) = ""
Next
Check1Caption = "星座"
Check2Caption = "热门金曲"
Label1(2)Visible = False
Label1(3)Visible = False
Text1(1)Visible = False
Text1(2)Visible = False
End Sub
if ”昵称“ = “喵星人” then
if "年龄" = 18 then
if "性别" = “男” then
if "所在地" = “武汉” then
if "星座" = “魔蝎座” then
if "血型" = “O” then
else
end if
else
end if
else
end if
else
end if
else
end if
else
end if
你是说这个么? 要是后面的值也有选项那就是得做集合了
新建一个label1控件和text1控件和text2控件。
text1输入月份,text2输入日,label1显示出来。
if (CINT(text1)=1 and CINT(text2)>=15 and CINT(text2)<=30) or (CINT(text1)=2 and CINT(text2)>=1 and CINT(text2)<=15) then
label1="你的星座是双子座。配对是XXX座"
else if
else if
else
出错信息。
end if
其他的都按照第一个格式去做。
Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
s = s + 1
If s Mod 2 <> 0 Then '定义让text1和2循环显示,如果只想显示两次,这里改为if s=1 then
Text1Text = X & " " & Y
Else '定义让text1和2循环显示,如果只想显示两次,这里改为elseif s=2 then
Text2Text = X & " " & Y
End If
End Sub
Private Sub Command1_Click()
Dim c As String
c = Text1Text
If c = "张锐孙冰非" Then
MsgBox "天生一对"
Else
MsgBox "星座不合哦"
End If
End Sub
Private Sub Form_Load()
Print "窗外白云飘"
Print "念你身姿娇"
Print "欲乘风追寻"
Print "若昏迷途遥"
End Sub
以上就是关于vb程序设计全部的内容,包括:vb程序设计、再发一遍,求教VB.NET 不用If做qq查找用户那样的多条件查询系统的方法、VB编个小程序等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)