Results 1 to 9 of 9

Thread: [RESOLVED] Mid Help

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2006
    Posts
    4

    Resolved [RESOLVED] Mid Help

    Hello,

    I am trying to make a program where the users of my site can buy shares of different companies through VB6.

    I wrote a program in PHP that will be viewed through the Web Browser in VB 6 (the web browser that comes in the wizard).

    Here's my problem:
    The stock url is:
    http://api.cgeagles.com/cgsx/stock.php?symbol=<stock symbol here>

    I need to open a new window with this url in it:
    http://api.cgeagles.com/cgsx/buy.php?symbol=<stock symbol here>

    The code to open a new browser window is:

    VB Code:
    1. Dim frmB As New frmBrowser
    2. frmB.StartingAddress = "http://api.cgeagles.com/cgsx/buy.php"
    3. frmB.Show

    First I need a way to check if the page is:
    http://api.cgeagles.com/cgsx/stock.p...ue&symbol=XXXX

    Second, I need to seperate the XXXX from the URL and add it to the new browser window opening code

    Here's what I've tried:

    VB Code:
    1. On Error Resume Next
    2.     Me.Caption = brwWebBrowser.LocationName
    3.     Dim s As Long
    4.     Dim ss As Long
    5.     Dim sss As Long
    6.     s = brwWebBrowser.LocationURL
    7.     sss = Mid(s, 56, 60)
    8.     ss = Mid(s, 0, 55)
    9.     If ss = "http://api.cgeagles.com/cgsx/stock.php?buy=true&symbol=" Then
    10.     Dim frmB As New frmBrowser
    11.     frmB.StartingAddress = "http://api.cgeagles.com/cgsx/buy.php?symbol=" + sss
    12.     frmB.Show
    13.     End If

    But, when I run it, it just opens up thousands of windows pointing to buy.php?symbol=
    (it still lacks a symbol)

    Can someone tell me what I'm doing wrong??

    Thanks,
    - k3p7
    Last edited by k3p7; Jun 7th, 2006 at 06:15 PM.

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