Jump to content

[VB6] Algumas dúvidas...


w00t!
 Share

Recommended Posts

Boas, tenho aqui algumas dúvida.. agradecia ajuda.  :fartnew2:

Num programa em VB6.0, criei um botão para sair do executavel, simplesmente com o código End, quando se clica o programa desaparece, mas continua a correr.. como resolver isto?

E já agora, como é que posso meter texto, como um link url? Quando se clica abre o firefox / IE com um endereço especifico..

Cumprimentos.

Link to comment
Share on other sites

E quanto a isto:

"E já agora, como é que posso meter texto, como um link url? Quando se clica abre o firefox / IE com um endereço especifico..

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

' Open the default browser on a given URL
' Returns True if successful, False otherwise

Public Function OpenBrowser(ByVal URL As String) As Boolean
    Dim res As Long
    
    ' it is mandatory that the URL is prefixed with http:// or https://
    If InStr(1, URL, "http", vbTextCompare) <> 1 Then
        URL = "http://" & URL
    End If
    
    res = ShellExecute(0&, "open", URL, vbNullString, vbNullString, _
        vbNormalFocus)
    OpenBrowser = (res > 32)
End Function

ser.gifsartim.gif

Link to comment
Share on other sites

fazes assim :


    Dim conn As OleDbConnection = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source =C:\Clinica\Clinica.mdb")
            Dim sqlutente As String = "select nome from utentes"
            Dim DA As New OleDbDataAdapter(sqlutente, conn)
          

  a k precias msm e a linha de cima.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

By using this site you accept our Terms of Use and Privacy Policy. We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.