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

📄 utilities.bas

📁 用vc+mapx制作的地理信息系统软件
💻 BAS
字号:
Attribute VB_Name = "modUtilities"
Public SDECon As New MapObjects2.DataConnection
Public bSDEConnected As Boolean

'将窗体居中
Public Sub CenterForm(frm As Form)
  frm.Top = (Screen.Height - frm.Height) \ 2
  frm.Left = (Screen.Width - frm.Width) \ 2
End Sub

'选中TextBox中的文字
Public Sub HiliteText(Ctrl As Control)
  Ctrl.SelStart = 0
  Ctrl.SelLength = Len(Ctrl)
End Sub

'将文件的完全路径分割为文件名和路径
Sub SplitPath(pathName As String, dirName As String, fileName As String)
  '寻找最后一个"\",以分割文件名和路径
  ' in the path
  Dim nCurPos As Integer, nLastPos As Integer
  Do
    nLastPos = nCurPos
    nCurPos = InStr(nCurPos + 1, pathName, "\")
  Loop Until nCurPos = 0

  If nLastPos = 0 Then Exit Sub

  Dim fname As String
  dirName = Left(pathName, nLastPos - 1)
  fname = Right(pathName, Len(pathName) - nLastPos)
  fileName = Left(fname, Len(fname) - 4)
End Sub


⌨️ 快捷键说明

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