PDA

View Full Version : آموزش: اجراي پنجره هاي كنترل پنل ويندوز



shahryari
سه شنبه 17 مرداد 1391, 23:47 عصر
با سلام
بعضي وقتا لازمه تا به كاربر اين امكان را بديم كه امكانات داخل كنترل پنل ويندوز رو سوئيچ كنه.
با كد هاي زير چند تا پنجره پر كاربرد كنترل پنل رو ميتونيد اجرا كنيد

اجراي پنجره Display

Static DisplayCount As Integer

'display
Process.Start("rundll32.exe", "shell32.dll, Control_RunDLL desk.cpl,," & DisplayCount)

--------
اجراي Internet option

Static InternetCount As Integer

'Internet options
Process.Start("rundll32.exe", "shell32.dll, Control_RunDLL inetcpl.cpl,," & InternetCount)

--------
اجراي Mouse

Static MouseCount As Integer

'mouse
Process.Start("rundll32.exe", "shell32.dll,Control_RunDLL main.cpl,@0," & MouseCount)

------
اجراي Keyboard

Static KeyboardCount As Integer

'keyboard
Process.Start("rundll32.exe", "shell32.dll, Control_RunDLL main.cpl,@1," & KeyboardCount)

-----
اجراي AddRemove program

Static AddRemoveCount As Integer

'add & remove programs
Process.Start("rundll32.exe", "shell32.dll, Control_RunDLL appwiz.cpl,," & AddRemoveCount)

------
اجراي DateTime

Static DateTimeCount As Integer

'date & time
Process.Start("rundll32.exe", "shell32.dll, Control_RunDLL timedate.cpl,," & DateTimeCount)

-----
اجراي regional Setting

Static regionalSetting As Integer

Process.Start("rundll32.exe", "shell32.dll, Control_RunDLL INTL.CPL,," & regionalSetting)

---------------------
شما ميتوانيد نسبت سربرگ هاي پنجره هاي مذكور به Static xxxx As Integer مقدار بدهيد و هنگام باز شدن پنجره مورد نظر ، سربرگ مربوطه را نيز سوئيچ كنيد.
--------
مطالب و متدهاي بيشتر در سايت زير:
http://www.tburke.net/info/rundll.htm
----------------------------------------------
موفق باشيد