Click here to Skip to main content
15,895,777 members
Home / Discussions / C#
   

C#

 
GeneralRe: Excel in C# Pin
Ista1-Aug-03 6:20
Ista1-Aug-03 6:20 
GeneralRe: Excel in C# Pin
sburton@amersham1-Aug-03 7:57
sburton@amersham1-Aug-03 7:57 
Questionsql connection best practise? Pin
isarfraz1-Aug-03 0:34
isarfraz1-Aug-03 0:34 
AnswerRe: sql connection best practise? Pin
Rampas Tomas1-Aug-03 1:51
Rampas Tomas1-Aug-03 1:51 
GeneralRe: sql connection best practise? Pin
isarfraz1-Aug-03 2:20
isarfraz1-Aug-03 2:20 
GeneralRe: sql connection best practise? Pin
Khang Nguyen1-Aug-03 6:19
Khang Nguyen1-Aug-03 6:19 
QuestionNetwork Access? Pin
Rocky Moore1-Aug-03 0:10
Rocky Moore1-Aug-03 0:10 
AnswerRe: Network Access? Pin
Rampas Tomas1-Aug-03 1:25
Rampas Tomas1-Aug-03 1:25 
No there is not, fortunately you could use interop and InternetGetConnectedState Win32API function.
(code adopted from someone within MS)
<br />
  bool IsConnecting;<br />
<br />
  [DllImport("wininet.dll", SetLastError=true)]<br />
  private static extern bool InternetGetConnectedState(ref UInt32 Flags, <br />
    UInt32 Reserved);<br />
<br />
  private void buttonStartMonitor_Click(object sender, System.EventArgs e)<br />
  {<br />
    UInt32 Flags = new UInt32();<br />
    IsConnecting = InternetGetConnectedState(ref Flags,0);<br />
    timer1.Interval = 100;<br />
    timer1.Start();<br />
  }<br />
<br />
  private void timer1_Tick(object sender, System.EventArgs e)<br />
  {<br />
    UInt32 Flags = new UInt32();<br />
    if(IsConnecting != InternetGetConnectedState(ref Flags,0))<br />
    {<br />
      IsConnecting = InternetGetConnectedState(ref Flags,0);<br />
      //Perform your process here<br />
    }<br />
  }<br />



Tomas Rampas
------------------------------
gedas CR s.r.o.
System analyst, MCP
TGM 840,
293 01 Mlada Boleslav,
Czech Republic
Telefon/phone +420(326)711411
Telefax/fax +420(326)711420
rampas@gedas.cz
http://www.gedas.com/
------------------------------

To be or not to be is true...
George Bool
GeneralRe: Network Access? Pin
Rocky Moore1-Aug-03 21:17
Rocky Moore1-Aug-03 21:17 
GeneralRe: Network Access? Pin
J. Dunlap1-Aug-03 21:21
J. Dunlap1-Aug-03 21:21 
GeneralRe: Network Access? Pin
Rocky Moore1-Aug-03 22:01
Rocky Moore1-Aug-03 22:01 
GeneralRe: Network Access? Pin
J. Dunlap1-Aug-03 22:19
J. Dunlap1-Aug-03 22:19 
GeneralRe: Network Access? Pin
Rocky Moore2-Aug-03 2:56
Rocky Moore2-Aug-03 2:56 
GeneralInvestigating assemblies Pin
Profox Jase31-Jul-03 22:27
Profox Jase31-Jul-03 22:27 
GeneralRe: Investigating assemblies Pin
Profox Jase31-Jul-03 22:29
Profox Jase31-Jul-03 22:29 
GeneralRe: Investigating assemblies Pin
J. Dunlap31-Jul-03 22:49
J. Dunlap31-Jul-03 22:49 
GeneralRe: Investigating assemblies Pin
James T. Johnson1-Aug-03 0:02
James T. Johnson1-Aug-03 0:02 
GeneralRe: Investigating assemblies Pin
Profox Jase1-Aug-03 0:18
Profox Jase1-Aug-03 0:18 
GeneralRe: Investigating assemblies Pin
leppie1-Aug-03 2:49
leppie1-Aug-03 2:49 
GeneralRe: Investigating assemblies Pin
Nick Parker1-Aug-03 4:12
protectorNick Parker1-Aug-03 4:12 
GeneralC# Windows application and data store Pin
ryc31-Jul-03 20:20
ryc31-Jul-03 20:20 
GeneralRe: C# Windows application and data store Pin
Kannan Kalyanaraman31-Jul-03 21:09
Kannan Kalyanaraman31-Jul-03 21:09 
GeneralRe: C# Windows application and data store Pin
ryc1-Aug-03 9:22
ryc1-Aug-03 9:22 
GeneralRe: C# Windows application and data store Pin
Rampas Tomas31-Jul-03 21:55
Rampas Tomas31-Jul-03 21:55 
GeneralRe: C# Windows application and data store Pin
Rein Hillmann31-Jul-03 22:23
Rein Hillmann31-Jul-03 22:23 

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.