Results 1 to 16 of 16

Thread: How do i interact with the default browser

  1. #1
    Guest

    Post

    Ok, lets say i have a url and when someone clicks on a button, i want it load their default browser with that url. Any suggestions?

  2. #2
    Guest
    This code will open the default web browser.

    Code:
    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
    
    Function ShellToBrowser%(frm As Form, ByVal url$, ByVal WindowStyle%)
             
    Dim api%
    api% = ShellExecute(frm.hwnd, "open", url$, "", App.Path, WindowStyle%)
    'Check return value
    If api% < 31 Then
    'error code - see api help for more info
    MsgBox App.Title & " had a problem running your web browser. You should check that your browser is correctly installed. (Error #" & Format$(api%) & ")", 48, "Browser Unavailable"
    ShellToBrowser% = False
    ElseIf api% = 32 Then
    'no file association
    MsgBox App.Title & " could not find a file association for " & url$ & " on your system. You should check that your browser is correctly installed and associated with this type of file.", 48, "Browser Unavailable"
    ShellToBrowser% = False
    Else
    ShellToBrowser% = True
    End If
    End Function
    
    Usage:
    ShellToBrowser(Me,"http://www.site.com",0)

  3. #3
    Fanatic Member
    Join Date
    Jan 2000
    Location
    Nitro
    Posts
    633
    Basically, when you are openning a certain web site using "ShellExecute" Api, it will automatically open it in the default browser.
    Chemically Formulated As:
    Dr. Nitro

  4. #4
    Guest
    Ok i got that working, but do you know how i interact with AOL instant messanger?

  5. #5
    Guest
    Yeah...get a aim bas file from http://www.patorjk.com or you can use an api spyer to find window and do all that other stuff.

  6. #6
    Guest
    Ok, i downloaded about 20 .bas files, is there a tutorial on how to use em?

  7. #7
    Guest
    You don't know how to use a Bas file?

    All you do is call stuff out of them. The code is already all there.

    Example:

    To Send Chat...

    SendChat "{}--{} The Chimp Machine {}--{}"

    or something like that.

  8. #8
    Guest
    Ok i did that and it didnt work

  9. #9
    Guest
    A bas file is where you store your functions and subs..basically.

    Te sendchat was just an example. Just click on the bas file and view its declarations.
    Than you can call the subs...and work with the functions.
    It's simple.
    Have you not ever used a bas file?
    Have you not made a program and contained a bas file in it?

  10. #10
    Guest
    Okay, I assume you know how to use a bas file.
    I think I know why none of your bas files are working.
    What aim version do you have?
    Because every aim bas is different.
    Version 4.0 is the newest aim and older aim version bas files will not work.

  11. #11
    Guest
    I know how to use a bas file, and that function was recognized, its just these like 200 function and i have no idea how to use the functions, or which ones to use.

  12. #12
    Guest
    Well..what do you want to make your aim proggie about?
    In order to know how to use these functions..you have to know what things you are going to use in your program.
    Usually, the Sub and Function names explain what they do.
    Or their should be a lil explantion about what they do if the person actually made their bas file nice and neat.

  13. #13
    Guest
    Ive looked thorugh the functions and tried them, but they just dont work...

    I want it to be able to send different colored text, punt people, just different things like that.

  14. #14
    Guest
    It's probably a crappy bas file.
    Punter codes no longer work on aol or aim.
    But a fader will. You can try searching http://www.planet-source.com for a good fader.
    I am sure you will find one around..search for it.
    If you want I could send you izekial32.bas, I am sure it will work..it's a good bas file made for VB 5.0 and VB 6.0.

  15. #15
    Guest
    Ok, i tried a different bas file, and its working now. Still have no idea how to punt someone.

  16. #16
    Guest
    AOL:

    Code:
    <font=99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999>
    I don't know the aim code..and I dought that code or an aim punt code will work. AOL/AIM IMs are fixed to ignore those commands.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width