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

📄 main.bas

📁 This sample demonstrates the use of the projection objects ProjCoordSys and GeoCoordSys, and the C
💻 BAS
字号:
Attribute VB_Name = "basMain"
Option Explicit

     ' ********************************
     ' global variables for paths
     ' ********************************
Public g_DataDir As String
Public g_VBDir As String
Public g_WorkDir As String
Public g_DemoDir As String
Public g_ImageDir As String


Sub main()

     ' find the directory structure
FindPaths

     ' show the main form
frmMain.Show


End Sub

Public Sub FindPaths()
 
 Dim strLoc As String
 
 strLoc = LCase(App.Path)
 If Index(strLoc, "\vb") > 0 Then
       ' in projects
   g_DemoDir = Before(strLoc, "\vb")
  Else
   g_DemoDir = strLoc
 End If  ' If Index(strLoc, "\vb") > 0 Then

Debug.Print "basMain: Demopath = " & g_DemoDir

       ' find the required directories
g_DataDir = g_DemoDir & "\data"
g_VBDir = g_DemoDir & "\vb"
g_ImageDir = g_DemoDir & "\images"
  
End Sub

Public Sub CenterForm(frm As Form)
     ' centers the form on the screen
   frm.Top = (Screen.Height - frm.Height) \ 2
   frm.Left = (Screen.Width - frm.Width) \ 2
End Sub


⌨️ 快捷键说明

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