aboutsummaryrefslogtreecommitdiff
path: root/ShiftOS-TheRevival/MainForms/DesktopEnvironment/master/DesktopManager.vb
diff options
context:
space:
mode:
Diffstat (limited to 'ShiftOS-TheRevival/MainForms/DesktopEnvironment/master/DesktopManager.vb')
-rw-r--r--ShiftOS-TheRevival/MainForms/DesktopEnvironment/master/DesktopManager.vb38
1 files changed, 31 insertions, 7 deletions
diff --git a/ShiftOS-TheRevival/MainForms/DesktopEnvironment/master/DesktopManager.vb b/ShiftOS-TheRevival/MainForms/DesktopEnvironment/master/DesktopManager.vb
index 89d8b65..8b501ce 100644
--- a/ShiftOS-TheRevival/MainForms/DesktopEnvironment/master/DesktopManager.vb
+++ b/ShiftOS-TheRevival/MainForms/DesktopEnvironment/master/DesktopManager.vb
@@ -1,23 +1,47 @@
-Module DesktopManager
+Imports System.Threading
+
+Module DesktopManager
+ Public IsStartG As Boolean
+
Public Sub StartG()
+ IsStartG = True
Desktop.Show()
Desktop.FormBorderStyle = FormBorderStyle.None
Desktop.WindowState = FormWindowState.Maximized
Desktop.TopMost = False
IsConsoleParent = False
- Console.Close()
+ Console.Dispose()
WindowManagerChoose()
Cursor.Show()
End Sub
Public Sub StopG()
- DuWM_CurrentProcess = 0
- Strings.ProcessID(0) = 0
- Strings.ProcessID(1) = 0
- Cursor.Hide()
+ IsStartG = False
+ 'MsgBox("IsConsoleParent should be true!")
IsConsoleParent = True
+ ''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
Console.Show()
- Desktop.Close()
+ '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
End Sub
Public Sub WindowManagerChoose()