1.偶是菜鳥,剛接獲VB,請大家指教.2.程序如下:
Private Sub Form_Load()
Dim username As String
username = InputBox("Input your name,Please")
Dim usernames(3) As String
usernames(0) = "xiaow"
usernames(1) = "xiaol"
usernames(2) = "xioaz"
usernames(3) = "xiaoh"
Dim i As Integer
Dim f As Boolean
f = False
For i = 0 To 3
If username = usernames(i) Then
f = True
End If
Next i
If f = False Then
MsgBox "This is not name,exit system"
End
End IfEnd SubPrivate Sub Picture1_Paint()
Picture1.Print "you are welcome:" + usernameEnd Sub
3.用戶名為xiaow,如何輸出:you are welcome:xiaow4.請各位指教!呵呵...
Private Sub Form_Load()
Dim username As String
username = InputBox("Input your name,Please")
Dim usernames(3) As String
usernames(0) = "xiaow"
usernames(1) = "xiaol"
usernames(2) = "xioaz"
usernames(3) = "xiaoh"
Dim i As Integer
Dim f As Boolean
f = False
For i = 0 To 3
If username = usernames(i) Then
f = True
End If
Next i
If f = False Then
MsgBox "This is not name,exit system"
End
End IfEnd SubPrivate Sub Picture1_Paint()
Picture1.Print "you are welcome:" + usernameEnd Sub
3.用戶名為xiaow,如何輸出:you are welcome:xiaow4.請各位指教!呵呵...
解决方案 »
- 发现一个奇怪的问题,麻烦大家帮忙解释一下
- kodak imgocr控件问题
- 中秋佳节快乐--------------散分
- 各位老师帮我一下,记记记!!!!
- 如何判断库中是否存在一个表?
- 春节快乐,散分+发布SuperPlayer 1.5春节版(进者有分)(在线发送到23:30)呆鱼两个多月的心血,希望您能赏脸。试用过的请在这里提意见...
- 你问各位,现在找一位软件的工作,需要哪些条件????
- 救命!!!急急急!!!请各位大虾指点。。。。。。
- 寻求读串口(RS-232)寄存器状态的dll(送40分)
- 急,如何捕获鼠标的X,Y值?我要做一个浮动工具条
- update sz set 着色 =''' 这个句子如何处理"'"符号 在线等待。
- 不用事务该怎么办?
Dim username As String
username = InputBox("Input your name,Please")
Dim usernames(3) As String
usernames(0) = "xiaow"
usernames(1) = "xiaol"
usernames(2) = "xioaz"
usernames(3) = "xiaoh"
Dim i As Integer
Dim f As Boolean
f = False
For i = 0 To 3
If username = usernames(i) Then
f = True
msgbox "you are welcome: " & username ''''''''''''''' End If
Next i
If f = False Then
MsgBox "This is not name,exit system"
End
End IfEnd SubPrivate Sub Picture1_Paint()
Picture1.Print "you are welcome:" + usernameEnd Sub
----------------------------
NameNumber=0
For i = 0 To 3
If username = usernames(i) Then
NameNumber=i
f = True
End If
Next i
...
Picture1.Print "you are welcome:" + username(NameNumber)
//
那就改成这句了:
Picture1.Print "you are welcome:" + username(NameNumber)
可電腦提示還是錯誤!呵呵...
//
msgbox "you are welcome: " & username '''''''''''''''
那就改成这句了:
Picture1.Print "you are welcome:" & username
Dim username As String
username = InputBox("Input your name,Please")
Dim usernames(3) As String
usernames(0) = "xiaow"
usernames(1) = "xiaol"
usernames(2) = "xioaz"
usernames(3) = "xiaoh"
Dim i As Integer
Dim f As Boolean
f = False
For i = 0 To 3
If username = usernames(i) Then
f = True
'msgbox "you are welcome: " & username '''''''''''''''
Picture1.Print "you are welcome:" & username '那就改成这句了: End If
Next i
If f = False Then
MsgBox "This is not name,exit system"
End
End IfEnd Sub
MsgBox "This is not name,exit system"
End------------------------------------------
If f = False Then
MsgBox "This is not name,exit system"
else
msgbox"Welcome xxx!"
End if
用的是
GGL123() 信誉:100 2004-11-06 11:43:00
的代码通过。
Label1.Caption = "you are welcome:" & username
picture的Appearance,背景改为白色。
用的是
GGL123() 信誉:100 2004-11-06 11:43:00
的代码通过
仍不行!最好你先調試一下,再告訴偶!呵呵..在picture1中入一Label,将那句换成这句:
Label1.Caption = "you are welcome:" & username
居然到VB装菜鸟,大家听着, jimmyge(做人要厚道---葛優) 是windows的斑竹哈,不许他装菜鸟:D:D:D:D:D
' Dim username As String
UserName = InputBox("Input your name,Please")
' Dim usernames(3) As String
' usernames(0) = "xiaow"
' usernames(1) = "xiaol"
' usernames(2) = "xioaz"
' usernames(3) = "xiaoh"
' Dim i As Integer
' Dim f As Boolean
' f = False
' For i = 0 To 3
' If username = usernames(i) Then
' f = True
' End If
' Next i
' If f = False Then
' MsgBox "This is not name,exit system"
' End
'
' End If
End SubPrivate Sub Picture1_Paint()
Picture1.Print "you are welcome:" + UserName
End Sub这样吗?我没看题目啊,jimmyge(做人要厚道---葛優) 直接MSN上跟偶手啊,偶的IE有问题,55555
你的picture有问题,我的运行OK。
居然到VB装菜鸟,大家听着, jimmyge(做人要厚道---葛優) 是windows的斑竹哈,不许他装菜鸟:D:D:D:D:D
如果还不行,加模块
定义
Public UserName As String
呵呵 5.8M的vb网上有没有下的呀,帮忙找个来玩玩呀
Option ExplicitDim UserName As StringPrivate Sub Form_Load()
' Dim username As String
UserName = InputBox("Input your name,Please")
' Dim usernames(3) As String
' usernames(0) = "xiaow"
' usernames(1) = "xiaol"
' usernames(2) = "xioaz"
' usernames(3) = "xiaoh"
' Dim i As Integer
' Dim f As Boolean
' f = False
' For i = 0 To 3
' If username = usernames(i) Then
' f = True
' End If
' Next i
' If f = False Then
' MsgBox "This is not name,exit system"
' End
'
' End If
End SubPrivate Sub Picture1_Paint()
Picture1.Print "you are welcome:" + UserName
End Sub
Dim UserName As String
UserName = InputBox("Input your name,Please")
Dim usernames(3) As String
usernames(0) = "xiaow"
usernames(1) = "xiaol"
usernames(2) = "xioaz"
usernames(3) = "xiaoh"
Dim i As Integer
Dim f As Boolean
f = False
For i = 0 To 3
If UserName = usernames(i) Then
f = True
End If
Next i
If f = False Then
MsgBox "This is not name,exit system"
End
End IfEnd SubPrivate Sub Picture1_Paint()Picture1.Print "you are welcome:" & UserNameEnd Sub
Dim username As StringPrivate Sub Form_Load()
username = InputBox("Input your name,Please")
Dim usernames(3) As String
usernames(0) = "xiaow"
usernames(1) = "xiaol"
usernames(2) = "xioaz"
usernames(3) = "xiaoh"
Dim i As Integer
Dim f As Boolean
f = False
For i = 0 To 3
If username = usernames(i) Then
f = True
End If
Next i
If f = False Then
MsgBox "This is not name,exit system"
End
End IfEnd SubPrivate Sub Picture1_Paint()
Picture1.Print "you are welcome:" + usernameEnd Sub
Option ExplicitDim UserName As StringPrivate Sub Form_Load()
'Dim UserName As String
UserName = InputBox("Input your name,Please")
Dim usernames(3) As String
usernames(0) = "xiaow"
usernames(1) = "xiaol"
usernames(2) = "xioaz"
usernames(3) = "xiaoh"
Dim i As Integer
Dim f As Boolean
f = False
For i = 0 To 3
If UserName = usernames(i) Then
f = True
End If
Next i
If f = False Then
MsgBox "This is not name,exit system"
End
End IfEnd SubPrivate Sub Picture1_Paint()Picture1.Print "you are welcome:" & UserNameEnd Sub
接分!呵呵...