Projects

Find all our projects in development below.
All source code is GNU General Public License (GPL)

JavaTweakz

Browsing frmMain.frm (27.16 KB)

VERSION 5.00
Begin VB.Form frmMain 
   Appearance      =   0  'Flat
   BackColor       =   &H80000005&
   BorderStyle     =   1  'Fixed Single
   Caption         =   "JavaTweakz"
   ClientHeight    =   4830
   ClientLeft      =   45
   ClientTop       =   450
   ClientWidth     =   6870
   BeginProperty Font 
      Name            =   "Tahoma"
      Size            =   8.25
      Charset         =   0
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   Icon            =   "frmMain.frx":0000
   MaxButton       =   0   'False
   ScaleHeight     =   322
   ScaleMode       =   3  'Pixel
   ScaleWidth      =   458
   StartUpPosition =   2  'CenterScreen
   Begin VB.Timer timerToolTipDelay 
      Enabled         =   0   'False
      Interval        =   1000
      Left            =   0
      Top             =   0
   End
   Begin VB.Frame frameMemory 
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      Caption         =   "Memory Tweaks"
      ForeColor       =   &H80000008&
      Height          =   1935
      Left            =   120
      TabIndex        =   12
      Top             =   2280
      Width           =   3255
      Begin VB.CheckBox chkClearPageFileAtShutdown 
         Appearance      =   0  'Flat
         BackColor       =   &H80000005&
         Caption         =   "&ClearPageFileAtShutdown"
         ForeColor       =   &H80000008&
         Height          =   255
         Left            =   240
         TabIndex        =   15
         Top             =   1080
         Width           =   2775
      End
      Begin VB.CheckBox chkDisablePagingExecutive 
         Appearance      =   0  'Flat
         BackColor       =   &H80000005&
         Caption         =   "&DisablePagingExecutive"
         ForeColor       =   &H80000008&
         Height          =   255
         Left            =   240
         TabIndex        =   14
         Top             =   720
         Width           =   2775
      End
      Begin VB.CheckBox chkLargeSystemCache 
         Appearance      =   0  'Flat
         BackColor       =   &H80000005&
         Caption         =   "&LargeSystemCache"
         ForeColor       =   &H80000008&
         Height          =   255
         Left            =   240
         TabIndex        =   13
         Top             =   360
         Width           =   2775
      End
   End
   Begin VB.Frame frameNetwork 
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      Caption         =   "Network Tweaks"
      ForeColor       =   &H80000008&
      Height          =   1935
      Left            =   3480
      TabIndex        =   8
      Top             =   120
      Width           =   3255
      Begin VB.CheckBox chkDisableFirewall 
         Appearance      =   0  'Flat
         BackColor       =   &H80000005&
         Caption         =   "D&isable Windows Firewall Protection"
         ForeColor       =   &H80000008&
         Height          =   375
         Left            =   240
         TabIndex        =   11
         Top             =   1320
         Width           =   2775
      End
      Begin VB.CheckBox chkSharedFolders 
         Appearance      =   0  'Flat
         BackColor       =   &H80000005&
         Caption         =   "&Remove Shared Folders from My Computer"
         ForeColor       =   &H80000008&
         Height          =   495
         Left            =   240
         TabIndex        =   10
         Top             =   720
         Width           =   2775
      End
      Begin VB.CheckBox chkSchTasks 
         Appearance      =   0  'Flat
         BackColor       =   &H80000005&
         Caption         =   "D&o Not Check For Scheduled Tasks on Network"
         ForeColor       =   &H80000008&
         Height          =   495
         Left            =   240
         TabIndex        =   9
         Top             =   240
         Width           =   2775
      End
   End
   Begin VB.Frame frameSystem 
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      Caption         =   "System Tweaks"
      ForeColor       =   &H80000008&
      Height          =   1935
      Left            =   3480
      TabIndex        =   16
      Top             =   2280
      Width           =   3255
      Begin VB.CheckBox chkClearRecentDocsOnExit 
         Appearance      =   0  'Flat
         BackColor       =   &H80000005&
         Caption         =   "ClearRecent&DocsOnExit"
         ForeColor       =   &H80000008&
         Height          =   255
         Left            =   240
         TabIndex        =   20
         Top             =   1440
         Width           =   2775
      End
      Begin VB.CheckBox chkAlwaysUnloadDLL 
         Appearance      =   0  'Flat
         BackColor       =   &H80000005&
         Caption         =   "A&lwaysUnloadDLL"
         ForeColor       =   &H80000008&
         Height          =   255
         Left            =   240
         TabIndex        =   19
         Top             =   1080
         Width           =   2775
      End
      Begin VB.CheckBox chkZipSupport 
         Appearance      =   0  'Flat
         BackColor       =   &H80000005&
         Caption         =   "R&emove Windows Zip File Support"
         ForeColor       =   &H80000008&
         Height          =   255
         Left            =   240
         TabIndex        =   18
         Top             =   720
         Width           =   2775
      End
      Begin VB.CheckBox chkSFCDisable 
         Appearance      =   0  'Flat
         BackColor       =   &H80000005&
         Caption         =   "&SFCDisable"
         ForeColor       =   &H80000008&
         Height          =   255
         Left            =   240
         TabIndex        =   17
         Top             =   360
         Width           =   2535
      End
   End
   Begin VB.Frame frameDesktop 
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      Caption         =   "Desktop Tweaks"
      ForeColor       =   &H80000008&
      Height          =   1935
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   3255
      Begin VB.TextBox txtWaitToKillServiceTimeout 
         Appearance      =   0  'Flat
         Height          =   285
         Left            =   2160
         MaxLength       =   8
         TabIndex        =   7
         Text            =   "4000"
         Top             =   1440
         Width           =   855
      End
      Begin VB.TextBox txtHungAppTimeout 
         Appearance      =   0  'Flat
         Height          =   285
         Left            =   2160
         MaxLength       =   8
         TabIndex        =   5
         Text            =   "5000"
         Top             =   1080
         Width           =   855
      End
      Begin VB.TextBox txtMenuShowDelay 
         Appearance      =   0  'Flat
         Height          =   285
         Left            =   2160
         MaxLength       =   8
         TabIndex        =   2
         Text            =   "0"
         Top             =   360
         Width           =   855
      End
      Begin VB.CheckBox chkAutoEndTasks 
         Appearance      =   0  'Flat
         BackColor       =   &H80000005&
         Caption         =   "&AutoEndTasks"
         ForeColor       =   &H80000008&
         Height          =   255
         Left            =   240
         TabIndex        =   3
         Top             =   720
         Width           =   2775
      End
      Begin VB.Label lblWaitToKillServiceTimeout 
         Appearance      =   0  'Flat
         BackColor       =   &H80000005&
         Caption         =   "&WaitToKillServiceTimeout:"
         ForeColor       =   &H80000008&
         Height          =   255
         Left            =   240
         TabIndex        =   6
         Top             =   1450
         Width           =   1935
      End
      Begin VB.Label lblHungAppTimeout 
         Appearance      =   0  'Flat
         BackColor       =   &H80000005&
         Caption         =   "&HungAppTimeout:"
         ForeColor       =   &H80000008&
         Height          =   255
         Left            =   240
         TabIndex        =   4
         Top             =   1110
         Width           =   1815
      End
      Begin VB.Label lblMenuShowDelay 
         Appearance      =   0  'Flat
         BackColor       =   &H80000005&
         Caption         =   "&MenuShowDelay:"
         ForeColor       =   &H80000008&
         Height          =   255
         Left            =   240
         TabIndex        =   1
         Top             =   390
         Width           =   1815
      End
   End
   Begin VB.Label lblNote1 
      BackStyle       =   0  'Transparent
      Caption         =   "Note:"
      Height          =   375
      Left            =   120
      TabIndex        =   22
      Top             =   4320
      Width           =   735
   End
   Begin VB.Label lblNote2 
      BackStyle       =   0  'Transparent
      Caption         =   "Any changes that you make using this program will require a system restart before they take effect."
      Height          =   375
      Left            =   960
      TabIndex        =   21
      Top             =   4320
      Width           =   5775
   End
End
Attribute VB_Name = "frmMain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Public objCtrl As Object

Private LastX As Single
Private LastY As Single

Private ToolTipsCol As New Collection

Private Const TOOLTIP_RESID = 1001


Private Function GetToolTip(ByVal sObjName As String) As String

    On Error Resume Next ' ignore item not found error
        
    GetToolTip = ToolTipsCol.Item(sObjName)
    
End Function

Private Sub AddToolTip(ByVal sName As String, ByVal sData As String)

    On Error GoTo ErrItemExists
       
    ToolTipsCol.Add sData, sName
    
    Exit Sub
    
ErrItemExists:
    
    ToolTipsCol.Remove sName
    ToolTipsCol.Add sData, sName
    
End Sub

Public Function GetResourceAsString(ByVal ResourceName As String, ByVal ResourceID As Integer, Optional bNullTerminator As Boolean) As String

    GetResourceAsString = StrConv(LoadResData(ResourceID, ResourceName), vbUnicode)
    
    If InStr(GetResourceAsString, vbNullChar) And bNullTerminator = True Then _
        GetResourceAsString = Left(GetResourceAsString, InStr(GetResourceAsString, vbNullChar) - 1)
        
End Function

Private Sub LoadToolTips()

    On Error GoTo ErrHandler

    Const OPTION_OBJNAME_OPEN = "<objname>"
    Const OPTION_OBJNAME_CLOSE = "</objname>"
    Const OPTION_TITLE_OPEN = "<title>"
    Const OPTION_TITLE_CLOSE = "</title>"
    Const OPTION_TOOLTIP_OPEN = "<tooltip>"
    Const OPTION_TOOLTIP_CLOSE = "</tooltip>"
    
    Dim sBuffer As String
    Dim sName As String
    Dim sData As String
    Dim iOffset1 As Long
    Dim iOffset2 As Long
    
    sBuffer = GetResourceAsString("TXT", TOOLTIP_RESID)
    
    iOffset1 = InStr(sBuffer, OPTION_OBJNAME_OPEN)
    
    Do While iOffset1 > 0
        
        iOffset1 = iOffset1 + Len(OPTION_OBJNAME_OPEN)
        iOffset2 = InStr(iOffset1, sBuffer, OPTION_OBJNAME_CLOSE)
        
        sName = Mid(sBuffer, iOffset1, iOffset2 - iOffset1)
        sData = ""
        
        iOffset1 = InStr(iOffset2, sBuffer, OPTION_TITLE_OPEN)
        iOffset1 = iOffset1 + Len(OPTION_TITLE_OPEN)
        iOffset2 = InStr(iOffset1, sBuffer, OPTION_TITLE_CLOSE)
        
        sData = Mid(sBuffer, iOffset1, iOffset2 - iOffset1) + "|"
            
        iOffset1 = InStr(iOffset2, sBuffer, OPTION_TOOLTIP_OPEN)
        iOffset1 = iOffset1 + Len(OPTION_TOOLTIP_OPEN)
        iOffset2 = InStr(iOffset1, sBuffer, OPTION_TOOLTIP_CLOSE)
        
        sData = sData + Mid(sBuffer, iOffset1, iOffset2 - iOffset1)
        
        If InStr(sData, "|") = 0 Then sData = "|" + sData
        
        AddToolTip sName, sData
        
        iOffset1 = InStr(iOffset2, sBuffer, OPTION_OBJNAME_OPEN)
        
    Loop
    
ErrHandler:

End Sub

Private Sub ProcessMouseMove(ByVal objHovered As Object, ByVal X As Single, ByVal Y As Single)

    If X <> LastX And Y <> LastY Then
    
        If Not (objCtrl Is Nothing) Then
        
            If objHovered.Name = objCtrl.Name Then Exit Sub
            
        End If
        
        Set objCtrl = objHovered
        
        LastX = X
        LastY = Y
        
        timerToolTipDelay.Enabled = True
        
    End If

End Sub

Private Sub ChangeFocus(ByVal objFocused As Object, ByVal bFocused As Boolean)

    Dim i As Integer
    Dim lColor As Long
    
    lColor = IIf(bFocused, vbRed, vbBlack)
    
    For i = 0 To Me.Controls.Count - 1
    
        If InStr(Me.Controls(i).Name, Mid(objFocused.Name, 4)) And _
            Me.Controls(i).Name <> objFocused.Name Then
        
            Me.Controls(i).ForeColor = lColor
            Exit For
        
        End If
        
    Next i
    
    objFocused.ForeColor = lColor
    objFocused.Container.ForeColor = lColor
            
End Sub

Private Sub chkAlwaysUnloadDLL_Click()

    If chkAlwaysUnloadDLL.Value = 0 Then
        DeleteKey HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\", "AlwaysUnloadDLL"
    Else
        SaveRegString HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AlwaysUnloadDLL\", "", "1"
    End If

End Sub

Private Sub chkAlwaysUnloadDLL_GotFocus()

    ChangeFocus chkAlwaysUnloadDLL, True

End Sub

Private Sub chkAlwaysUnloadDLL_LostFocus()

    ChangeFocus chkAlwaysUnloadDLL, False

End Sub

Private Sub chkAlwaysUnloadDLL_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)

    ProcessMouseMove chkAlwaysUnloadDLL, X, Y

End Sub

Private Sub chkAutoEndTasks_Click()

    SaveRegString HKEY_CURRENT_USER, "Control Panel\Desktop\", _
        "AutoEndTasks", CStr(chkAutoEndTasks.Value)

End Sub

Private Sub chkAutoEndTasks_GotFocus()

    ChangeFocus chkAutoEndTasks, True

End Sub

Private Sub chkAutoEndTasks_LostFocus()

    ChangeFocus chkAutoEndTasks, False

End Sub

Private Sub chkAutoEndTasks_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)

    ProcessMouseMove chkAutoEndTasks, X, Y

End Sub

Private Sub chkClearPageFileAtShutdown_Click()

    SaveRegDWORD HKEY_LOCAL_MACHINE, "SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\", _
        "ClearPageFileAtShutdown", chkClearPageFileAtShutdown.Value

End Sub

Private Sub chkClearPageFileAtShutdown_GotFocus()

    ChangeFocus chkClearPageFileAtShutdown, True

End Sub

Private Sub chkClearPageFileAtShutdown_LostFocus()

    ChangeFocus chkClearPageFileAtShutdown, False

End Sub

Private Sub chkClearPageFileAtShutdown_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)

    ProcessMouseMove chkClearPageFileAtShutdown, X, Y

End Sub

Private Sub chkClearRecentDocsOnExit_Click()

    SaveRegDWORD HKEY_CURRENT_USER, "Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\", _
        "ClearRecentDocsOnExit", chkClearRecentDocsOnExit.Value

End Sub

Private Sub chkClearRecentDocsOnExit_GotFocus()

    ChangeFocus chkClearRecentDocsOnExit, True

End Sub

Private Sub chkClearRecentDocsOnExit_LostFocus()

    ChangeFocus chkClearRecentDocsOnExit, False

End Sub

Private Sub chkClearRecentDocsOnExit_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)

    ProcessMouseMove chkClearRecentDocsOnExit, X, Y

End Sub

Private Sub chkDisableFirewall_Click()

    SaveRegDWORD HKEY_LOCAL_MACHINE, "SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\", _
        "EnableFirewall", Abs(CInt(Not CBool(chkDisableFirewall.Value)))

End Sub

Private Sub chkDisableFirewall_GotFocus()

    ChangeFocus chkDisableFirewall, True

End Sub

Private Sub chkDisableFirewall_LostFocus()

    ChangeFocus chkDisableFirewall, False

End Sub

Private Sub chkDisableFirewall_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)

    ProcessMouseMove chkDisableFirewall, X, Y

End Sub

Private Sub chkDisablePagingExecutive_Click()

    SaveRegDWORD HKEY_LOCAL_MACHINE, "SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\", _
        "DisablePagingExecutive", chkDisablePagingExecutive.Value

End Sub

Private Sub chkDisablePagingExecutive_GotFocus()

    ChangeFocus chkDisablePagingExecutive, True

End Sub

Private Sub chkDisablePagingExecutive_LostFocus()

    ChangeFocus chkDisablePagingExecutive, False

End Sub

Private Sub chkDisablePagingExecutive_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)

    ProcessMouseMove chkDisablePagingExecutive, X, Y

End Sub

Private Sub chkLargeSystemCache_Click()

    SaveRegDWORD HKEY_LOCAL_MACHINE, "SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\", _
        "LargeSystemCache", chkLargeSystemCache.Value

End Sub

Private Sub chkLargeSystemCache_GotFocus()

    ChangeFocus chkLargeSystemCache, True

End Sub

Private Sub chkLargeSystemCache_LostFocus()

    ChangeFocus chkLargeSystemCache, False

End Sub

Private Sub chkLargeSystemCache_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)

    ProcessMouseMove chkLargeSystemCache, X, Y

End Sub

Private Sub chkSchTasks_Click()

    If chkSchTasks.Value = 0 Then
        SaveRegString HKEY_LOCAL_MACHINE, "Software\Microsoft\Windows\CurrentVersion\Explorer\RemoteComputer\NameSpace\{D6277990-4C6A-11CF-8D87-00AA0060F5BF}\", "", ""
    Else
        DeleteKey HKEY_LOCAL_MACHINE, "Software\Microsoft\Windows\CurrentVersion\Explorer\RemoteComputer\NameSpace\", "{D6277990-4C6A-11CF-8D87-00AA0060F5BF}"
    End If

End Sub

Private Sub chkSchTasks_GotFocus()

    ChangeFocus chkSchTasks, True

End Sub

Private Sub chkSchTasks_LostFocus()

    ChangeFocus chkSchTasks, False

End Sub

Private Sub chkSchTasks_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)

    ProcessMouseMove chkSchTasks, X, Y

End Sub

Private Sub chkSFCDisable_Click()

    SaveRegDWORD HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\", _
        "SFCDisable", chkSFCDisable.Value

End Sub

Private Sub chkSFCDisable_GotFocus()

    ChangeFocus chkSFCDisable, True

End Sub

Private Sub chkSFCDisable_LostFocus()

    ChangeFocus chkSFCDisable, False

End Sub

Private Sub chkSFCDisable_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)

    ProcessMouseMove chkSFCDisable, X, Y

End Sub

Private Sub chkSharedFolders_Click()

    If chkSharedFolders.Value = 0 Then
        SaveRegString HKEY_LOCAL_MACHINE, "Software\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\DelegateFolders\{59031A47-3F72-44A7-89C5-5595FE6B30EE}\", "", ""
    Else
        DeleteKey HKEY_LOCAL_MACHINE, "Software\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\DelegateFolders\", "{59031A47-3F72-44A7-89C5-5595FE6B30EE}"
    End If

End Sub

Private Sub chkSharedFolders_GotFocus()

    ChangeFocus chkSharedFolders, True

End Sub

Private Sub chkSharedFolders_LostFocus()

    ChangeFocus chkSharedFolders, False

End Sub

Private Sub chkSharedFolders_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)

    ProcessMouseMove chkSharedFolders, X, Y

End Sub

Private Sub chkZipSupport_Click()

    If chkZipSupport.Value = 0 Then
        Shell "regsvr32 /s zipfldr.dll", vbHide
    Else
        Shell "regsvr32 /u /s zipfldr.dll", vbHide
    End If
    
End Sub

Private Sub chkZipSupport_GotFocus()

    ChangeFocus chkZipSupport, True

End Sub

Private Sub chkZipSupport_LostFocus()

    ChangeFocus chkZipSupport, False

End Sub

Private Sub chkZipSupport_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)

    ProcessMouseMove chkZipSupport, X, Y

End Sub

Private Sub Form_Load()

    On Error GoTo ErrHandler

    Dim sRegData As String
    Dim lRegData As Long
    Dim bErr As Boolean
    
    Caption = Caption + " v" & App.Major & "." & App.Minor & _
        IIf(App.Revision = 0, "", "." & App.Revision)
    
    sRegData = GetRegString(HKEY_CURRENT_USER, "Control Panel\Desktop\", "MenuShowDelay", bErr)
    If Not bErr Then txtMenuShowDelay.Text = sRegData

    sRegData = GetRegString(HKEY_CURRENT_USER, "Control Panel\Desktop\", "AutoEndTasks", bErr)
    If Not bErr Then chkAutoEndTasks.Value = Abs(CBool(Val(sRegData)))

    sRegData = GetRegString(HKEY_CURRENT_USER, "Control Panel\Desktop\", "HungAppTimeout", bErr)
    If Not bErr Then txtHungAppTimeout.Text = sRegData

    sRegData = GetRegString(HKEY_CURRENT_USER, "Control Panel\Desktop\", "WaitToKillServiceTimeout", bErr)
    If Not bErr Then txtWaitToKillServiceTimeout.Text = sRegData
    
    lRegData = GetRegDWORD(HKEY_LOCAL_MACHINE, "SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\", "LargeSystemCache", bErr)
    If Not bErr Then chkLargeSystemCache.Value = Abs(CBool(lRegData))
    
    lRegData = GetRegDWORD(HKEY_LOCAL_MACHINE, "SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\", "DisablePagingExecutive", bErr)
    If Not bErr Then chkDisablePagingExecutive.Value = Abs(CBool(lRegData))

    lRegData = GetRegDWORD(HKEY_LOCAL_MACHINE, "SYSTEM\CurrentControlSet\Control\Session Manager\Memory Management\", "ClearPageFileAtShutdown", bErr)
    If Not bErr Then chkClearPageFileAtShutdown.Value = Abs(CBool(lRegData))
    
    sRegData = GetRegString(HKEY_LOCAL_MACHINE, "Software\Microsoft\Windows\CurrentVersion\Explorer\RemoteComputer\NameSpace\{D6277990-4C6A-11CF-8D87-00AA0060F5BF}\", "", bErr)
    If bErr Then chkSchTasks.Value = 1

    sRegData = GetRegString(HKEY_LOCAL_MACHINE, "Software\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\DelegateFolders\{59031A47-3F72-44A7-89C5-5595FE6B30EE}\", "", bErr)
    If bErr Then chkSharedFolders.Value = 1
    
    lRegData = GetRegDWORD(HKEY_LOCAL_MACHINE, "SYSTEM\CurrentControlSet\Services\SharedAccess\Parameters\FirewallPolicy\StandardProfile\", "EnableFirewall", bErr)
    If Not bErr Then chkDisableFirewall.Value = Abs(Not CBool(lRegData))
    
    lRegData = GetRegDWORD(HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\", "SFCDisable", bErr)
    If Not bErr Then chkSFCDisable.Value = Abs(CBool(lRegData))

    sRegData = GetRegString(HKEY_CLASSES_ROOT, "SystemFileAssociations\.zip\CLSID\", "", bErr)
    If bErr Then chkZipSupport.Value = 1
    
    sRegData = GetRegString(HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AlwaysUnloadDLL\", "", bErr)
    If Not bErr Then chkAlwaysUnloadDLL.Value = Abs(CBool(Val(sRegData)))

    lRegData = GetRegDWORD(HKEY_CURRENT_USER, "Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\", "ClearRecentDocsOnExit", bErr)
    If Not bErr Then chkClearRecentDocsOnExit.Value = Abs(CBool(lRegData))
    
    LoadToolTips
    
ErrHandler:
    
End Sub

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)

    DestroyToolTip
    
End Sub

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)

    DestroyToolTip
    
    Set ToolTipsCol = Nothing
    
End Sub

Private Sub frameDesktop_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)

    DestroyToolTip
    
End Sub

Private Sub frameMemory_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)

    DestroyToolTip
    
End Sub

Private Sub frameNetwork_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)

    DestroyToolTip
    
End Sub

Private Sub frameSystem_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)

    DestroyToolTip

End Sub

Private Sub lblHungAppTimeout_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)

    ProcessMouseMove lblHungAppTimeout, X, Y

End Sub

Private Sub lblMenuShowDelay_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)

    ProcessMouseMove lblMenuShowDelay, X, Y

End Sub


Private Sub lblWaitToKillServiceTimeout_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)

    ProcessMouseMove lblWaitToKillServiceTimeout, X, Y

End Sub

Private Sub timerToolTipDelay_Timer()

    On Error GoTo ErrHandler

    Dim sToolTipInfo() As String
    Dim lToolTipHeight As Long

    timerToolTipDelay.Enabled = False
    
    If objCtrl Is Nothing Then Exit Sub
    
    sToolTipInfo = Split(GetToolTip(objCtrl.Name), "|")
    
    ' create our balloon tooltip control
    CreateToolTip Me.hwnd, TTS_BALLOON Or TTS_NOANIMATE, _
        TTF_SUBCLASS, "", "", 0
    
    ' format and update the tooltip title and text
    UpdateToolTip sToolTipInfo(1), sToolTipInfo(0), ICON_INFO
        
    ' show the tooltip
    ShowToolTip True
    
    ' get the tooltip window's height
    GetToolTipSize , , , lToolTipHeight
    
    ' reposition the tooltip window
    MoveToolTip objCtrl.Container.Left + (objCtrl.Left / Screen.TwipsPerPixelX), _
        objCtrl.Container.Top + (objCtrl.Top / Screen.TwipsPerPixelY) - lToolTipHeight, _
        Me.hwnd
        
    Exit Sub
        
ErrHandler:

    DestroyToolTip

End Sub

Private Sub txtHungAppTimeout_GotFocus()

    ChangeFocus txtHungAppTimeout, True

End Sub

Private Sub txtHungAppTimeout_LostFocus()

    ChangeFocus txtHungAppTimeout, False

    SaveRegString HKEY_CURRENT_USER, "Control Panel\Desktop\", _
        "HungAppTimeout", CStr(Val(Trim(txtHungAppTimeout.Text)))

End Sub

Private Sub txtHungAppTimeout_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)

    ProcessMouseMove lblHungAppTimeout, X, Y

End Sub

Private Sub txtMenuShowDelay_GotFocus()

    ChangeFocus txtMenuShowDelay, True

End Sub

Private Sub txtMenuShowDelay_LostFocus()

    ChangeFocus txtMenuShowDelay, False
    
    SaveRegString HKEY_CURRENT_USER, "Control Panel\Desktop\", _
        "MenuShowDelay", CStr(Val(Trim(txtMenuShowDelay.Text)))

End Sub

Private Sub txtMenuShowDelay_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)

    ProcessMouseMove lblMenuShowDelay, X, Y

End Sub

Private Sub txtWaitToKillServiceTimeout_GotFocus()

    ChangeFocus txtWaitToKillServiceTimeout, True

End Sub

Private Sub txtWaitToKillServiceTimeout_LostFocus()

    ChangeFocus txtWaitToKillServiceTimeout, False

    SaveRegString HKEY_CURRENT_USER, "Control Panel\Desktop\", _
        "WaitToKillServiceTimeout", CStr(Val(Trim(txtWaitToKillServiceTimeout.Text)))

End Sub

Private Sub txtWaitToKillServiceTimeout_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)

    ProcessMouseMove lblWaitToKillServiceTimeout, X, Y

End Sub

Download frmMain.frm

Back to file list


Back to project page