DefInetBrowserName




Option Explicit
'

Private Declare Function FindExecutable Lib "shell32.dll" Alias _
"FindExecutableA" (ByVal lpFile As String, ByVal lpDirectory As _
String, ByVal lpResult As String) As Long
'

Private Sub Form_Load()
'

' Create empty 'htm' file

'

Dim iFile As Integer
Dim lRet As Long
Dim sBuffer As String

iFile = FreeFile

Open "c:\cgtest.htm" For Output As #iFile
Print #iFile, "<HTML></HTML>"
Close #iFile

sBuffer = String$(255, vbNullChar)

lRet = FindExecutable("c:\cgtest.htm", "c:\", sBuffer)

If lRet > 0 Then
sBuffer = Left$(sBuffer, lRet)
MsgBox "Default Browser :" & sBuffer
End If
End Sub










( definetbrowsername.html )- by Paolo Puglisi - Modifica del 17/12/2023