2022-11-21 22:42:55 +00:00
Imports System . Threading
Module DesktopManager
Public IsStartG As Boolean
2022-11-21 06:56:13 +00:00
Public Sub StartG ( )
2022-11-21 22:42:55 +00:00
IsStartG = True
2022-11-16 01:28:22 +00:00
Desktop . Show ( )
Desktop . FormBorderStyle = FormBorderStyle . None
Desktop . WindowState = FormWindowState . Maximized
2022-11-21 03:43:53 +00:00
Desktop . TopMost = False
IsConsoleParent = False
2022-11-21 22:42:55 +00:00
Console . Dispose ( )
2022-11-21 06:56:13 +00:00
WindowManagerChoose ( )
2022-11-20 14:53:17 +00:00
Cursor . Show ( )
2022-11-16 01:28:22 +00:00
End Sub
2022-11-21 06:56:13 +00:00
Public Sub StopG ( )
2022-11-21 22:42:55 +00:00
IsStartG = False
2022-11-21 03:43:53 +00:00
IsConsoleParent = True
2022-11-21 22:42:55 +00:00
TerminateWindowApps ( )
Cursor . Hide ( )
2022-11-24 01:18:00 +00:00
If Strings . OnceInfo ( 6 ) = " story " Then
SaveGame ( )
End If
2022-11-21 22:42:55 +00:00
MsgBox ( " this is not a bug, this is a feature " ) 'Use this messagebox to hold Console to stay open, because removing this line closes Console all together for some reason
2022-11-21 06:56:13 +00:00
Console . Show ( )
2022-11-21 22:42:55 +00:00
Desktop . Hide ( )
End Sub
Public Sub TerminateWindowApps ( )
Dim MaxPID As Integer = 0
Do
If MaxPID = 2 Then
Exit Do
Else
Strings . ProcessID ( MaxPID ) = 0
MaxPID = MaxPID + 1
End If
Loop
2022-11-21 06:56:13 +00:00
End Sub
Public Sub WindowManagerChoose ( )
Select Case Strings . ComputerInfo ( 7 )
Case 1
DuWM_Initiate ( )
End Select
2022-11-16 01:28:22 +00:00
End Sub
End Module