-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 5baa7d0
Showing
7 changed files
with
302 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
# VB6 source files (show diff + keep CRLF in zip download) | ||
|
||
*.bas working-tree-encoding=CP1252 text eol=crlf linguist-language=vb6 | ||
*.cls working-tree-encoding=CP1252 text eol=crlf linguist-language=vb6 | ||
*.ctl working-tree-encoding=CP1252 text eol=crlf linguist-language=vb6 | ||
*.dob working-tree-encoding=CP1252 text eol=crlf linguist-language=vb6 | ||
*.dsr working-tree-encoding=CP1252 text eol=crlf linguist-language=vb6 | ||
*.frm working-tree-encoding=CP1252 text eol=crlf linguist-language=vb6 | ||
*.pag working-tree-encoding=CP1252 text eol=crlf linguist-language=vb6 | ||
*.vbg working-tree-encoding=CP1252 text eol=crlf | ||
*.vbl working-tree-encoding=CP1252 text eol=crlf | ||
*.vbp working-tree-encoding=CP1252 text eol=crlf | ||
*.vbr working-tree-encoding=CP1252 text eol=crlf | ||
*.vbw working-tree-encoding=CP1252 text eol=crlf | ||
|
||
# Other source files (show diff + LF only in zip download) | ||
|
||
*.asm text | ||
*.asp text | ||
*.bat text | ||
*.c text | ||
*.cpp text | ||
*.dsp text | ||
*.dsw text | ||
*.h text | ||
*.idl text | ||
*.java text | ||
*.js text | ||
*.manifest text | ||
*.odl text | ||
*.php text | ||
*.php3 text | ||
*.rc text | ||
*.sln text | ||
*.sql text | ||
*.vb text | ||
*.vbs text | ||
|
||
# Binary | ||
|
||
*.res binary | ||
*.frx binary | ||
*.ctx binary | ||
*.dsx binary | ||
*.exe binary | ||
*.dll binary | ||
*.ocx binary | ||
*.cmp binary | ||
*.pdb binary | ||
*.tlb binary | ||
*.xls binary | ||
*.doc binary | ||
*.ppt binary | ||
*.xlsx binary | ||
*.docx binary | ||
*.pptx binary | ||
*.chm binary | ||
*.hlp binary | ||
*.jpg binary | ||
*.png binary | ||
*.bmp binary | ||
*.gif binary | ||
*.ico binary | ||
*.zip binary | ||
*.cab binary | ||
*.7z binary | ||
*.gz binary | ||
|
||
# Text files but keep as binary (no diff) | ||
|
||
# *.cfg text | ||
# *.conf text | ||
# *.csi text | ||
# *.css text | ||
# *.csv text | ||
# *.def text | ||
# *.htm text | ||
# *.html text | ||
# *.inf text | ||
# *.ini text | ||
# *.log text | ||
# *.reg text | ||
# *.rtf text | ||
# *.txt text | ||
# *.url text | ||
# *.xml text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
*.scc | ||
*.dca | ||
*.oca | ||
*.obj | ||
vb*.tmp | ||
@PSC* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
VERSION 5.00 | ||
Begin VB.Form Form1 | ||
BackColor = &H00000000& | ||
Caption = "TCP/IP transfer graph" | ||
ClientHeight = 2310 | ||
ClientLeft = 60 | ||
ClientTop = 375 | ||
ClientWidth = 3195 | ||
FillStyle = 0 'Solid | ||
ForeColor = &H00000000& | ||
LinkTopic = "Form1" | ||
MaxButton = 0 'False | ||
ScaleHeight = 2310 | ||
ScaleWidth = 3195 | ||
StartUpPosition = 3 'Windows Default | ||
Begin VB.PictureBox P2 | ||
AutoRedraw = -1 'True | ||
BackColor = &H00000000& | ||
DrawWidth = 2 | ||
FillStyle = 0 'Solid | ||
ForeColor = &H000000FF& | ||
Height = 1110 | ||
Left = 45 | ||
ScaleHeight = 1050 | ||
ScaleWidth = 3060 | ||
TabIndex = 1 | ||
Top = 1170 | ||
Width = 3120 | ||
End | ||
Begin VB.PictureBox P1 | ||
AutoRedraw = -1 'True | ||
BackColor = &H00000000& | ||
DrawWidth = 2 | ||
FillStyle = 0 'Solid | ||
ForeColor = &H0000FFFF& | ||
Height = 1110 | ||
Left = 45 | ||
ScaleHeight = 1050 | ||
ScaleWidth = 3060 | ||
TabIndex = 0 | ||
Top = 45 | ||
Width = 3120 | ||
End | ||
Begin VB.Timer Timer1 | ||
Interval = 500 | ||
Left = 3015 | ||
Top = 840 | ||
End | ||
End | ||
Attribute VB_Name = "Form1" | ||
Attribute VB_GlobalNameSpace = False | ||
Attribute VB_Creatable = False | ||
Attribute VB_PredeclaredId = True | ||
Attribute VB_Exposed = False | ||
Dim Arr1(130) As Integer | ||
Dim Arr2(130) As Integer | ||
Dim RecVal, SenVal As Integer | ||
Dim FirstRecVal, FirstSenVal As Integer | ||
|
||
Private Sub Form_Load() | ||
Call StayOnTop(Form1) | ||
|
||
Me.Left = Screen.Width - Me.Width - 50 | ||
Me.Top = 50 | ||
Er = GetTcpStatistics(TCPSTATISTICS) | ||
If Er <> 0 Then | ||
Exit Sub | ||
End If | ||
FirstRecVal = TCPSTATISTICS.SegmentsReceived | ||
FirstSenVal = TCPSTATISTICS.SegmentsSent | ||
End Sub | ||
|
||
Private Sub Timer1_Timer() | ||
Dim Dif1 As Integer | ||
Dim Dif2 As Integer | ||
|
||
Er = GetTcpStatistics(TCPSTATISTICS) | ||
If Er <> 0 Then | ||
Exit Sub | ||
End If | ||
P1.Cls | ||
P2.Cls | ||
P1.Print "Bytes received" | ||
P2.Print "Bytes send" | ||
RecVal = TCPSTATISTICS.SegmentsReceived | ||
SenVal = TCPSTATISTICS.SegmentsSent | ||
Dif1 = RecVal - FirstRecVal | ||
Dif2 = SenVal - FirstSenVal | ||
Dif1 = Dif1 * 70 'Make this value lower if you have a | ||
'faster connection or higher if you | ||
Dif2 = Dif2 * 70 'have a slower connection. | ||
ResortArray Dif1, Dif2 | ||
For z = 0 To 130 | ||
P1.Line (P1.Width - (z * 30), P1.Height - Arr1(z))-(P1.Width - (z * 30), P1.Height) | ||
P2.Line (P2.Width - (z * 30), P2.Height - Arr2(z))-(P2.Width - (z * 30), P2.Height) | ||
Next z | ||
FirstRecVal = RecVal | ||
FirstSenVal = SenVal | ||
End Sub | ||
|
||
Private Sub ResortArray(NewVal As Integer, NewVal2 As Integer) | ||
For z = 129 To 0 Step -1 | ||
Arr1(z + 1) = Arr1(z) | ||
Arr2(z + 1) = Arr2(z) | ||
Next z | ||
Arr1(0) = NewVal | ||
Arr2(0) = NewVal2 | ||
End Sub | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
Attribute VB_Name = "Module1" | ||
Public TCPSTATISTICS As TCPSTATISTICS | ||
Public Const SWP_NOMOVE = &H2 | ||
Public Const SWP_NOSIZE = &H1 | ||
Public Const FLAGS = SWP_NOMOVE Or SWP_NOSIZE | ||
|
||
Public Declare Function SetWindowPos Lib "User32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long | ||
Public Declare Function GetTcpStatistics Lib "iphlpapi.dll" (pStats As TCPSTATISTICS) As Long | ||
|
||
Public Type TCPSTATISTICS | ||
AlgorithmTimeout As Long | ||
MinTimeout As Long | ||
MaxTimeout As Long | ||
MaxConnections As Long | ||
ActiveOpenConnections As Long | ||
PassiveOpenConnections As Long | ||
FailedAttempts As Long | ||
EstablishedConnectionResets As Long | ||
CurrentEstablishedConnections As Long | ||
SegmentsReceived As Long | ||
SegmentsSent As Long | ||
SegmentsRetransmitted As Long | ||
IncomingErrors As Long | ||
OutgoingResets As Long | ||
CumulativeConnections As Long | ||
End Type | ||
|
||
Public Sub StayOnTop(Frm As Form) | ||
setontop = SetWindowPos(Frm.hwnd, -1, 0, 0, 0, 0, FLAGS) | ||
End Sub | ||
|
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
Type=Exe | ||
Form=Form1.frm | ||
Reference=*\G{00020430-0000-0000-C000-000000000046}#2.0#0#..\..\..\..\WINDOWS\SYSTEM\stdole2.tlb#OLE Automation | ||
Module=Module1; Module1.bas | ||
IconForm="Form1" | ||
Startup="Form1" | ||
HelpFile="" | ||
Title="TCP/IP Data graph" | ||
ExeName32="Project1.exe" | ||
Command32="" | ||
Name="Project1" | ||
HelpContextID="0" | ||
CompatibleMode="0" | ||
MajorVer=1 | ||
MinorVer=0 | ||
RevisionVer=0 | ||
AutoIncrementVer=0 | ||
ServerSupportFiles=0 | ||
VersionCompanyName="MF-Products" | ||
CompilationType=-1 | ||
OptimizationType=0 | ||
FavorPentiumPro(tm)=0 | ||
CodeViewDebugInfo=0 | ||
NoAliasing=0 | ||
BoundsCheck=0 | ||
OverflowCheck=0 | ||
FlPointCheck=0 | ||
FDIVCheck=0 | ||
UnroundedFP=0 | ||
StartMode=0 | ||
Unattended=0 | ||
Retained=0 | ||
ThreadPerObject=0 | ||
MaxNumberOfThreads=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<div align="center"> | ||
|
||
## TCP/IP data tranfer graph \(shows bytes send/received in a graph form\) | ||
|
||
<img src="PIC20001117131132319.JPG"> | ||
</div> | ||
|
||
### Description | ||
|
||
The program has two pictureboxes. One shows the bytes currently being received and the other the bytes being send. | ||
|
||
I did not know whether the iphlpapi dll comes with windows so I included it in the zip file. | ||
|
||
### More Info | ||
|
||
|
||
|
||
<span> |<span> | ||
--- |--- | ||
**Submitted On** |2000-11-17 19:52:16 | ||
**By** |[Michael Frey](https://github.com/Planet-Source-Code/PSCIndex/blob/master/ByAuthor/michael-frey.md) | ||
**Level** |Intermediate | ||
**User Rating** |4.3 (34 globes from 8 users) | ||
**Compatibility** |VB 6\.0 | ||
**Category** |[Internet/ HTML](https://github.com/Planet-Source-Code/PSCIndex/blob/master/ByCategory/internet-html__1-34.md) | ||
**World** |[Visual Basic](https://github.com/Planet-Source-Code/PSCIndex/blob/master/ByWorld/visual-basic.md) | ||
**Archive File** |[CODE\_UPLOAD1177811172000\.zip](https://github.com/Planet-Source-Code/michael-frey-tcp-ip-data-tranfer-graph-shows-bytes-send-received-in-a-graph-form__1-12874/archive/master.zip) | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|