VB小程序源代码.pdfVIP

  • 8
  • 0
  • 约4.96千字
  • 约 5页
  • 2022-07-26 发布于福建
  • 举报
VB 小程序 复制粘贴 Private Sub Command1_Click() Clipboard.SetText Text1.SelText End Sub Private Sub Command2_Click() Text2.SelText = Clipboard.GetText End Sub 上海问题 Private Sub Command1_Click() If Option3.Value = True Then Text1 = You are right Else Text1 = You are wrong End If End Sub 中心问题 Private Sub Form_Resize() Command1.Left = (Form1.ScaleWidth - Command1.Width) / 2 Command1.Top = (Form1.ScaleHeight - Command1.Height) / 2 Command1.Width = 0.2 * Form1.ScaleWidth End Sub 曲线问题 Private Sub Form_Paint() Scale (0, 0)-(3000, 3000) Form1.DrawWidth = 5 Form1.ForeColor = RGB(255, 0, 0) Line (0, 1500)-(3000, 1500) Line (1500, 0)-(1500, 3000) Circle (1500, 1500), 35 For x = 0 To 3000 y = 1500 - 200 * (Sin((x - 1500) * 3.1415926 / 180)) PSet (x, y) Next x End Sub 查找 Private Sub Command1_Click() a = InStr(1, Text1, Text2) Text1.SelStart = a - 1 Text1.SelLength = Len(Text2) Text1.SetFocus 1 VB 小程序 End Sub Private Sub Text1_Change() End Sub 改变字体 Private Sub Check1_Click() If Check1.Value = 1 Then Text1.Font.Name = 隶书 Else Text1.Font.Name = 宋体 End If End Sub Private Sub Check2_Click() If Check2.Value = 1 Then Text1.Font.Bold = True Else Text1.Font.Bold = False End If End Sub Private Sub Check3_Click() If Check3.Value = 1 Then Text1.Font.Italic = True Else Text1.Font.Italic = False End If End Sub Private Sub Check4_Click() If Check4.Value = 1 Then Text1.ForeColor = vbRed Else Text1.ForeColor = vbBlue End If End Sub 同步 Private Sub Text1_Change() Text2 = Text1.Text End Sub Private Sub Text2_Change() Text1 = Text2.Text End Sub Sin 函数 Private Sub Form_Paint() 2 VB 小

文档评论(0)

1亿VIP精品文档

相关文档