ShiftOS-TheRevival-Old/ShiftOS-TheRevival/MainForms/DesktopEnvironment/master/DesktopManager.vb

54 lines
1.4 KiB
VB.net
Raw Normal View History

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
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()
End Sub
2022-11-21 06:56:13 +00:00
Public Sub StopG()
2022-11-21 22:42:55 +00:00
IsStartG = False
'MsgBox("IsConsoleParent should be true!")
2022-11-21 03:43:53 +00:00
IsConsoleParent = True
2022-11-21 22:42:55 +00:00
''MsgBox("PID 0 0")
'Strings.ProcessID(0) = 0
''MsgBox("PID 1 0")
'Strings.ProcessID(1) = 0
TerminateWindowApps()
'MsgBox("Hide!")
Cursor.Hide()
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
'MsgBox("ADIOS!")
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
End Sub
End Module