Projects

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

JavaTweakz

Browsing modMain.bas (1.02 KB)

Attribute VB_Name = "modMain"
Option Explicit

Private Declare Function InitCommonControls Lib "comctl32.dll" () As Long
Private Declare Function GetVersionEx Lib "kernel32" Alias "GetVersionExA" (lpVersionInformation As OSVERSIONINFO) As Long

Private Type OSVERSIONINFO
    dwOSVersionInfoSize As Long
    dwMajorVersion As Long
    dwMinorVersion As Long
    dwBuildNumber As Long
    dwPlatformId As Long
    szCSDVersion As String * 128
End Type


Public Sub Main()

    Call InitCommonControls
    
    If Not IsCompatible() Then
        MsgBox "This program requires a Windows XP or newer operating system.", vbCritical
        End
    End If

    frmMain.Show
    
End Sub

Private Function IsCompatible() As Boolean

    Dim verinfo As OSVERSIONINFO
    
    verinfo.dwOSVersionInfoSize = Len(verinfo)
    GetVersionEx verinfo
    
    ' check for Windows XP
    If verinfo.dwMajorVersion >= 5 Then
        IsCompatible = True
    Else
        IsCompatible = False
    End If
    
End Function

Download modMain.bas

Back to file list


Back to project page