منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب

نسخة كاملة : التحكم في النظام
أنت حالياً تتصفح نسخة خفيفة من المنتدى . مشاهدة نسخة كاملة مع جميع الأشكال الجمالية .
السلام عليكم ورحمه الله وبركاته
عايزه اكواد التحكم في النظام زي فتح كنترول بانل أو اي اعداد منه أو عمل ريستارت وشوتدون وشكرا
كود :
           'إغلاق الجهاز
           Process.Start("Shutdown", "/s")
       
           ' إعادة تشغيل
           Process.Start("Shutdown", "/r")
       
           'تسجيل الخروج
           Process.Start("Shutdown", "/l")
السلام عليكم ورحمه الله وبركاته
لفتح الكونترول بانل
استخدمي هذا الكود
كود :
Dim control As New Process
           control.StartInfo.FileName = "cmd.exe"
           control.StartInfo.RedirectStandardInput = True
           control.StartInfo.RedirectStandardOutput = True
           control.StartInfo.CreateNoWindow = True
           control.StartInfo.UseShellExecute = False
           control.Start()
           control.StandardInput.WriteLine("start control")
           control.StandardInput.Flush()
           control.StandardInput.Close()
           Console.WriteLine(control.StandardOutput.ReadToEnd())
لفتح شئ معين في الكنترول بانل
كود :
'Add/Remove Programs
       Process.Start("AppWiz.cpl")

       'Display Properties
       Process.Start("Desk.cpl")

       'Internet Properties
       Process.Start("Inetcpl.cpl")

       'Regional Settings Properties
       Process.Start("Intl.cpl")

       'Joystick
       Process.Start("Joy.cpl")

       'Mouse Properties
       Process.Start("Main.cpl")

       'Multimedia Properties
       Process.Start("Mmsys.cpl")

       'Modem Properties
       Process.Start("Modem.cpl")

       'Password Properties
       Process.Start("Password.cpl")

       'System Properties
       Process.Start("Sysdm.cpl")

       'Desktop Themes
       Process.Start("Themes.cpl")

       'Date/Time Properties
       Process.Start("Timedate.cpl")

       'MS Workgroup Post Office
       Process.Start("Wgpocpl.cpl")

       'Network Properties
       Process.Start("Netcpl.cpl")