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
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:
'internet connection
Public Declare Function InternetGetConnectedState Lib "Wininet" _
(ByRef dwFlags As Long, ByVal dwreserved As Long) As Long
Public Const INTERNET_CONNECTION_CONFIGURED As Long = &H40
Public Const INTERNET_CONNECTION_LAN As Long = &H2
Public Const INTERNET_CONNECTION_MODEM As Long = &H1
Public Const INTERNET_CONNECTION_PROXY As Long = &H4
Public Const INTERNET_CONNECTION_OFFLINE As Long = &H20
Public Const INTERNET_RAS_INSTALLED As Long = &H10
and the function:
VB Code:
Public Function GetInternetConnectedState() As Boolean
Dim dwFlags As Long 'Returns which Connection Type
Dim RetCode As Boolean 'If is connected
'dwreserved needs to be set to 0&
RetCode = InternetGetConnectedState(dwFlags, 0&)
Select Case RetCode
Case dwFlags And INTERNET_CONNECTION_CONFIGURED
'Local system has a valid connection to internet, but it is not currently connected.
Case dwFlags And INTERNET_CONNECTION_LAN
'Local system uses a local area network to connect to internet, which might or might not be currently connected to internet.
Case dwFlags And INTERNET_CONNECTION_MODEM
'Local system uses a modem to connect to internet.
Case dwFlags And INTERNET_CONNECTION_PROXY
'Local system uses a proxy server to connect to internet.
Case dwFlags And INTERNET_CONNECTION_OFFLINE
'Local system is in offline mode.
Case dwFlags And INTERNET_RAS_INSTALLED
'Local system has RAS installed.
End Select
GetInternetConnectedState = RetCode
End Function
2. as for the db, can't you just make them download a db and overwrite the existing one?
wc.
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
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.