?? modutil.bas
字號(hào):
Attribute VB_Name = "ModUtil"
' This sample application and corresponding sample code is provided
' for example purposes only. It has not undergone rigorous testing
' and as such should not be shipped as part of a final application
' without extensive testing on the part of the organization releasing
' the end-user product.
Option Explicit
' Return true if the layer is permanent. We do this by seeing if the layer has a
' .tab extension. If it's a temporary layer, it'll have a ".tmp" extension.
Public Function IsPermanent(lyr As Layer) As Boolean
If LCase$(Right$(lyr.Filespec, 3)) = "tab" Then
IsPermanent = True
Else
IsPermanent = False
End If
End Function
' Returns true if the object is invalid in some way. Returns false otherwise
Public Function IsInvalidObject(Obj As Variant) As Boolean
If IsNull(Obj) = True Or IsEmpty(Obj) = True Or TypeName(Obj) = "Nothing" Then
IsInvalidObject = True
Else
IsInvalidObject = False
End If
End Function
' Returns true if lyr is the current insertion layer
Public Function IsInsertionLayer(lyr As Layer) As Boolean
If IsInvalidObject(FrmMain.Map1.Layers.InsertionLayer) Then
IsInsertionLayer = False
ElseIf lyr = FrmMain.Map1.Layers.InsertionLayer Then
IsInsertionLayer = True
Else
IsInsertionLayer = False
End If
End Function
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -