home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / CODE_UPLOAD14473232001.psc / frmNet.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2001-02-03  |  25.5 KB  |  685 lines

  1. VERSION 5.00
  2. Begin VB.Form frmNet 
  3.    BackColor       =   &H00C0C0FF&
  4.    BorderStyle     =   4  'Fixed ToolWindow
  5.    Caption         =   "Net Usage Monitor"
  6.    ClientHeight    =   2685
  7.    ClientLeft      =   150
  8.    ClientTop       =   390
  9.    ClientWidth     =   3150
  10.    BeginProperty Font 
  11.       Name            =   "Comic Sans MS"
  12.       Size            =   9
  13.       Charset         =   0
  14.       Weight          =   700
  15.       Underline       =   0   'False
  16.       Italic          =   0   'False
  17.       Strikethrough   =   0   'False
  18.    EndProperty
  19.    LinkTopic       =   "Form1"
  20.    MaxButton       =   0   'False
  21.    MinButton       =   0   'False
  22.    ScaleHeight     =   2685
  23.    ScaleWidth      =   3150
  24.    ShowInTaskbar   =   0   'False
  25.    StartUpPosition =   3  'Windows Default
  26.    Begin VB.TextBox Text1 
  27.       BeginProperty Font 
  28.          Name            =   "MS Sans Serif"
  29.          Size            =   8.25
  30.          Charset         =   0
  31.          Weight          =   400
  32.          Underline       =   0   'False
  33.          Italic          =   0   'False
  34.          Strikethrough   =   0   'False
  35.       EndProperty
  36.       Height          =   2535
  37.       Left            =   15
  38.       MultiLine       =   -1  'True
  39.       ScrollBars      =   3  'Both
  40.       TabIndex        =   29
  41.       Top             =   5520
  42.       Width           =   3135
  43.    End
  44.    Begin VB.CheckBox chpop 
  45.       BackColor       =   &H00C0C0FF&
  46.       Caption         =   "No popup"
  47.       Height          =   255
  48.       Left            =   120
  49.       TabIndex        =   26
  50.       Top             =   4440
  51.       Width           =   1575
  52.    End
  53.    Begin VB.CheckBox Check2 
  54.       BackColor       =   &H00C0C0FF&
  55.       Caption         =   "Always On top"
  56.       Height          =   255
  57.       Left            =   120
  58.       TabIndex        =   23
  59.       Top             =   4080
  60.       Value           =   1  'Checked
  61.       Width           =   1575
  62.    End
  63.    Begin VB.CommandButton Command1 
  64.       Appearance      =   0  'Flat
  65.       BackColor       =   &H00C0C0FF&
  66.       Caption         =   "Update"
  67.       Height          =   255
  68.       Left            =   2160
  69.       MaskColor       =   &H00C0C0FF&
  70.       Style           =   1  'Graphical
  71.       TabIndex        =   1
  72.       Top             =   3720
  73.       UseMaskColor    =   -1  'True
  74.       Width           =   855
  75.    End
  76.    Begin VB.CheckBox Check1 
  77.       BackColor       =   &H00C0C0FF&
  78.       Caption         =   "Load at startup with windows"
  79.       Height          =   255
  80.       Left            =   120
  81.       TabIndex        =   22
  82.       Top             =   4800
  83.       Width           =   2895
  84.    End
  85.    Begin VB.TextBox txtPd 
  86.       BeginProperty Font 
  87.          Name            =   "Comic Sans MS"
  88.          Size            =   8.25
  89.          Charset         =   0
  90.          Weight          =   700
  91.          Underline       =   0   'False
  92.          Italic          =   0   'False
  93.          Strikethrough   =   0   'False
  94.       EndProperty
  95.       Height          =   300
  96.       Left            =   1440
  97.       TabIndex        =   10
  98.       Top             =   2880
  99.       Width           =   975
  100.    End
  101.    Begin VB.TextBox txtPr 
  102.       BeginProperty Font 
  103.          Name            =   "Comic Sans MS"
  104.          Size            =   8.25
  105.          Charset         =   0
  106.          Weight          =   700
  107.          Underline       =   0   'False
  108.          Italic          =   0   'False
  109.          Strikethrough   =   0   'False
  110.       EndProperty
  111.       Height          =   300
  112.       Left            =   1440
  113.       TabIndex        =   9
  114.       Top             =   3360
  115.       Width           =   975
  116.    End
  117.    Begin VB.Timer Timer1 
  118.       Interval        =   1000
  119.       Left            =   360
  120.       Top             =   8400
  121.    End
  122.    Begin VB.TextBox txtC 
  123.       Enabled         =   0   'False
  124.       BeginProperty Font 
  125.          Name            =   "Comic Sans MS"
  126.          Size            =   8.25
  127.          Charset         =   0
  128.          Weight          =   700
  129.          Underline       =   0   'False
  130.          Italic          =   0   'False
  131.          Strikethrough   =   0   'False
  132.       EndProperty
  133.       Height          =   300
  134.       Left            =   1440
  135.       TabIndex        =   6
  136.       Top             =   1800
  137.       Width           =   975
  138.    End
  139.    Begin VB.TextBox txtTt 
  140.       Enabled         =   0   'False
  141.       BeginProperty Font 
  142.          Name            =   "Comic Sans MS"
  143.          Size            =   8.25
  144.          Charset         =   0
  145.          Weight          =   700
  146.          Underline       =   0   'False
  147.          Italic          =   0   'False
  148.          Strikethrough   =   0   'False
  149.       EndProperty
  150.       ForeColor       =   &H80000011&
  151.       Height          =   300
  152.       Left            =   1440
  153.       TabIndex        =   5
  154.       Top             =   1320
  155.       Width           =   975
  156.    End
  157.    Begin VB.TextBox txtTd 
  158.       Enabled         =   0   'False
  159.       Height          =   330
  160.       Left            =   1440
  161.       TabIndex        =   4
  162.       Top             =   720
  163.       Width           =   1455
  164.    End
  165.    Begin VB.TextBox txtTc 
  166.       Enabled         =   0   'False
  167.       Height          =   315
  168.       Left            =   1440
  169.       TabIndex        =   3
  170.       Top             =   240
  171.       Width           =   1455
  172.    End
  173.    Begin VB.Label Label14 
  174.       BackColor       =   &H008080FF&
  175.       Caption         =   "Move mouse over this to close"
  176.       BeginProperty Font 
  177.          Name            =   "MS Sans Serif"
  178.          Size            =   8.25
  179.          Charset         =   0
  180.          Weight          =   400
  181.          Underline       =   0   'False
  182.          Italic          =   0   'False
  183.          Strikethrough   =   0   'False
  184.       EndProperty
  185.       Height          =   255
  186.       Left            =   0
  187.       TabIndex        =   30
  188.       Top             =   8040
  189.       Width           =   3165
  190.    End
  191.    Begin VB.Label Label13 
  192.       AutoSize        =   -1  'True
  193.       BackStyle       =   0  'Transparent
  194.       Caption         =   "View log"
  195.       BeginProperty Font 
  196.          Name            =   "Comic Sans MS"
  197.          Size            =   9
  198.          Charset         =   0
  199.          Weight          =   700
  200.          Underline       =   -1  'True
  201.          Italic          =   0   'False
  202.          Strikethrough   =   0   'False
  203.       EndProperty
  204.       Height          =   240
  205.       Left            =   1920
  206.       TabIndex        =   28
  207.       Top             =   4080
  208.       Width           =   690
  209.    End
  210.    Begin VB.Label Label12 
  211.       AutoSize        =   -1  'True
  212.       BackStyle       =   0  'Transparent
  213.       Caption         =   "Reset log"
  214.       BeginProperty Font 
  215.          Name            =   "Comic Sans MS"
  216.          Size            =   9
  217.          Charset         =   0
  218.          Weight          =   700
  219.          Underline       =   -1  'True
  220.          Italic          =   0   'False
  221.          Strikethrough   =   0   'False
  222.       EndProperty
  223.       Height          =   240
  224.       Left            =   1920
  225.       TabIndex        =   27
  226.       Top             =   4440
  227.       Width           =   810
  228.    End
  229.    Begin VB.Label Label5 
  230.       AutoSize        =   -1  'True
  231.       BackStyle       =   0  'Transparent
  232.       Caption         =   "Pop up"
  233.       Height          =   240
  234.       Left            =   1080
  235.       TabIndex        =   25
  236.       Top             =   5160
  237.       Width           =   525
  238.    End
  239.    Begin VB.Label Label11 
  240.       AutoSize        =   -1  'True
  241.       BackStyle       =   0  'Transparent
  242.       Caption         =   "Hide"
  243.       Height          =   240
  244.       Left            =   1800
  245.       TabIndex        =   24
  246.       Top             =   5160
  247.       Width           =   390
  248.    End
  249.    Begin VB.Label Label3 
  250.       BackStyle       =   0  'Transparent
  251.       Height          =   615
  252.       Left            =   8
  253.       TabIndex        =   15
  254.       Top             =   2160
  255.       Width           =   3135
  256.    End
  257.    Begin VB.Image Image1 
  258.       Height          =   255
  259.       Left            =   840
  260.       Stretch         =   -1  'True
  261.       Top             =   2280
  262.       Width           =   255
  263.    End
  264.    Begin VB.Label Label10 
  265.       BackStyle       =   0  'Transparent
  266.       Caption         =   "Units"
  267.       Height          =   240
  268.       Left            =   2445
  269.       TabIndex        =   21
  270.       Top             =   3360
  271.       Width           =   450
  272.    End
  273.    Begin VB.Label Label9 
  274.       BackStyle       =   0  'Transparent
  275.       Caption         =   "Seconds"
  276.       Height          =   240
  277.       Left            =   2445
  278.       TabIndex        =   20
  279.       Top             =   2880
  280.       Width           =   690
  281.    End
  282.    Begin VB.Label Label8 
  283.       BackStyle       =   0  'Transparent
  284.       Caption         =   "Units"
  285.       Height          =   240
  286.       Left            =   2450
  287.       TabIndex        =   19
  288.       Top             =   1800
  289.       Width           =   450
  290.    End
  291.    Begin VB.Label Label7 
  292.       BackStyle       =   0  'Transparent
  293.       Caption         =   "hr:min:s"
  294.       BeginProperty Font 
  295.          Name            =   "Comic Sans MS"
  296.          Size            =   8.25
  297.          Charset         =   0
  298.          Weight          =   700
  299.          Underline       =   0   'False
  300.          Italic          =   0   'False
  301.          Strikethrough   =   0   'False
  302.       EndProperty
  303.       Height          =   240
  304.       Left            =   2450
  305.       TabIndex        =   18
  306.       Top             =   1320
  307.       Width           =   690
  308.    End
  309.    Begin VB.Label Label6 
  310.       AutoSize        =   -1  'True
  311.       BackStyle       =   0  'Transparent
  312.       Caption         =   " About"
  313.       Height          =   240
  314.       Left            =   2280
  315.       TabIndex        =   17
  316.       Top             =   5160
  317.       Width           =   585
  318.    End
  319.    Begin VB.Label Label2 
  320.       AutoSize        =   -1  'True
  321.       BackStyle       =   0  'Transparent
  322.       Caption         =   "Status : "
  323.       Height          =   240
  324.       Left            =   0
  325.       TabIndex        =   14
  326.       Top             =   2280
  327.       Width           =   810
  328.    End
  329.    Begin VB.Label Label1 
  330.       AutoSize        =   -1  'True
  331.       BackStyle       =   0  'Transparent
  332.       Caption         =   "Offline"
  333.       Height          =   240
  334.       Left            =   1560
  335.       TabIndex        =   13
  336.       Top             =   2280
  337.       Width           =   615
  338.    End
  339.    Begin VB.Label lblPd 
  340.       AutoSize        =   -1  'True
  341.       BackStyle       =   0  'Transparent
  342.       Caption         =   "Duration of Pulse"
  343.       Height          =   240
  344.       Left            =   0
  345.       TabIndex        =   12
  346.       Top             =   2880
  347.       Width           =   1485
  348.    End
  349.    Begin VB.Label LblPr 
  350.       AutoSize        =   -1  'True
  351.       BackStyle       =   0  'Transparent
  352.       Caption         =   "Rate/Pulse"
  353.       Height          =   240
  354.       Left            =   0
  355.       TabIndex        =   11
  356.       Top             =   3360
  357.       Width           =   930
  358.    End
  359.    Begin VB.Shape Shape2 
  360.       BackColor       =   &H00C0C0FF&
  361.       BackStyle       =   1  'Opaque
  362.       Height          =   1215
  363.       Left            =   15
  364.       Top             =   2760
  365.       Width           =   3135
  366.    End
  367.    Begin VB.Label lblC 
  368.       AutoSize        =   -1  'True
  369.       BackStyle       =   0  'Transparent
  370.       Caption         =   "Total Cost"
  371.       Height          =   240
  372.       Left            =   120
  373.       TabIndex        =   8
  374.       Top             =   1800
  375.       Width           =   900
  376.    End
  377.    Begin VB.Label lblTt 
  378.       AutoSize        =   -1  'True
  379.       BackStyle       =   0  'Transparent
  380.       Caption         =   "Total Time"
  381.       Height          =   240
  382.       Left            =   120
  383.       TabIndex        =   7
  384.       Top             =   1320
  385.       Width           =   930
  386.    End
  387.    Begin VB.Label lblTd 
  388.       AutoSize        =   -1  'True
  389.       BackStyle       =   0  'Transparent
  390.       Caption         =   "Disconected"
  391.       Height          =   240
  392.       Left            =   120
  393.       TabIndex        =   2
  394.       Top             =   720
  395.       Width           =   1035
  396.    End
  397.    Begin VB.Label lblTc 
  398.       AutoSize        =   -1  'True
  399.       BackStyle       =   0  'Transparent
  400.       Caption         =   "Connected"
  401.       Height          =   240
  402.       Left            =   120
  403.       TabIndex        =   0
  404.       Top             =   240
  405.       Width           =   870
  406.    End
  407.    Begin VB.Line Line1 
  408.       X1              =   30
  409.       X2              =   3150
  410.       Y1              =   1200
  411.       Y2              =   1200
  412.    End
  413.    Begin VB.Shape Shape1 
  414.       BackColor       =   &H00C0C0FF&
  415.       BackStyle       =   1  'Opaque
  416.       Height          =   2175
  417.       Left            =   8
  418.       Top             =   0
  419.       Width           =   3135
  420.    End
  421.    Begin VB.Label Label4 
  422.       BackColor       =   &H008080FF&
  423.       Height          =   135
  424.       Left            =   0
  425.       TabIndex        =   16
  426.       Top             =   5400
  427.       Width           =   3165
  428.    End
  429.    Begin VB.Menu popup 
  430.       Caption         =   "Popup"
  431.       Visible         =   0   'False
  432.       Begin VB.Menu open 
  433.          Caption         =   "Open"
  434.       End
  435.       Begin VB.Menu hide 
  436.          Caption         =   "Hide"
  437.       End
  438.       Begin VB.Menu sep 
  439.          Caption         =   "-"
  440.       End
  441.       Begin VB.Menu exit 
  442.          Caption         =   "Exit"
  443.       End
  444.    End
  445. Attribute VB_Name = "frmNet"
  446. Attribute VB_GlobalNameSpace = False
  447. Attribute VB_Creatable = False
  448. Attribute VB_PredeclaredId = True
  449. Attribute VB_Exposed = False
  450. Option Explicit
  451. 'Only for you.Please don't distribute this code as such
  452. 'Only exe be distributed and don't take credit for parts that
  453. 'u didn't develop and please don't change the original log file details.
  454. 'You can add your own stuff there.
  455. 'Any modification suggestions are always welcome.
  456. 'If you make modification send the new code to me so that I too can study
  457. 'something new.
  458. Dim Pic As Boolean  'To twinkle the two computers
  459. Private Sub Form_Load()
  460. Me.WindowState = 0                              'Normal window state
  461. Set Iconobj = LoadResPicture(101, 1)         'Load from res file
  462. Image1.Picture = LoadResPicture(101, 1)
  463. AddIcon frmNet, Iconobj.Handle, Iconobj   'Add to tray
  464.                                                 'Set position to the topmost.
  465. SetWindowPos Me.hWnd, HWND_TOPMOST, Me.Left / 15, Me.Top / 15, Me.Width / 15, _
  466.                             Me.Height / 15, SWP_NOACTIVATE Or SWP_SHOWWINDOW
  467. If Dir("c:\IULog.txt") = "" Then 'It is the first time u are running this app
  468.     Open "c:\IULog.txt" For Append As #1 'I think that c drive is there in every
  469.                                          'machine.Use app.path if u think not :-)
  470. '    A little bit about me. If you are not a very busy person,
  471. '    don 't forget to give me a postcard of your place(or a stamp or a coin.)
  472. '    or a photo of your country side.  It's my hobby to collect stamps, coins
  473. '    and photos of different place/countries. The email killed the snailmail
  474. '    but I love to have them going so that I am not bored by 'outlooks'.
  475. '    I do hope that you have already given 5 globes for my effort.
  476. '    Thank you for that. Please vote and encourage me to submit
  477. '    further beautiful codes.
  478. '    Visit http://ajsoftware.freeserver.com/index. It contains an
  479. '    activex counter,developed by me.
  480.         
  481.     Print #1, "===================================" & vbCrLf & _
  482.               "Log Of Internet Usage. Ver 1.00" & vbCrLf & _
  483.               "Designed and created by Anaz Jaleel," & vbCrLf & _
  484.               "Anazview, Punnathala, Kollam,Kerala," & vbCrLf & _
  485.               "India.Pin-691012.If you get time," & vbCrLf & _
  486.               "send me a postcard or a photo of " & vbCrLf & _
  487.               "your place or drop a mail at" & vbCrLf & _
  488.               "anaz@operamail.com" & vbCrLf & vbCrLf & _
  489.               "Please notify any bugs." & vbCrLf & _
  490.               "Logging Started on" & vbCrLf & "   " & _
  491.               Format$(Now, "dddd, mmm d, yyyy") & vbCrLf & _
  492.               "===================================" & vbCrLf
  493.     Close #1
  494.     'Some thing are to be remembered and this is better that usual
  495.     'savesetting and getsetting. Here we are actually reseting the log
  496.     SaveSettingString HKEY_LOCAL_MACHINE, "Software\AjSoft\NetUsage\Data\Time", "Amount", 0
  497.     SaveSettingString HKEY_LOCAL_MACHINE, "Software\AjSoft\NetUsage\Data\Time", "TotalTime", 0
  498.     SaveSettingString HKEY_LOCAL_MACHINE, "Software\AjSoft\NetUsage\Data\Cost", "Duration", "180"
  499.     SaveSettingString HKEY_LOCAL_MACHINE, "Software\AjSoft\NetUsage\Data\Cost", "PulseRate", "1.20"
  500. End If
  501. If GetSettingString(HKEY_LOCAL_MACHINE, "Software\Microsoft\Windows\CurrentVersion\Run", "NetUsage", "") = "" Then
  502. Check1.Value = 0        'Dont show at startup
  503. Check1.Value = 1        'Show at startup is selected previously and now we are
  504.                         'running with windows
  505. End If
  506.                         'Fill the form details with previous values
  507. txtPd.Text = GetSettingString(HKEY_LOCAL_MACHINE, "Software\AjSoft\NetUsage\Data\Cost", "Duration", "180")
  508. txtPr.Text = GetSettingString(HKEY_LOCAL_MACHINE, "Software\AjSoft\NetUsage\Data\Cost", "PulseRate", "1.20")
  509. txtTt.Text = ConvertTime(GetSettingString(HKEY_LOCAL_MACHINE, "Software\AjSoft\NetUsage\Data\Time", "TotalTime", "0"))
  510. txtC.Text = GetSettingString(HKEY_LOCAL_MACHINE, "Software\AjSoft\NetUsage\Data\Time", "Amount", "0")
  511. End Sub
  512. Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
  513. If Connected Then
  514.                         'The connection is not terminated,but our program is!
  515.     LogStopTime         'Any way record it
  516.     Open "c:\IULog.txt" For Append As #1 'Append to the file the details of this
  517.                                          'Session, together with this note
  518.     Print #1, "The program may have been terminated " & vbCrLf & _
  519.               "before internet is disconnected." & vbCrLf & _
  520.               "Log may be incorrect!" & vbCrLf & _
  521.               "
  522.     Close #1
  523. End If
  524. End Sub
  525. Private Sub hide_Click()
  526. Me.hide                 'Hide form
  527. End Sub
  528. Private Sub Label11_Click()
  529. Me.hide                 'Hide form
  530. End Sub
  531. Private Sub Label12_Click()
  532. Dim choice As VbMsgBoxResult
  533. If Connected Then GoTo 10   'Foul play
  534.                             'Can use password protection
  535. choice = MsgBox("Reset Log button is clicked.Are you sure?", vbYesNo, "Reseting..........")
  536. If choice = vbYes Then ReSetlog
  537. 10 End Sub
  538. Private Sub Label14_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  539. Label14.Enabled = False
  540. Dim i As Integer
  541. For i = 8610 To 5850 Step -1
  542. DoEvents
  543. Me.Height = i
  544. Next i
  545. Text1.Text = ""
  546. Label4.Enabled = True 'To enable the next part to be closed
  547. End Sub
  548. Private Sub Label3_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  549. Dim i As Integer
  550. For i = 3020 To 5850
  551. DoEvents                 'Slowly drop down the needed part
  552. Me.Height = i
  553. Next i
  554. Label4.Enabled = True   'Enable the closing 'key'
  555. End Sub
  556. Private Sub Label4_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
  557. Label4.Enabled = False  'Or else you will get another effect!Try it.
  558. Dim i As Integer
  559. For i = 5850 To 3020 Step -1 'To go backwards
  560. DoEvents                'Fold up the form.For this effect you can use Do Until
  561. Me.Height = i           'See the following for such an example.
  562. 'http://www.planet-source-code.com/vb/scripts/ShowCode.asp?lngWId=1&txtCodeId=14911
  563. 'This tries to copy the MSN Messenger's way of showing form when you log on with
  564. 'an hyperlink int the form. If u use a little brain then you can design a code
  565. 'ticker as seen on this place
  566. 'Rate that too.
  567. 'I found it useful here also.See later parts of the code
  568. Next i
  569. End Sub
  570. Private Sub Label5_Click()
  571. Load Form1
  572. Form1.Timer1.Enabled = True
  573. End Sub
  574. Private Sub Label6_Click()
  575. Load frmAbout
  576. frmAbout.Show
  577. End Sub
  578. Private Sub Timer1_Timer()
  579. Connected = IsConnected
  580. l = GetCursorPos(a)
  581. If (a.X > (Screen.Width * 0.9 / Screen.TwipsPerPixelX)) And _
  582. (a.Y > (Screen.Height * 0.97 / Screen.TwipsPerPixelY)) Then
  583. 'SetCursorPos (Screen.Width * 0.9 / Screen.TwipsPerPixelX) - 5, (Screen.Height * 0.97 / Screen.TwipsPerPixelY) - 5
  584. 'The above code will throw the cursor around.It annoy people
  585. Load Form1                      'A simple pop up message
  586. Form1.Timer1.Enabled = True
  587. End If
  588. 'Connected = CBool(Check3.Value) 'I used this to test it over and over again
  589.                                 'So that it is bug free.Notify if any found
  590.                                 'Note:I work on Win98 machine
  591. If Connected Then
  592.     Label1.Caption = "Online :" & ConvertTime(Timer - TimeConnected)
  593.                             'Difference in time to update the label
  594.     If Pic Then
  595.         Image1.Picture = LoadResPicture(102, 1): Pic = False
  596.                             'Toggle with the pic.
  597.                             'I first inteded to modify the tray also
  598.                             'but if you are careless and internet connection
  599.                             'is slow surely there will be confusion
  600.     Else
  601.         Image1.Picture = LoadResPicture(103, 1): Pic = True
  602.     End If
  603. End If
  604. If Connected And LogStarted = False Then
  605.     TimeConnected = Timer   'This is another method to find the duration
  606.                             'without any api call.
  607.                             'The time we connected is stored here
  608.                             '    B
  609. Ialse
  610. Attribut        ic closindResot Sub
  611. Private Sub Label5_Click()
  612. Load Form1
  613. Form1.Timer Falsektege "Onle theA1.Timer1.Enabled = True
  614. Hrsor around.It annoy people
  615. Load Formaersorlonfusion
  616. 0bOBen.TwTimerTwTimWlA Win98 m       asfr3i5eI1.Enabled = True
  617. Hrsor around.Irsimple pop up message
  618. Form1.Timer1.Enabled = True
  619. End If
  620. 'Connimp1a around.54d0 To 3020 Step -1 'To go backwar4ons Step -1 'To go backwards
  621. DoEvents                'Fold up the form.For this effect you can use Do Unt9hSunt9hSunt9hSunt9hSunt9hSunt9hSunt9hSunt9hSunt9hSunt9hSunt9hS
  622.       Caption         =   ion         =   ion        a6trsor)kTop  t9hoEvents                'Fold up tIitttribut use a :de form
  623. End Sub
  624. .mc/nu/bI = "Online :" & Convert nbI = we conneoeom/nu/bI =BAictxtCod       mXVann use a :de form
  625. End Sub
  626. .mc/nu/bI = "Online aget9hSunt9hSunt9hSunt9hSunt9hSunt9hSunt9hSuno.      YWidth * 0.9 / Screen.TwipsPerPixelX)) And _
  627. (a.Y > (Screen.Height * 0.97 / Screen.TwipsPerPixe= we conneC.Heigheen.Height * 0.97 /"" Then 'It is the first time u are running this app
  628.     Open "c:\IULog.txt" For Append As #1 'I think that c drive is ther7YuAppend As #1 'I think that c drint9ho FoSllse
  629.        Onlh9hS.97 .It    ion         n5e ar enable the next part to be closed
  630. End Sub
  631. Private Sub a aroconneC.HBmuXW:5end Sub
  632. Private Sub a:\IULog.tx n usnlherPixe= we cuvL n\CIt    ion         n Cursof n\CIt    ion         Lst naRoCt ht *1a aroundto:aa     (CRoCtt be closed
  633. End Subgned and creat\lde to me so 8wt rm
  634.  YWidth bled =adreatl               'Fold up tIitttreSDnSubgde to me s9    
  635. Ens3haeA1ReseC  'Fold up tIitttribut use a :llse
  636.     Openy AniSub a aroc
  637. oEven runningr next parta ure(10wp=   2880
  638.  YWidth bled =adreatl               'Fold up tIitttreSDnSubgde to me s9    
  639. Ens3haeA1ReseC  'Fold up tIitttribut use a :llse
  640.     Openy AniSub a aroc
  641. oEven runningr next parta ure(10wp=   2880
  642.  YWidth bled =adreatl               'Fold up tIitttreSDncpS.RCn
  643.     Openy AniSub a aroc
  644. 8IULog.txt" For 4
  645.  Yp "))
  646. eny AniSuBa o.      YWidth(10le5
  647. Fod Sub
  648. eny AniSuBa o.      YWidtsfop up    945
  649.       TabIndex        =  Ba eue = coS8eae=uf 2p tIoSspven runningr next parta ure(10wp=   2880
  650.  YWLogSta runningr nextr #1, "The program may have been terminated " & vbCrLf & _
  651.               "befobd.It annoydgStas up tse
  652. pCsindd up tI ion e5
  653. elheue = c Top  rta ure(1 tI ion e5
  654. 0ntera= 861 "The sop  rtspven
  655.     BAic: runnioo me so 880
  656.  YWitera= 86no.t annoydgStas up tse
  657. pCsindd up tI ion3ra= 86naFor 4
  658. 8    TabIndex        =  Ba eue = coS8eae=uf 2p tIoSspven runningr nConnected And LogStarted = False Then
  659.     TimeConnected = Timer   'This is another method to find the duration
  660.                             'without any api call.
  661.                             'The time we connected is stored here
  662.                           .Height uq2'Index        =  Ba eue = coS8eastreSDncpSpven
  663.     BAic: runnioo me so 880
  664.  YWitera= 86no.t annoydgStas07se0r       r arounaNL8lblPd TimeptioAnext partae0r       r arounaNL8lblPd TimeptioAnext partae0r       r arounaNL8lblPd TimeptioAnext partae 
  665. Priay       n Cursof n\CIt    ion         Lst naRoCt sut is the first time u are running this app
  666.     Open "c:\IULog.txt" For Append As #1 'I think thano.t annoydblPpp
  667.     O.txtlA Wi     e poobd.Iectee the neFor i  'FoftwB.t anTnn
  668.        asfr3i5dTrue
  669. EnEblPd TimeptioAnext partae 
  670. Priay u are a th6s07se0rCaptioameptioAc.
  671. wminate:'FoftwB.t anT"(10wdu,:)dPriaysowe ven
  672.     BAic: runnyC   26s07se0rCaptioameptioAc.
  673. wminate:'FoftwB.t anT"(10wdu,:)dPriaysowe ven
  674.     BAic: runnyC   26s07se0rCaptio    BAic: runnyC   26s07se0rCant iaouext partae0r       r arounaNL8lbis!
  675.     LogStopTime         'Any wnaNL8lblPd TimeptioAnext pa4e0rC erswesi90:de for anT"(10wduc7   .le pop up message
  676. Form1.Timer1.Enabled = p
  677.    Append A A Unti tpup moAnext pE sit http:frlIULoglc/cw gop=   prpnlup tIitttribut use a :llse
  678. )dPrE       =   0
  679.       TabIndex        =   12
  680.       Top             =   2880
  681.  od Sub
  682.  pa4.een.Width * 80
  683.  od Sub
  684.  pa4.een.Width * 8
  685.