اقصد ان تقوم بكتابة كود يقوم بتنفيذ كل هذا من داخل البرنامج :
تابع معي :
قم بتعريف مكتبة
ارسل التنسيق المناسب لك الى الرجستري عن طريق الكود التالي :
بعد ذالك تحتاج الى عملية إنعاش الويندوز لإظهار التغيرات على الجهاز عن طريق الكود التالي :
بهذا يصبح الكود كاملاً بهذا الشكل :
قد تحصل على طرق اخرى ولكن هذه احدى الطرق
اتمنى لك التوفيق
تابع معي :
قم بتعريف مكتبة
PHP كود :
Imports Microsoft.Win32
ارسل التنسيق المناسب لك الى الرجستري عن طريق الكود التالي :
PHP كود :
Dim regKey As RegistryKey
regKey = Registry.CurrentUser.CreateSubKey("Control Panel\International")
regKey.SetValue("sShortDate", "yyyy/MM/dd")
regKey.Close()
regKey = Registry.CurrentUser.CreateSubKey("Control Panel\International")
regKey.SetValue("sLongDate", "yyyy/MM/dd")
regKey.Close()
بعد ذالك تحتاج الى عملية إنعاش الويندوز لإظهار التغيرات على الجهاز عن طريق الكود التالي :
PHP كود :
For Each ObjProcess As Process In Process.GetProcessesByName("explorer")
ObjProcess.Kill()
Next
Process.Start("explorer")
بهذا يصبح الكود كاملاً بهذا الشكل :
PHP كود :
Imports Microsoft.Win32
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim regKey As RegistryKey
regKey = Registry.CurrentUser.CreateSubKey("Control Panel\International")
regKey.SetValue("sShortDate", "yyyy/MM/dd")
regKey.Close()
regKey = Registry.CurrentUser.CreateSubKey("Control Panel\International")
regKey.SetValue("sLongDate", "yyyy/MM/dd")
regKey.Close()
For Each ObjProcess As Process In Process.GetProcessesByName("explorer")
ObjProcess.Kill()
Next
Process.Start("explorer")
End Sub
End Class
قد تحصل على طرق اخرى ولكن هذه احدى الطرق
اتمنى لك التوفيق
