Results 1 to 4 of 4

Thread: [Resolved] How to Convert this C++ code to VB

  1. #1

    Thread Starter
    VB Addict Pradeep1210's Avatar
    Join Date
    Apr 2004
    Location
    Inside the CPU...
    Posts
    6,614

    Resolved [Resolved] How to Convert this C++ code to VB

    What will be the equivalent of this enumeration in VB

    Code:
    typedef enum BrowserNavConstants {
        navOpenInNewWindow = 0x1,
        navNoHistory = 0x2,
        navNoReadFromCache = 0x4,
        navNoWriteToCache = 0x8,
        navAllowAutosearch = 0x10,
        navBrowserBar = 0x20,
        navHyperlink = 0x40
    } BrowserNavConstants;
    Thanks in advance
    Last edited by Pradeep1210; May 4th, 2005 at 06:11 AM.

  2. #2
    Banned dglienna's Avatar
    Join Date
    Jun 2004
    Location
    Center of it all
    Posts
    17,901

    Re: How to Convert this C++ code to VB

    Quote Originally Posted by Pradeep1210
    What will be the equivalent of this enumeration in VB

    Code:
    typedef enum BrowserNavConstants {
        navOpenInNewWindow = 0x1,
        navNoHistory = 0x2,
        navNoReadFromCache = 0x4,
        navNoWriteToCache = 0x8,
        navAllowAutosearch = 0x10,
        navBrowserBar = 0x20,
        navHyperlink = 0x40
    } BrowserNavConstants;
    Thanks in advance

    VB Code:
    1. navOpenInNewWindow = 1,
    2.     navNoHistory = 2,
    3.     navNoReadFromCache = 4,
    4.     navNoWriteToCache = 8,
    5.     navAllowAutosearch = 16,
    6.     navBrowserBar = 32,
    7.     navHyperlink = 64

    You could probably just use the hex value, also

  3. #3
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    Re: How to Convert this C++ code to VB

    VB Code:
    1. Enum BrowserNavConstants
    2.     navOpenInNewWindow = &H1
    3.     navNoHistory = &H2
    4.     navNoReadFromCache = &H4
    5.     navNoWriteToCache = &H8
    6.     navAllowAutosearch = &H10
    7.     navBrowserBar = &H20
    8.     navHyperlink = &H40
    9. End Enum

  4. #4

    Thread Starter
    VB Addict Pradeep1210's Avatar
    Join Date
    Apr 2004
    Location
    Inside the CPU...
    Posts
    6,614

    Re: How to Convert this C++ code to VB

    Thanks so much

    I'm using it with a webbrowser control and I m behind a proxy. I don't want cached pages from the proxy. I m not able to get this statement work. It is uncertain whether it will show a cached page or updated one

    VB Code:
    1. myHTTPHeader = "Content-Type: application/x-www-form-urlencoded" & Chr(10) & Chr(13)
    2. WebBrowser1.Navigate2 myURL, navNoHistory + navNoReadFromCache + navNoWriteToCache, myPostData,,myHTTPHeader

    myURL contains the URL address, myPostData is a byte array

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