📄 frmmain.frm
字号:
BeginProperty ListImage23 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":178C
Key = ""
EndProperty
BeginProperty ListImage24 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":189E
Key = ""
EndProperty
BeginProperty ListImage25 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":19B0
Key = ""
EndProperty
BeginProperty ListImage26 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":1AC2
Key = ""
EndProperty
BeginProperty ListImage27 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":1BD4
Key = ""
EndProperty
BeginProperty ListImage28 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":1CE6
Key = ""
EndProperty
BeginProperty ListImage29 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":1DF8
Key = ""
EndProperty
BeginProperty ListImage30 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":1F0A
Key = ""
EndProperty
BeginProperty ListImage31 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":201C
Key = ""
EndProperty
BeginProperty ListImage32 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":212E
Key = ""
EndProperty
BeginProperty ListImage33 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":2240
Key = ""
EndProperty
BeginProperty ListImage34 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":2352
Key = ""
EndProperty
BeginProperty ListImage35 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":2464
Key = ""
EndProperty
BeginProperty ListImage36 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":2576
Key = ""
EndProperty
BeginProperty ListImage37 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":2688
Key = ""
EndProperty
BeginProperty ListImage38 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":279A
Key = ""
EndProperty
BeginProperty ListImage39 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":28AC
Key = ""
EndProperty
BeginProperty ListImage40 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":29BE
Key = ""
EndProperty
BeginProperty ListImage41 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":2AD0
Key = ""
EndProperty
BeginProperty ListImage42 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":2BE2
Key = ""
EndProperty
BeginProperty ListImage43 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":2CF4
Key = ""
EndProperty
BeginProperty ListImage44 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":2E06
Key = ""
EndProperty
BeginProperty ListImage45 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":2F18
Key = ""
EndProperty
BeginProperty ListImage46 {2C247F27-8591-11D1-B16A-00C0F0283628}
Picture = "frmMain.frx":302A
Key = ""
EndProperty
EndProperty
End
Begin VB.Image CursorPan
Height = 480
Left = 6435
Picture = "frmMain.frx":313C
Top = 3870
Width = 480
End
Begin VB.Image CursorZoom
Height = 480
Left = 4095
Picture = "frmMain.frx":3446
Top = 3825
Width = 480
End
Begin VB.Image CursorRotate
Height = 480
Left = 4725
Picture = "frmMain.frx":3750
Top = 3825
Width = 480
End
Begin VB.Image CursorScale
Height = 480
Left = 5265
Picture = "frmMain.frx":3A5A
Top = 3870
Width = 480
End
Begin VB.Image CursorArcRotate
Height = 480
Left = 5805
Picture = "frmMain.frx":3D64
Top = 3870
Width = 480
End
Begin VB.Menu mnuFile
Caption = "&File"
Begin VB.Menu mnuFileOpen
Caption = "&Open"
Shortcut = ^O
End
Begin VB.Menu mnuFileSaveAs
Caption = "&Save as..."
Shortcut = ^S
Visible = 0 'False
End
Begin VB.Menu mnuFileSep1
Caption = "-"
End
Begin VB.Menu mnuFileProperties
Caption = "&Properties"
Shortcut = {F1}
Visible = 0 'False
End
Begin VB.Menu mnuFileMaterials
Caption = "&Materials"
Shortcut = {F2}
End
Begin VB.Menu mnuFErrors
Caption = "&Errors"
Shortcut = {F3}
End
Begin VB.Menu mnuFileSep2
Caption = "-"
End
Begin VB.Menu mnuFileExit
Caption = "E&xit"
End
End
Begin VB.Menu mnuView
Caption = "&View"
Begin VB.Menu mnuViews
Caption = "&Perspective"
Index = 0
Shortcut = {F5}
End
Begin VB.Menu mnuViews
Caption = ""
Index = 1
End
Begin VB.Menu mnuViews
Caption = "&Top"
Index = 2
Shortcut = {F7}
End
Begin VB.Menu mnuViews
Caption = "&Front"
Index = 3
Shortcut = {F6}
End
Begin VB.Menu mnuViews
Caption = "B&ottom"
Index = 4
Shortcut = {F12}
End
Begin VB.Menu mnuViews
Caption = "&Left"
Index = 5
Shortcut = {F9}
End
Begin VB.Menu mnuViews
Caption = "&Back"
Index = 6
Shortcut = {F11}
End
Begin VB.Menu mnuViews
Caption = "&Right"
Index = 7
Shortcut = {F8}
End
End
Begin VB.Menu mnuOptions
Caption = "&Options"
Begin VB.Menu mnuViewGrid
Caption = "&Grid"
Shortcut = ^G
End
Begin VB.Menu mnuWireframe
Caption = "&Wireframe"
Checked = -1 'True
Shortcut = ^W
End
Begin VB.Menu mnuViewTexture
Caption = "&Texture"
Checked = -1 'True
Shortcut = ^T
End
Begin VB.Menu mnuVCull
Caption = "&Backface cull"
Shortcut = ^B
End
End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Dim Splitting%, mx%, my%, sLength&, sStart&, oldROP%, hDCScreen&
Dim hRegion&, hBrush&, hObjOld&
Public tx&, ty& '= Screen.TwipsPerPixel
Dim LastPath$
Private Sub Form_KeyPress(KeyAscii As Integer)
GL.KeyPress KeyAscii
End Sub
Private Sub Form_Load()
Dim n As Node
optWireFrame = True
optTextures = True
Set Scene = New CScene
Set gCtl = glxCtl1
Set GL = New CGL
gCtl.Init
Set Materials = New CMaterials
Set Textures = New CTextures
'
tx = Screen.TwipsPerPixelX
ty = Screen.TwipsPerPixelY
Split.width = 6
Left = GetSetting(App.Title, "Settings", "MainLeft", 1000)
Top = GetSetting(App.Title, "Settings", "MainTop", 1000)
width = GetSetting(App.Title, "Settings", "MainWidth", 6500)
height = GetSetting(App.Title, "Settings", "MainHeight", 6500)
Set Tree3ds = frmMain.TV1
' If Tree3ds Is Nothing Then Debug.Assert 0
' Set n = Tree3ds.Nodes.Add(, , , "s1")
LastPath = GetSetting(App.Title, "Settings", "Lastpath", App.Path)
'gCtl.Animate = True
mnuViews_Click GLVIEW_FRONT
End Sub
Private Sub Form_Unload(Cancel As Integer)
Dim i&
If WindowState <> vbMinimized Then
SaveSetting App.Title, "Settings", "MainLeft", Left
SaveSetting App.Title, "Settings", "MainTop", Top
SaveSetting App.Title, "Settings", "MainWidth", width
SaveSetting App.Title, "Settings", "MainHeight", height
SaveSetting App.Title, "Settings", "Lastpath", LastPath
End If
End Sub
Private Sub Form_Resize()
Dim w&, h&, t&
On Error Resume Next
If WindowState <> 1 And ScaleHeight <> 0 Then 'tbar.Height Then
t = Toolbar1.height
'keep TV inside the form
w = TV1.width
If w > (ScaleWidth - 5) Then
w = ScaleWidth - 5
End If
h = ScaleHeight - Toolbar1.height - sts.height
TV1.Move 0, t, w, h
Split.Move w, t, 5, h
'
w = ScaleWidth - TV1.width - Split.width
If w < 0 Then w = 1
If h < 0 Then h = 1
'
glxCtl1.Move TV1.width + Split.width, t, w, h
t = glxCtl1.Top + glxCtl1.height
End If
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -