Click here to Skip to main content
15,888,401 members
Home / Discussions / C#
   

C#

 
GeneralRe: some general questions about sounds Pin
leppie8-Dec-03 10:33
leppie8-Dec-03 10:33 
GeneralRe: some general questions about sounds Pin
leppie8-Dec-03 10:38
leppie8-Dec-03 10:38 
GeneralRe: some general questions about sounds Pin
blakeb_18-Dec-03 10:55
blakeb_18-Dec-03 10:55 
GeneralRe: some general questions about sounds Pin
Heath Stewart8-Dec-03 11:43
protectorHeath Stewart8-Dec-03 11:43 
GeneralRe: some general questions about sounds Pin
blakeb_18-Dec-03 11:49
blakeb_18-Dec-03 11:49 
GeneralRe: some general questions about sounds Pin
Heath Stewart8-Dec-03 11:56
protectorHeath Stewart8-Dec-03 11:56 
Generaldetecting internet connection Pin
godzooky8-Dec-03 8:45
godzooky8-Dec-03 8:45 
GeneralRe: detecting internet connection Pin
Heath Stewart8-Dec-03 9:46
protectorHeath Stewart8-Dec-03 9:46 
Short of attempting to make a connection (through many different means using classes in the System.Net namespace) and catching / parsing the appropriate exception, you could just P/Invoke InternetGetConnectedState:
[DllImport("wininet.dll")]
public static extern bool InternetGetConnectedState(out int flags, int reserved);
If you don't care about the state of the connection (just whether or not there IS a connection), you don't have to worry about the flags parameter, but you still have to pass a value:
int flags;
if (InternetGetConnectedState(out flags, 0))
{
  // Make your connection.
}


 

-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
GeneralDataRepeater Control Pin
RB@Emphasys8-Dec-03 8:08
RB@Emphasys8-Dec-03 8:08 
GeneralRe: DataRepeater Control Pin
Heath Stewart8-Dec-03 9:34
protectorHeath Stewart8-Dec-03 9:34 
GeneralHelp with simple user control Pin
Charlie Williams8-Dec-03 8:05
Charlie Williams8-Dec-03 8:05 
GeneralRe: Help with simple user control Pin
Heath Stewart8-Dec-03 9:25
protectorHeath Stewart8-Dec-03 9:25 
GeneralRe: Help with simple user control Pin
Charlie Williams8-Dec-03 11:56
Charlie Williams8-Dec-03 11:56 
QuestionDynamic Table Creation on Database Using SQL Datatypes from a Dataset, Possible? Pin
Paul Evans8-Dec-03 6:46
Paul Evans8-Dec-03 6:46 
AnswerRe: Dynamic Table Creation on Database Using SQL Datatypes from a Dataset, Possible? Pin
Heath Stewart8-Dec-03 7:01
protectorHeath Stewart8-Dec-03 7:01 
GeneralRe: Dynamic Table Creation on Database Using SQL Datatypes from a Dataset, Possible? Pin
Paul Evans8-Dec-03 7:19
Paul Evans8-Dec-03 7:19 
GeneralRe: Dynamic Table Creation on Database Using SQL Datatypes from a Dataset, Possible? Pin
Heath Stewart8-Dec-03 9:04
protectorHeath Stewart8-Dec-03 9:04 
GeneralThread-Safe Singleton Pin
bzurer8-Dec-03 4:18
bzurer8-Dec-03 4:18 
GeneralRe: Thread-Safe Singleton Pin
Heath Stewart8-Dec-03 5:07
protectorHeath Stewart8-Dec-03 5:07 
GeneralRe: Thread-Safe Singleton Pin
Paul Evans8-Dec-03 6:37
Paul Evans8-Dec-03 6:37 
GeneralRe: Thread-Safe Singleton Pin
Heath Stewart8-Dec-03 6:56
protectorHeath Stewart8-Dec-03 6:56 
GeneralRe: Thread-Safe Singleton Pin
Paul Evans8-Dec-03 7:05
Paul Evans8-Dec-03 7:05 
GeneralRe: Thread-Safe Singleton Pin
Heath Stewart8-Dec-03 7:12
protectorHeath Stewart8-Dec-03 7:12 
GeneralRe: Thread-Safe Singleton Pin
Paul Evans8-Dec-03 7:20
Paul Evans8-Dec-03 7:20 
GeneralRe: Thread-Safe Singleton Pin
Heath Stewart8-Dec-03 10:08
protectorHeath Stewart8-Dec-03 10:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.