⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 hanshuji3.bas

📁 用于公路、轻轨及铁路双线线间距工程计算的源程序。
💻 BAS
字号:
Attribute VB_Name = "hanshuji3"
Option Explicit

'准备打印机
Public Function ZBprint() As Boolean
 Dim strPrompt As String
 Dim intStyle As Integer
 Dim strTitle As String
 Dim intIsready As Integer
 strPrompt = "请接通打印机并安装打印纸,然后按确定键!"
 intStyle = vbOKCancel + vbInformation + vbDefaultButton2
 
 strTitle = "注意"
 intIsready = MsgBox(strPrompt, intStyle, strTitle)
 If (intIsready = vbCancel) Then
  ZBprint = False
 Else
  ZBprint = True
 End If
 End Function




Public Sub DrawRoullette(frmMe As Form, picMe As PictureBox, r1 As Integer, r2 As Integer, r As Integer)
    Dim Rotations As Integer
    Dim loop1 As Double
    Dim loop2 As Double
    Dim t As Double
    Dim x As Double
    Dim y As Double
    Dim pi As Double
       
    pi = 4 * Atn(1)
    
  If Int(r1 / r2) = r1 / r2 Then
      Rotations = 1
  Else
     Rotations = Abs(r1 / 10)
     If Int(r2 / 10) <> r2 / 10 Then Rotations = 10 * Rotations
  End If
  
  For loop1 = 1 To Rotations
    For loop2 = 0 To 2 * pi Step pi / (4 * 360)
      t = loop1 * 2 * pi + loop2
      x = (r1 + r2) * Cos(t) - (r2 + r) * Cos(((r1 + r2) / r2) * t)
      y = (r1 + r2) * Sin(t) - (r2 + r) * Sin(((r1 + r2) / r2) * t)
      frmMe.picMe.PSet (frmMe.picMe.ScaleWidth / 2 + x, frmMe.picMe.ScaleHeight / 2 + y), vbRed
    Next
      DoEvents
  Next

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -