Access ASP link from VB 6.0 Desktop App

I am not a VB developer and I need help to integrate an ASP web application with a VB 6.0 desktop. application.  This may be an easy question but I have no idea how to do this. PLEASE HELP!!!

I want users to be able to click on a button in the VB application that will open a web form provided by an ASP 3.0 application. Security information needs to be passed to the ASP page to determine permissions for the appropriate user.
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

If your security details are passed to the ASP app with the querystring (the bit in the web address after a ?), you could compile an address string from the app homepage and your user details and use the ShellExecute API to open it...

    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
                                                'DECLARE API FUNCTION
    Private Sub CommandButton1_Click()
        strUserName = "thisUser01"              'THE USERNAME -- USE YOUR METHOD
        strPassword = "thisPassword01"          'THE PASSWORD -- USE YOUR METHOD
        strASPApp = "http://www.myaspapp.asp"   'THE APP START PAGE
        strShellAddress = strASPApp & "?user=" & strUserName & "&pass=" & strPassword
                                                'COMPILE QUERY STRING FROM DATA/FORMAT
        ShellExecute Application.hwnd, "", strShellAddress, "", "", 1
                                                'OPEN BROWSER PAGE
    End Sub

Otherwise, if you want to keep the browser within the Application, you can use a browser control, with similar effect...


You may have to change

     ShellExecute Application.hwnd, "", strShellAddress, "", "", 1


     ShellExecute Me.hwnd, "", strShellAddress, "", "", 1

if it throws up an error on this line...


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
cheyennejkAuthor Commented:
Im afraid that being new to VB, Im a little slow.

Suppose I have a single form with a single button. Where do i declare the API function?
API declaration would go in the General/Declarations section of the form or, if that doesn't work, inside its own module.  If it does need to go in its own module, you will need to change Private Declare to Public Declare...

cheyennejkAuthor Commented:
Nevermind my last comment, I got it working.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic Classic

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.