View Single Post
 
Old 10-16-2016, 03:13 PM
jajiyiko jajiyiko is offline
Newcomer
 
Join Date: Jul 2006
Posts: 2
Default winsock and internet connection error

Hi!

I use winsock and listen 514 udp port.

but if internet connection cut ,windows send "server name or address colud not be resolved" msgbox.

How can I close or blocking Windows messages?

Private Declare Function CloseWindow Lib "user32" (ByVal hwnd As Long) As Long
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long


Private Sub Timer1_Timer()

wid = FindWindow(vbNullString, "windowname")
If wid <> 0 Then CloseWindow wid
end sub


I can close with this code . But windowname is project name. project is closing too. i changed project name ,again windowname is project name

can you help me?
Reply With Quote