Results 1 to 3 of 3

Thread: INTERNET problem

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2000
    Posts
    80
    hey ppl , few questions here
    1. how to i REsolve dns ? i mean how do i find out that http://www.mirosoft.com ---> 123.42.15.0

    2. how do i put forms in SYSTEM TRAY , in vb5 pro.

    3. how do i send files with winsock , i tried but i dont know how much time to wait to send OK sign to the other modem for getting the info , and it crashs
    altough i did chatter and it works fine
    Got It , Roger And Out

  2. #2
    Fanatic Member
    Join Date
    Oct 1999
    Location
    MA, USA
    Posts
    523

    Answer to Q2

    Code:
    'Make a New project. To the form Add a picture box, a menu And a Timer. Change it's Interval property to 100. 
    'Code:
    'Add this code To the form's General Declarations procedure:
    
    Option Explicit
    
    Private Type NOTIFYICONDATA
    	cbSize As Long
    	hWnd As Long
    	uId As Long
    	uFlags As Long
    	ucallbackMessage As Long
    	hIcon As Long
    	szTip As String * 64
    End Type
    
    Private Const NIM_ADD = &H0
    Private Const NIM_MODIFY = &H1
    Private Const NIM_DELETE = &H2
    Private Const WM_MOUSEMOVE = &H200
    Private Const NIF_MESSAGE = &H1
    Private Const NIF_ICON = &H2
    Private Const NIF_TIP = &H4
    
    Private Declare Function Shell_NotifyIcon Lib "shell32" Alias "Shell_NotifyIconA" (ByVal dwMessage As Long, pnid As NOTIFYICONDATA) As Boolean
    Dim t As NOTIFYICONDATA
    
    'Add this code To the form's QueryUnload procedure:
    
    Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
    	Timer1.Enabled = False
    	t.cbSize = Len(t)
    	t.hWnd = Picture1.hWnd
    	t.uId = 1&
    	Shell_NotifyIcon NIM_DELETE, t
    End Sub
    
    'Add this code To the picture box's MouseMove procedure:
    
    Private Sub Picture1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
    	If Hex(X) = "1E3C" Then
    		Me.PopupMenu menu1
    	End If
    End Sub
    '//Add this code To the Timer:
    
    Private Sub Timer1_Timer()
    	Static i As Long, img As Long
    	t.cbSize = Len(t)
    	t.hWnd = Picture1.hWnd
    	t.uId = 1&
    	t.uFlags = NIF_ICON
    	t.hIcon = Picture1.Picture
    	Shell_NotifyIcon NIM_MODIFY, t
    	Timer1.Enabled = True
    	i = i + 1
    	If i = 2 Then i = 0
    End Sub
    
    'Add this code To the form's load procedure:
    
    Private Sub Form_Load()
    	t.cbSize = Len(t)
    	t.hWnd = Picture1.hWnd
    	t.uId = 1&
    	t.uFlags = NIF_ICON Or NIF_TIP Or NIF_MESSAGE
    	t.ucallbackMessage = WM_MOUSEMOVE
    	t.hIcon = Picture1.Picture
    	t.szTip = "System Tray" & Chr$(0)
    	Shell_NotifyIcon NIM_ADD, t
    	Timer1.Enabled = True
    	Me.Hide
    	App.TaskVisible = False
    End Sub
    Post #514

  3. #3
    Guest

    Answer to Q3

    Here is a good example on how to send files using Winsock: Complete Winsock File Transfer Toolkit!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width