为您找到"
求vb编程习题,txt格式的最好,
"相关结果约100,000,000个
20、在程序代码中将图片文件mypic.jpg装入图片框Picture1的语句是___。 (A)Picture1.Picture="mypic.jpg" (B)Picture1.Image="mypic.jpg" (C)Picture1.Picture=LoadPicture("mypic.jpg")(对) (D)LoadPicture("mypic.jpg") 21、大部分控件都没有的属性是___。 (A)Top (B)Name (C)Enabled (D)Interval...
1、首先,在窗体上面添加一个文本框。2、单击文本框,在属性窗口设置文本框的属性,清空文本内容,将文本框的enabled属性设置为False。3、双击“提取信息”命令按钮,编写程序的代码,如下图所示。提取信息时,需要使用截取字符串相关的函数,如Left,Right,Mid等。本题还需要使用InStr函数查找字符。4、双击...
Private Sub Command1_Click()Dim x As Double If IsNumeric(Text1.Text) Then x = Val(Text1.Text)Text2.Text = x * (-1)Text3.Text = x * x Text4.Text = Sqr(Abs(x))Text5.Text = x * x * x Text6.Text = (Abs(x)) ^ (1 / 3)Else MsgBox ("输入的不是合法数字,...
你只要在窗口中放一个frame,再在frame中放两个label1和label2。再在frame外面放一个label3,一个command1,一个text1。其他由程序完成,程序如下:Private Sub Command1_Click()Dim Sum As String Dim N As Integer Dim I As Integer, J As Integer, K As Integer Dim S As Integer N = Va...
第一题:计算函数:Private Function JS(n As Long, x As Double) As Double Dim mResult As Double Dim i As Long mResult = 0 For i = 0 To n - 1 mResult = mResult + ((-x) ^ i) / (i + 1)Next JS = mResult End Function 第二题:Private Sub Form_Click()Dim i ...
Private Sub Command1_Click() '点击应付 a = Val(Text1) x7 = Int(a / 100) Y1 = a - x7 * 100 x6 = Int(Y1 / 50) Y2 = Y1 - x6 * 50 x5 = Int(Y2 / 20) Y3 = Y2 - x5 * 20 x4 = Int(Y3 / 10) y4 = Y3 - x5 * 10 x3 ...
1)把Text1的MultiLine属性设为 True 2)把Text1的ScroolBars属性设为 2 - Vertical 3)把Text1的Text属性设为 程序设计 4)点Text1的Font属性右面的小按钮,在出现的对话框中设置 黑体 和 三号字体 5)把Form1的Caption属性设为 设置文本框属性 练习1-16:Private Sub Form_Load()Text1.PasswordChar...
App.Path & "\1.txt" For Output As #1 For i = 2 To 100 If isPrime(i) Then If j < 5 Then tmpstr = tmpstr & Format(i, "00") & " "j = j + 1 If j = 5 Then Print #1, Trim(tmpstr)tmpstr = ""j = 0 End If End If End If Next Close #1 End Sub ...
Private Sub Command1_Click()Dim a As Single, b As LongDim n As Long, f As IntegerDim c As Singlef = 1For n = 1 To Val(Text1.Text) b = b * 10 + 3 a = b + 0.3 c = c + a * f f = -fNextLabel2.Caption = cEnd SubPrivate Sub Form_Load()Label1....
实现要求的代码如下:Private Sub Command1_Click()price = Val(Text1.Text)If price >= 200 And price < 500 Then price = price * 0.97 If price >= 500 And price < 1000 Then price = price * 0.95 If price >= 1000 And price < 2500 Then price = price * 0.92 If price ...