  | 
				VFP 愛用者社區 本討論區為 Visual Foxpro 愛用者經驗交流的地方, 請多多利用"搜尋"的功能, 先查看看有無前例可循, 如果還有不懂的再發問. 部份主題有附加檔案, 須先註冊成為社區居民才可以下載.   
				 | 
			 
		 
		 
	
		| 上一篇主題 :: 下一篇主題   | 
	 
	
	
		| 發表人 | 
		內容 | 
	 
	
		Ruey
 
 
  註冊時間: 2003-03-12 文章: 1698 來自: tunglo
  第 1 樓
  | 
		
			
				 發表於: 星期日 八月 24, 2003 5:16 pm    文章主題: 檢測網路是否通暢(轉貼) | 
				     | 
			 
			
				
  | 
			 
			
				请参考:  
 
*!****************************  
 
 	  | 代碼: | 	 		  func getconns  
 
 
DECLARE Integer InternetGetConnectedState IN wininet.dll ;  
 
  Integer @lpdwFlags, Integer dwReservednReserved  
 
local m_getstate  
 
m_getstate = InternetGetConnectedState( 7, 0 )   
 
 
do case  
 
case m_getstate=0  
 
     wait wind "不通!" nowait  
 
case m_getstate=1   
 
     wait wind "拨号已经连通!" nowait  
 
case m_getstate=2  
 
     wait wind "网络已经连通!" nowait  
 
case m_getstate=4  
 
     wait wind "通过代理连通!" nowait  
 
otherwise  
 
     wait wind "非0124!"  nowait  
 
endcase   
 
 
return m_getstate | 	 
  _________________ #############################
 
快樂媽咪系列幸福宅配,喝十全雞湯~原來幸福那麼簡單!!
 
 
學會VFP使用者社區的搜尋,Code才會更有趣~
 
#############################
  Ruey 在 星期六 八月 30, 2003 1:35 pm 作了第 3 次修改 | 
			 
		  | 
	 
	
		| 回頂端 | 
		 | 
	 
	
		  | 
	 
	
		奔跑的愛情
 
 
  註冊時間: 2003-08-28 文章: 27
 
  第 2 樓
  | 
		
			
				 發表於: 星期四 八月 28, 2003 4:25 pm    文章主題:  | 
				     | 
			 
			
				
  | 
			 
			
				收下! _________________ delphi vf sql | 
			 
		  | 
	 
	
		| 回頂端 | 
		 | 
	 
	
		  | 
	 
	
		covery
 
 
  註冊時間: 2003-09-09 文章: 3
 
  第 3 樓
  | 
		
			
				 發表於: 星期三 九月 10, 2003 8:43 pm    文章主題:  | 
				     | 
			 
			
				
  | 
			 
			
				不錯ㄛ!!
 
是不是還有其它的 m_getstate  狀況 ?? | 
			 
		  | 
	 
	
		| 回頂端 | 
		 | 
	 
	
		  | 
	 
	
		covery
 
 
  註冊時間: 2003-09-09 文章: 3
 
  第 4 樓
  | 
		
			
				 發表於: 星期三 九月 10, 2003 8:43 pm    文章主題:  | 
				     | 
			 
			
				
  | 
			 
			
				不錯ㄛ!!
 
是不是還有其它的 m_getstate  狀況 ?? | 
			 
		  | 
	 
	
		| 回頂端 | 
		 | 
	 
	
		  | 
	 
	
		Ruey
 
 
  註冊時間: 2003-03-12 文章: 1698 來自: tunglo
  第 5 樓
  | 
		
			
				 發表於: 星期四 九月 11, 2003 4:53 pm    文章主題:  | 
				     | 
			 
			
				
  | 
			 
			
				 	  | covery 寫到: | 	 		  不錯ㄛ!!
 
是不是還有其它的 m_getstate  狀況 ?? | 	  
 
 
1.有空的時候要常利用到
 
"常用網站整理---920817 "
 
Using Win32 functions網址
 
  
 
 
2.KK底下函數說明,就會明白
 
InternetGetConnectedState
 
    Add comment     W32 Constants      Translate this page  
 
 
 
 
 
Retrieves the connected state of the local system. 
 
 
 
 
 
Code examples: 
 
 
 
 
 
 Retrieving a state of your Internet connection  
 
 
 
 
 
 
 
Declaration: 
 
 
 
 
 
BOOL InternetGetConnectedState( 
 
    LPDWORD lpdwFlags, 
 
    DWORD dwReserved 
 
); 
 
 
 
 
 
 
 
 
 
FoxPro declaration: 
 
 
 
 
 
DECLARE SHORT InternetGetConnectedState IN wininet; 
 
    INTEGER @ lpdwFlags,; 
 
       INTEGER   dwReserved  
 
 
 
 
 
 
 
Parameters: 
 
 
 
lpdwFlags
 
[out] Pointer to an unsigned long integer variable where the connection description should be returned. 
 
 
dwReserved
 
[in] Reserved. Must be set to zero.
 
 
 
 
 
 
 
Return value: 
 
 
 
Returns TRUE if there is an Internet connection, or FALSE otherwise. _________________ #############################
 
快樂媽咪系列幸福宅配,喝十全雞湯~原來幸福那麼簡單!!
 
 
學會VFP使用者社區的搜尋,Code才會更有趣~
 
############################# | 
			 
		  | 
	 
	
		| 回頂端 | 
		 | 
	 
	
		  | 
	 
	
		 | 
	 
 
  
  	 
	    
  	   | 
 	
您 無法 在這個版面發表文章 您 無法 在這個版面回覆文章 您 無法 在這個版面編輯文章 您 無法 在這個版面刪除文章 您 無法 在這個版面進行投票 您 無法 在這個版面附加檔案 您 無法 在這個版面下載檔案
  | 
   
  
		 |