为您找到"
Vb6.0作业程序,请问如何实现运行程序后系统自动执行并判断Text1和text...
"相关结果约100,000,000个
Private Sub Text2_LostFocus()If Text1.Text <> "" And Text2.Text <> "" Then If Text1.Text = Text2.Text Then MsgBox "一样"Else MsgBox "不一样"End If End If End Sub 如果你想text1失去焦点时也执行,可以将相同的代码放在Text1_LostFocus()中 ...
可以用VBScript和CallByName函数结合 比如说你要执行msgbox "Hello World!" 这样的语句就这样 Private Sub Command1_Click() Set vbs = CreateObject("MSScriptControl.ScriptControl") vbs.Language = "VBScript" vbs.ExecuteStatement (Text1.Text)End Sub假如你要执行“Text1.top=0”的话就用...
在窗体加一个按钮 command1 private sub command1_click()dim s as string,i as integer , alph as boolean s=ucase(text1)for i=1 to len(s)if mid(s,i,1)<="A" or mid("s",i,1)>="Z" then alph=true exit for end if next if alph=false then msgbox "文本框全为字母"els...
判断整数是if int(val(text1.text))=val(text1.text) then label1.caption= "是整数 "Text2.Text=1 else label1.caption= "不是整数 "Text2.Text=2 end if
"text1.text","text2.text"参数不要打引号 filecopy 需要完整的路径,如果在当前的工程或程序的文件夹中,则通过app.path获得。fllecopy app.path & "\"& text1.text ,app.path & "\"& text2.text & "\"& text1.text 也可以设置当前目录 chdrive "c"表示设置当前磁盘为 c盘 chdir "c:...
Command2.Caption="判断"Text1.Locked=False a=False EndSub PrivateSubCommand1_Click()Text1.Text=Int(Rnd()*100)EndSub PrivateSubCommand2_Click()IfNotaThen MsgBox"请产生一个随机数!",vbExclamation ExitSub Else MsgBoxIIf(Val(Text1.Text)Mod2=0,"是偶数","是奇数"),vbInformation a=...
if len(text1)=0 then ...end if 对比文本长度比对比文本内容要快多了!这种情况肯定是用len(sting)这种方式对比嘛。而为什么要直接用Text1而不使用Text1.Text也是因为运行速度的问题,用Text1比用Text1.text快大约40%。
if text1.text="END" ortext1.text="End" or text1.text="end" or text1.text="eNd" or text1.text="enD" then end end if 要执行Text中的VB代码,可能有点难度,要从VB6.0.LIB中提取代码并执行代码。
别被List1_Click中的Click误导了啊,这个事件的真实意义其实是只要List1中的当前选项改变了就触发,这样用鼠标单击可以改变选项,用键盘方向键也可以改变选项,所以两者都会触发List1_Click事件。另外,你可以发现ListBox控件是没有Change事件的(而ComboBox控件则有),它其实已经合并到Click事件中了。