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

📄 frmpreview.frm

📁 较好的工程计算程序功能较强 计算桥梁的跨度等
💻 FRM
字号:
VERSION 5.00
Begin VB.Form frmPreview 
   Caption         =   "预览"
   ClientHeight    =   2610
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   10815
   LinkTopic       =   "Form2"
   ScaleHeight     =   2610
   ScaleWidth      =   10815
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command1 
      Caption         =   "返回"
      Height          =   375
      Left            =   9540
      TabIndex        =   0
      Top             =   2040
      Width           =   1035
   End
End
Attribute VB_Name = "frmPreview"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
   Unload Me
End Sub

Public Sub ReDrawAll()
   
   Dim dScale As Double '每米长度在屏幕上的大小
   Dim SigmaL As Double '梁总长度
   Dim CurrentL As Double '画笔在梁上的位置
   Dim Left As Long, Right As Long
   Dim Y As Long
   Dim FontWidth As Long
   Dim Y1 As Long
   Y1 = 500
   FontWidth = 100
   Left = 1000
   Right = frmPreview.ScaleWidth - 1000
   Y = frmPreview.ScaleHeight / 2 - 200
   SigmaL = 0
   For i = 1 To N
     SigmaL = SigmaL + L(i)
   Next
   dScale = (Right - Left) / SigmaL
   '画梁
   
   Line (Left, Y)-(Right, Y + 15), RGB(0, 0, 0), BF

   CurrentL = 0
   frmPreview.Line (Left, Y + Y1)-(Right, Y + Y1)
   frmPreview.Line (Left, Y + Y1 - 100)-(Left, Y + Y1 + 100)
   frmPreview.Line (Left - 30, Y + Y1 + 30)-(Left + 30, Y + Y1 - 30)
   For i = 1 To N
     If i > 1 Then
      CurrentL = CurrentL + L(i - 1)
       End If
     If EI(i) = 1 Then
       strei = "EI"
     Else
       strei = Format(EI(i), "#0.##") + "EI"
     End If
     frmPreview.CurrentX = Left + CurrentL * dScale + L(i) * dScale / 2 - FontWidth * Len(strei) / 2
     frmPreview.CurrentY = Y + 30
     Print strei
     frmPreview.Line (Left + (CurrentL + L(i)) * dScale, Y + Y1 - 100)-(Left + (CurrentL + L(i)) * dScale, Y + Y1 + 100)
     frmPreview.Line (Left + (CurrentL + L(i)) * dScale - 30, Y + Y1 + 30)-(Left + (CurrentL + L(i)) * dScale + 30, Y + Y1 - 30)
     strl = Format(L(i), "##0.00") + "M"
     frmPreview.CurrentX = Left + CurrentL * dScale + L(i) * dScale / 2 - FontWidth * Len(strl) / 2
     frmPreview.CurrentY = Y + Y1 - 180
     Print strl
   Next
     
     
End Sub

Private Sub Form_Paint()
   Call Me.Cls
   Call ReDrawAll
End Sub

⌨️ 快捷键说明

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