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

📄 改变mapinfo professional 的标题.mb

📁 很多的MAPINFO的常见问题下载后可以学习很有帮助
💻 MB
字号:
Include "MENU.DEF"
Include "MAPBASIC.DEF"

Declare Sub Main()
Declare Sub EndApp
Declare SUb SetMIWinText

Declare Function GetActiveWindow32 Lib "user32" Alias "GetActiveWindow" () As Integer
Declare Function GetActiveWindow Lib "User" () as SmallInt
Declare Function GetWindowText32 Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Integer, lpString As String, ByVal cch As Integer) As Integer
Declare Function GetWindowText Lib "User" (ByVal hWnd As SmallInt, lpString As String, ByVal aInt As SmallInt) As SmallInt
Declare Function SetWindowText32 Lib "user32" Alias "SetWindowTextA" (ByVal hwnd As Integer, ByVal lpString As String) As Integer
Declare Sub      SetWindowText Lib "User" (ByVal hWnd As SmallInt, ByVal Str As String)

Sub Main()
	Create Menu "&API Calls" As
		"Set MapInfo Window Text..."    Calling SetMIWinText,
    		"&Remove API Calls"             Calling EndApp
	Alter Menu Bar Add "API Calls"
End Sub

Sub EndApp
	Alter Menu Bar Remove "API Calls"
	Terminate Application "AAAAAAA.mbx"
End Sub

Sub SetMIWinText
  Dim sWinText As String
  Dim n, nWin, nRes As Integer

  If SystemInfo(SYS_INFO_MIPLATFORM) = MIPLATFORM_WIN32 Then
    nWin = GetActiveWindow32()
  ElseIf SystemInfo(SYS_INFO_MIPLATFORM) = MIPLATFORM_WIN16 Then
    nWin = GetActiveWindow()
  End If
 
 Dialog Title "Enter Text"
    Control EditText  Position 8,12  Value sWinText Into sWinText Width 100
    Control OKButton
    Control CancelButton
  If CommandInfo(CMD_INFO_DLG_OK) Then
    If SystemInfo(SYS_INFO_MIPLATFORM) = MIPLATFORM_WIN32 Then
      n = SetWindowText32(nWin, sWinText)
    ElseIf SystemInfo(SYS_INFO_MIPLATFORM) = MIPLATFORM_WIN16 Then
      Call SetWindowText(nWin, sWinText)
    End If
  End If
End Sub

'利用 SetWindowLong 可以改变 Mapinfo Professional 的图标,但我现在也不知该怎么使用此函数。



⌨️ 快捷键说明

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