fswb.net
当前位置:首页>>关于在VB中有text1,text2,text3,command1在text1,text2...的资料>>

在VB中有text1,text2,text3,command1在text1,text2...

Private Sub Command1_Click()Dim a As Date, b As Datea = CDate(Text1.Text)b = CDate(Text2.Text)Text3.Text = a + bEnd Sub

代码如下: Private Sub command1_click()if isnumeric(text1.text)=Flase or text1.text="" then exit sub '如果不是数字或为空,不继续if isnumeric(text2.text)=Flase or text2.text="" then exit sub '如果不是数字或为空,不继续Text3.Text...

Option Explicit Private Sub Command1_Click() Dim myLine1() As String, myLine2() As String, i As Integer, j As Integer myLine1 = Split(Text1.Text, vbCrLf) myLine2 = Split(Text2.Text, vbCrLf) Text3.Text = "" For i = 0 To UBound(m...

Private Sub Text1_Change() AAA End Sub Sub AAA() Dim A As Integer, B As Integer A = Val(Text1.Text) B = Val(Text2.Text) If A 0 And B 0 Then C = (A + B) ^ 2 Text3.Text = C Else Text3.Text = "" End If End Sub Private Sub Text2_Ch...

Dim a, b, c, s As Integer a = Text2.Text b = Text3.Text c = Text4.Text If a > b Then s = a If a > c Then s = a Else s = c End If Else s = b If b > c Then s = b Else s = c End If End If Print s

代码不复杂: 在窗体上绘制圆的语句: Me.Circle (x, y), radius 其中:x, y就是圆心的坐标,radius就是圆半径 你的这些数据来自于文本框,那么可以这样来实现: Me.Circle (Val(Text1.text),Val(Text2.text)), Val(Text3.text)

text4的代码是:text4.text=val(text1.text)+val(text2.text)+val(text3.text),有什么不懂得还可以问我

代码如下: Private Sub Text1_Change()If IsNumeric(Text1) = False Then Exit Sub '不是数字结束Select Case Val(Text1)Case Is < 0 '小于零,不处理Case Is = 0 '等于零Text3 = Text1Case Is < 20 '大于零,小于20Text4 = Text1Case Is >= 15...

不一定非要用数据库嘛,直接把文本框text1、2、3的值赋到表格的单元格即可。 比如mshflexgrid的单元格赋值是 mshFlexGrid1.TextMatrix(r,c)=text1.text 'r、c为要赋值的行、列号

Private Sub Command1_Click() Dim x As Integer, y As Integer If IsNumeric(Text1.Text) = Flase Or Text1.Text = "" Then Exit Sub If IsNumeric(Text2.Text) = Flase Or Text2.Text = "" Then Exit Sub x = Val(Text1.Text) + Val(Text2.Tex...

网站首页 | 网站地图
All rights reserved Powered by www.fswb.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com