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

📄 form2.frm

📁 路面结构设计系统的界面和部分功能,包括结构图的预览,路面结构模型的数据库管理
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form2 
   Caption         =   "常用路面结构和铺装结构图库"
   ClientHeight    =   8205
   ClientLeft      =   60
   ClientTop       =   390
   ClientWidth     =   12615
   LinkTopic       =   "Form2"
   ScaleHeight     =   8205
   ScaleWidth      =   12615
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command2 
      Caption         =   "退出"
      Height          =   495
      Left            =   6840
      TabIndex        =   3
      Top             =   7320
      Width           =   1215
   End
   Begin VB.CommandButton Command1 
      Caption         =   "插入到当前CAD"
      Height          =   495
      Left            =   3720
      TabIndex        =   2
      Top             =   7200
      Width           =   1215
   End
   Begin VB.ListBox List1 
      Height          =   2580
      Left            =   600
      TabIndex        =   1
      Top             =   4080
      Width           =   2415
   End
   Begin VB.FileListBox File1 
      Height          =   3330
      Left            =   600
      TabIndex        =   0
      Top             =   240
      Width           =   2415
   End
   Begin VB.Image Image1 
      BorderStyle     =   1  'Fixed Single
      Height          =   6015
      Left            =   4440
      Stretch         =   -1  'True
      Top             =   360
      Width           =   7815
   End
End
Attribute VB_Name = "Form2"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command2_Click()
Form2.Hide
End Sub

Public Sub File1_Click()
'File1.FileName
'Dim obj(3) As Double
Dim ss As String
ss = File1.FileName

'MicroSee1.OpenFile "C:\Program Files\LzxSoft\Lzx4\lib\" + ss
MsgBox ss
'MicroDrawOcx1.OpenFile "E:\学习资料\需求分析与系统设计\系统资源\路面结构\" + ss
Dim blkid As Long
Dim blkname, blkdesc, blkimg As String
Dim lstr As String
   
List1.Clear
Dim III As Integer
III = 1
'blkid = MicroDrawOcx1.GetFirstObject(-5) '得到第一个块
 'While blkid > 0
  ' blkname = MicroDrawOcx1.GetString(blkid, -309) '得到块的名称
   'blkdesc = MicroDrawOcx1.GetString(blkid, -316) '得到块的描述
               
   lstr = blkname
   blkimg = "c:\" + blkname + ".bmp" '将块保存到目录c:\temp\下(保存的路径)
  'If MicroDrawOcx1.Object2ImageEx(blkid, blkimg, 500, 500, RGB(0, 0, 255), 0) = 1 Then
      '当返回值是1(也就是打开的图片中出现块)时,将其导出到指定目录下
     Image1.Picture = LoadPicture(blkimg)             '再将块导入到Picture中
     lstr = lstr          '预览到块
  BID(III) = blkid
  III = III + 1
  'End If
   
   List1.AddItem lstr
   
   
   'blkid = MicroDrawOcx1.GetNextObject(blkid) '得到下一个块的ID号
 'Wend
End Sub

Public Sub Form_Load()
File1.Path = "E:\stdfiles\需求分析与系统设计\系统资源\路面结构"
End Sub

Public Sub List1_Click()
Dim blkid As Long
Dim blkname, blkdesc, blkimg, ss As String
Dim lstr As String
    'MsgBox List1.Text
    blkid = BID(List1.ListIndex + 1)
    blkimg = "c:\" + List1.Text + ".bmp"
  ' If MicroDrawOcx1.Object2ImageEx(blkid, blkimg, 600, 600, RGB(0, 0, 255), 0) = 1 Then
      '当返回值是1(也就是打开的图片中出现块)时,将其导出到指定目录下
  '   Image1.Picture = LoadPicture(blkimg)             '再将块导入到Picture中
   '  lstr = lstr          '预览到块
 ' End If

Image1.Refresh
   
End Sub

⌨️ 快捷键说明

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