vb 识别debug和release
发布网友
发布时间:2022-05-12 15:17
我来回答
共1个回答
热心网友
时间:2023-10-11 13:58
Private Declare Function GetMoleFileName Lib "kernel32.dll" Alias "GetMoleFileNameA" (ByVal hMole As Long, ByVal lpFileName As String, ByVal nSize As Long) As Long
Private Sub Command1_Click()
Dim file_path As String * 1000
GetMoleFileName 0, file_path, 1000
Dim s As String
s = Mid(file_path, InStrRev(file_path, "\") + 1)
If StrComp("vb6.exe", s, vbTextCompare) = 0 Then
s = "在vb6环境"
Else
s = "编译为exe"
End If
MsgBox s
End Sub
追问想必你是久经沙场的老手了,佩服。