Results 1 to 4 of 4

Thread: This one is for the pro's out there

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Feb 2001
    Location
    West Palm Beach, Florida
    Posts
    188

    Question This one is for the pro's out there

    First of all. If I can code this it would be OK but if you know of a very good component that can do what I want I would rather buy one as I'm runnning out of time.

    I want to have an interactive news section on my local VB App.

    First of all I need to know if my end user is connected to the internet. I once purchased a component that checks that but only works if my end user is connected via his own modem, and not when he's connected via his LAN and/or Proxy.. That is the first thing I need to get right..

    Then I need to connect to a database on my webserver and update my customers database. Almost like updating new viruses. But this will be with the latest industry news. So I will have a form in my app called News update. When the customer opens the form I want to read the latest updates from a table on my website....

    How can I do this ???? Is this possible....

    Thanks for all your help

    Chris

  2. #2
    Fanatic Member wildcat_2000's Avatar
    Join Date
    Nov 2000
    Location
    Italy
    Posts
    727

    Re: This one is for the pro's out there

    this is too a generic question.

    though:

    1. to check for internet connection:

    in a module:
    VB Code:
    1. 'internet connection
    2. Public Declare Function InternetGetConnectedState Lib "Wininet" _
    3.     (ByRef dwFlags As Long, ByVal dwreserved As Long) As Long
    4. Public Const INTERNET_CONNECTION_CONFIGURED As Long = &H40
    5. Public Const INTERNET_CONNECTION_LAN As Long = &H2
    6. Public Const INTERNET_CONNECTION_MODEM As Long = &H1
    7. Public Const INTERNET_CONNECTION_PROXY As Long = &H4
    8. Public Const INTERNET_CONNECTION_OFFLINE As Long = &H20
    9. Public Const INTERNET_RAS_INSTALLED As Long = &H10
    and the function:
    VB Code:
    1. Public Function GetInternetConnectedState() As Boolean
    2.     Dim dwFlags As Long 'Returns which Connection Type
    3.     Dim RetCode As Boolean 'If is connected
    4.    
    5.     'dwreserved needs to be set to 0&
    6.     RetCode = InternetGetConnectedState(dwFlags, 0&)
    7.    
    8.     Select Case RetCode
    9.         Case dwFlags And INTERNET_CONNECTION_CONFIGURED
    10.         'Local system has a valid connection to internet, but it is not currently connected.
    11.  
    12.         Case dwFlags And INTERNET_CONNECTION_LAN
    13.         'Local system uses a local area network to connect to internet, which might or might not be currently connected to internet.
    14.  
    15.         Case dwFlags And INTERNET_CONNECTION_MODEM
    16.         'Local system uses a modem to connect to internet.
    17.  
    18.         Case dwFlags And INTERNET_CONNECTION_PROXY
    19.         'Local system uses a proxy server to connect to internet.
    20.  
    21.         Case dwFlags And INTERNET_CONNECTION_OFFLINE
    22.         'Local system is in offline mode.
    23.  
    24.         Case dwFlags And INTERNET_RAS_INSTALLED
    25.         'Local system has RAS installed.
    26.  
    27.     End Select
    28.    
    29. GetInternetConnectedState = RetCode
    30.  
    31. End Function


    2. as for the db, can't you just make them download a db and overwrite the existing one?

    wc.
    When your car breaks down,
    close all windows and retry

    => please rate all users posts! <=

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Feb 2001
    Location
    West Palm Beach, Florida
    Posts
    188

    Re: This one is for the pro's out there

    Thanks for the internet code. That's great.
    I cannot let them download a db. The idea is to act as a news centre when starting the program....

    eg. New updates on vendor file available now. Click here to update

  4. #4
    No place like 127.0.0.1 eyeRmonkey's Avatar
    Join Date
    Jul 2005
    Location
    Blissful Oblivion
    Posts
    2,306

    Re: This one is for the pro's out there

    Have you looked into RSS/XML to hold your newest updates instead of a database? VB6 has built in XML DOM components you could use or you could probably buy a RSS feed reader component.
    Visual Studio 2005 Professional Edition (.NET Framework 2.0)
    ~ VB .NET Links: Visual Basic 6 to .NET Function Equivalents (Thread) | Refactor! (White Paper) | Easy Control for Wizard Forms | Making A Proper UI For WinForms | Graphics & GDI+ Tutorial | Websites For Free Icons
    ~ QUOTE: Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. -Rich Cook

    ~ eyeRmonkey.com

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