OK ajd za kasnije da ostavimo bg iliti socket :D
Sad hocu nesto drugo sto moze da ide preko browsera..
Evo mog koda
Code:
Private Declare Function GetDesktopWindow Lib "user32" () As Long
Private Declare Function GetSystemDirectory Lib "kernel32" Alias "GetSystemDirectoryA" (ByVal lpBuffer As String, ByVal nSize As Long) As Long
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hwnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Const SW_SHOWNORMAL = 1
Const SE_ERR_NOASSOC = 31
Const sOperation As String = "open" ' Constants for shell operations
Const sRun As String = "RUNDLL32.EXE"
Const sParameters As String = "shell32.dll,OpenAs_RunDLL "
Private Function shelldoc(sfile As String)
Dim sPath As String, RetVal As Long, _
lRet As Long
lRet = ShellExecute(GetDesktopWindow(), sOperation, sfile, _
vbNullString, vbNullString, SW_SHOWNORMAL)
If lRet = SE_ERR_NOASSOC Then ' No association exists
sPath = Space(255)
RetVal = GetSystemDirectory(sPath, 255)
sPath = Left$(sPath, RetVal)
lRet = ShellExecute(GetDesktopWindow(), "open", sRun, _
sParameters + sfile, sPath, SW_SHOWNORMAL)
End If
End Function
Private Sub Command1_Click()
Call shelldoc("http://www.google.com")
End Sub
I sad bih ja hteo da dodam nesto tipa kada napravim text box i npr neko ukuca tu maps i klikne na command_click da mu otvara
www.google.com/maps ako me razumes? Znaci da dodaje to sto je on napisao u Text Box-u kad klikne na Command1 verovatno ide sa nekom varijablom ali nisam uspeo resiti. Hvala na odgovorima :)
;) :) xD :P :S :@ ^^ ;]