Visual Basic 60 Projects With Source Code Portable
Option Explicit Private Sub Form_Load() Me.Caption = "Portable Text Editor v1.0" txtEditor.Text = "" Call Form_Resize End Sub Private Sub Form_Resize() On Error Resume Next txtEditor.Move 0, 0, Me.ScaleWidth, Me.ScaleHeight End Sub ' Fast portable file loading routine Public Sub LoadFile(ByVal FilePath As String) Dim FileNum As Integer Dim FileContent As String If FilePath = "" Then Exit Sub FileNum = FreeFile Open FilePath For Input As #FileNum FileContent = Input$(LOF(FileNum), FileNum) Close #FileNum txtEditor.Text = FileContent End Sub ' Fast portable file saving routine Public Sub SaveFile(ByVal FilePath As String) Dim FileNum As Integer If FilePath = "" Then Exit Sub FileNum = FreeFile Open FilePath For Output As #FileNum Print #FileNum, txtEditor.Text Close #FileNum End Sub Use code with caution. Project 2: Portable System Performance Monitor
Public Declare Sub GetSystemInfo Lib "kernel32" (lpSystemInfo As SYSTEM_INFO) Public Type SYSTEM_INFO dwOemId As Long dwPageSize As Long lpMinimumApplicationAddress As Long lpMaximumApplicationAddress As Long dwActiveProcessorMask As Long dwNumberOfProcessors As Long dwProcessorType As Long dwAllocationGranularity As Long wProcessorLevel As Integer wProcessorRevision As Integer End Type Use code with caution. Form Code ( frmSysMon.frm ) visual basic 60 projects with source code portable
If you want your compiled .exe files to run smoothly on any workstation without crashing with "Component not correctly registered" errors, strictly adhere to these three rules: 1. Avoid Common Controls ( MSCOMCTL.OCX ) Option Explicit Private Sub Form_Load() Me