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.請各位指教!呵呵...
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
接分!呵呵...