The best way to learn is to take the source code, break it, and fix it. Change the Hex Editor to an EXE patcher. Turn the Port Scanner into a Network Monitor. The source code is your oyster.
By: The Legacy Dev Team
A simple port scanner is common, but a responsive one in VB6 is rare because VB6 is single-threaded. This exclusive project uses a controls to scan 20 ports simultaneously without freezing the UI. Core Logic: 'Assume Winsock1 is a control array with Index 0 to 19 Private Sub ScanPort(ByVal IP As String, ByVal StartPort As Integer, ByVal EndPort As Integer) Dim i As Integer Dim CurrentPort As Integer CurrentPort = StartPort For i = 0 To 19 If CurrentPort <= EndPort Then Winsock1(i).RemoteHost = IP Winsock1(i).RemotePort = CurrentPort Winsock1(i).Connect lblStatus.Caption = "Scanning Port: " & CurrentPort CurrentPort = CurrentPort + 1 End If DoEvents 'Keep UI alive Next i End Sub visual basic 60 projects with source code exclusive
Public Sub EnumWindowsProc() Dim hwnd As Long Dim RetVal As Long Dim sBuffer As String Dim sClass As String Dim IsVis As Boolean The best way to learn is to take
' --- Call this in a Command Button --- Private Sub cmdOpen_Click() CommonDialog1.ShowOpen Text1.Text = LoadFileToHex(CommonDialog1.FileName) End Sub The source code is your oyster