اذهب الي المحتوي
أوفيسنا

الردود الموصى بها

قام بنشر

السلام عليكم ورحمة الله وبركاته..

اقدم لكم اداة صغيرة من برمجتي وضيفتها تغيير اسم الدولة/المنطقة التي تعتمد عليها

الكثير من البرامج خصوصاً العربية التي تعتمد الـ Unicode

image.png.8d87898f231c192585106ffa2feca95c.png

 

الأداة مكتوب بلغة Visual Studio .NET مبدأ عملها يحتاج ان تقوم بتمرير براميتر

لها يحتوي على كود الدولة. عموما كتبت لكم مثال في الاكسس

سورس الأداة:

Imports System.Runtime.InteropServices
Imports System.Threading
Imports Microsoft.Win32
Imports System.Globalization

Module Main

    'C0ded bY: SEMO.Pa3x (:
    'Date: 27-5-2021 : 03:26 PM

    Const subkey As String = "SYSTEM\CurrentControlSet\Control\Nls\Language\"
    Dim CodeArray As String() = {"af-ZA", "ar-AE", "ar-BH", "ar-DZ", "ar-EG", "ar-IQ", "ar-JO", "ar-KW", "ar-LB", "ar-LY", "ar-MA", "ar-OM",
                                 "ar-QA", "ar-SA", "ar-SY", "ar-TN", "ar-YE", "az-AZ", "az-AZ", "be-BY", "bg-BG", "bs-BA", "ca-ES", "cs-CZ",
                                 "cy-GB", "da-DK", "de-AT", "de-CH", "de-DE", "de-LI", "de-LU", "dv-MV", "el-GR", "en-AU", "en-BZ", "en-CA",
                                 "en-CB", "en-GB", "en-IE", "en-JM", "en-NZ", "en-PH", "en-TT", "en-US", "en-ZA", "en-ZW", "es-AR", "es-BO",
                                 "es-CL", "es-CO", "es-CR", "es-DO", "es-EC", "es-ES", "es-ES", "es-GT", "es-HN", "es-MX", "es-NI", "es-PA",
                                 "es-PE", "es-PR", "es-PY", "es-SV", "es-UY", "es-VE", "et-EE", "eu-ES", "fa-IR", "fi-FI", "fo-FO", "fr-BE",
                                 "fr-CA", "fr-CH", "fr-FR", "fr-LU", "fr-MC", "gl-ES", "gu-IN", "he-IL", "hi-IN", "hr-BA", "hr-HR", "hu-HU",
                                 "hy-AM", "id-ID", "is-IS", "it-CH", "it-IT", "ja-JP", "ka-GE", "kk-KZ", "kn-IN", "ko-KR", "kok-IN", "ky-KG",
                                 "lt-LT", "lv-LV", "mi-NZ", "mk-MK", "mn-MN", "mr-IN", "ms-BN", "ms-MY", "mt-MT", "nb-NO", "nl-BE", "nl-NL",
                                 "nn-NO", "ns-ZA", "pa-IN", "pl-PL", "ps-AR", "pt-BR", "pt-PT", "qu-BO", "qu-EC", "qu-PE", "ro-RO", "ru-RU",
                                 "sa-IN", "se-FI", "se-FI", "se-FI", "se-NO", "se-NO", "se-NO", "se-SE", "se-SE", "se-SE", "sk-SK", "sl-SI",
                                 "sq-AL", "sr-BA", "sr-BA", "sr-SP", "sr-SP", "sv-FI", "sv-SE", "sw-KE", "syr-SY", "ta-IN", "te-IN", "th-TH",
                                 "tl-PH", "tn-ZA", "tr-TR", "tt-RU", "uk-UA", "ur-PK", "uz-UZ", "uz-UZ", "vi-VN", "xh-ZA", "zh-CN", "zh-HK",
                                 "zh-MO", "zh-SG", "zh-TW", "zu-ZA"}

    Sub main()
        For Each arg As String In My.Application.CommandLineArgs
            'check if arg exist in array !
            Dim index As Integer = Array.IndexOf(CodeArray, arg)
            If index > 0 Then
                'do change (:
                SetSystemNonUnicodeLanguage(CultureInfo.GetCultureInfo(arg))
            End If
        Next
    End Sub

    Private Sub SetSystemNonUnicodeLanguage(ByVal cinfo As CultureInfo)
        Dim regkey = Registry.LocalMachine.OpenSubKey(subkey, True)
        regkey.SetValue("Default", cinfo.LCID.ToString("x4"))

        ' Reboot computer after timeout of 5
        Shell("Shutdown -r -t 5")
        ' Switches:
        '   -l  Log off profile
        '   -s  Shut down computer
        '   -r  Restart computer
        '   -f  Force applications to close
        '   -t  Set a timeout for shutdownCodeArray
        '   -m \\computer name (Shutdown remote computer)
        '   -i  Show the Shutdown GUI

    End Sub

End Module

 

البرنامج:

Option Compare Database

Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Const SW_SHOWNORMAL = 1

Private Sub cmd_change_Click()

    Dim SetLocaleInfo_File As String
    Dim Parameters As String

    SetLocaleInfo_File = CurrentProject.Path + "\SetLocaleInfo.exe"
    Parameters = comb_countries
    
    ShellExecute 0, "runas", SetLocaleInfo_File, Parameters, vbNullString, SW_SHOWNORMAL
    
End Sub

ارفقت لكم جدول لإسماء الدولة ورموزها:

Code Country
af-ZA Afrikaans (South Africa)
ar-AE Arabic (U.A.E.)
ar-BH Arabic (Bahrain)
ar-DZ Arabic (Algeria)
ar-EG Arabic (Egypt)
ar-IQ Arabic (Iraq)
ar-JO Arabic (Jordan)
ar-KW Arabic (Kuwait)
ar-LB Arabic (Lebanon)
ar-LY Arabic (Libya)
ar-MA Arabic (Morocco)
ar-OM Arabic (Oman)
ar-QA Arabic (Qatar)
ar-SA Arabic (Saudi Arabia)
ar-SY Arabic (Syria)
ar-TN Arabic (Tunisia)
ar-YE Arabic (Yemen)
az-AZ Azeri (Latin) (Azerbaijan)
az-AZ Azeri (Cyrillic) (Azerbaijan)
be-BY Belarusian (Belarus)
bg-BG Bulgarian (Bulgaria)
bs-BA Bosnian (Bosnia and Herzegovina)
ca-ES Catalan (Spain)
cs-CZ Czech (Czech Republic)
cy-GB Welsh (United Kingdom)
da-DK Danish (Denmark)
de-AT German (Austria)
de-CH German (Switzerland)
de-DE German (Germany)
de-LI German (Liechtenstein)
de-LU German (Luxembourg)
dv-MV Divehi (Maldives)
el-GR Greek (Greece)
en-AU English (Australia)
en-BZ English (Belize)
en-CA English (Canada)
en-CB English (Caribbean)
en-GB English (United Kingdom)
en-IE English (Ireland)
en-JM English (Jamaica)
en-NZ English (New Zealand)
en-PH English (Republic of the Philippines)
en-TT English (Trinidad and Tobago)
en-US English (United States)
en-ZA English (South Africa)
en-ZW English (Zimbabwe)
es-AR Spanish (Argentina)
es-BO Spanish (Bolivia)
es-CL Spanish (Chile)
es-CO Spanish (Colombia)
es-CR Spanish (Costa Rica)
es-DO Spanish (Dominican Republic)
es-EC Spanish (Ecuador)
es-ES Spanish (Castilian)
es-ES Spanish (Spain)
es-GT Spanish (Guatemala)
es-HN Spanish (Honduras)
es-MX Spanish (Mexico)
es-NI Spanish (Nicaragua)
es-PA Spanish (Panama)
es-PE Spanish (Peru)
es-PR Spanish (Puerto Rico)
es-PY Spanish (Paraguay)
es-SV Spanish (El Salvador)
es-UY Spanish (Uruguay)
es-VE Spanish (Venezuela)
et-EE Estonian (Estonia)
eu-ES Basque (Spain)
fa-IR Farsi (Iran)
fi-FI Finnish (Finland)
fo-FO Faroese (Faroe Islands)
fr-BE French (Belgium)
fr-CA French (Canada)
fr-CH French (Switzerland)
fr-FR French (France)
fr-LU French (Luxembourg)
fr-MC French (Principality of Monaco)
gl-ES Galician (Spain)
gu-IN Gujarati (India)
he-IL Hebrew (Israel)
hi-IN Hindi (India)
hr-BA Croatian (Bosnia and Herzegovina)
hr-HR Croatian (Croatia)
hu-HU Hungarian (Hungary)
hy-AM Armenian (Armenia)
id-ID Indonesian (Indonesia)
is-IS Icelandic (Iceland)
it-CH Italian (Switzerland)
it-IT Italian (Italy)
ja-JP Japanese (Japan)
ka-GE Georgian (Georgia)
kk-KZ Kazakh (Kazakhstan)
kn-IN Kannada (India)
ko-KR Korean (Korea)
kok-IN Konkani (India)
ky-KG Kyrgyz (Kyrgyzstan)
lt-LT Lithuanian (Lithuania)
lv-LV Latvian (Latvia)
mi-NZ Maori (New Zealand)
mk-MK FYRO Macedonian (Former Yugoslav Republic of Macedonia)
mn-MN Mongolian (Mongolia)
mr-IN Marathi (India)
ms-BN Malay (Brunei Darussalam)
ms-MY Malay (Malaysia)
mt-MT Maltese (Malta)
nb-NO Norwegian (Bokm?l) (Norway)
nl-BE Dutch (Belgium)
nl-NL Dutch (Netherlands)
nn-NO Norwegian (Nynorsk) (Norway)
ns-ZA Northern Sotho (South Africa)
pa-IN Punjabi (India)
pl-PL Polish (Poland)
ps-AR Pashto (Afghanistan)
pt-BR Portuguese (Brazil)
pt-PT Portuguese (Portugal)
qu-BO Quechua (Bolivia)
qu-EC Quechua (Ecuador)
qu-PE Quechua (Peru)
ro-RO Romanian (Romania)
ru-RU Russian (Russia)
sa-IN Sanskrit (India)
se-FI Sami (Northern) (Finland)
se-FI Sami (Skolt) (Finland)
se-FI Sami (Inari) (Finland)
se-NO Sami (Northern) (Norway)
se-NO Sami (Lule) (Norway)
se-NO Sami (Southern) (Norway)
se-SE Sami (Northern) (Sweden)
se-SE Sami (Lule) (Sweden)
se-SE Sami (Southern) (Sweden)
sk-SK Slovak (Slovakia)
sl-SI Slovenian (Slovenia)
sq-AL Albanian (Albania)
sr-BA Serbian (Latin) (Bosnia and Herzegovina)
sr-BA Serbian (Cyrillic) (Bosnia and Herzegovina)
sr-SP Serbian (Latin) (Serbia and Montenegro)
sr-SP Serbian (Cyrillic) (Serbia and Montenegro)
sv-FI Swedish (Finland)
sv-SE Swedish (Sweden)
sw-KE Swahili (Kenya)
syr-SY Syriac (Syria)
ta-IN Tamil (India)
te-IN Telugu (India)
th-TH Thai (Thailand)
tl-PH Tagalog (Philippines)
tn-ZA Tswana (South Africa)
tr-TR Turkish (Turkey)
tt-RU Tatar (Russia)
uk-UA Ukrainian (Ukraine)
ur-PK Urdu (Islamic Republic of Pakistan)
uz-UZ Uzbek (Latin) (Uzbekistan)
uz-UZ Uzbek (Cyrillic) (Uzbekistan)
vi-VN Vietnamese (Viet Nam)
xh-ZA Xhosa (South Africa)
zh-CN Chinese (S)
zh-HK Chinese (Hong Kong)
zh-MO Chinese (Macau)
zh-SG Chinese (Singapore)
zh-TW Chinese (T)
zu-ZA Zulu (South Africa)

 

مدة العمل ( ساعة ونصف ) :biggrin:

SetLocaleInfo.rar

  • Like 5
  • Thanks 5
قام بنشر
11 ساعات مضت, SEMO.Pa3x said:

السلام عليكم ورحمة الله وبركاته..

اقدم لكم اداة صغيرة من برمجتي وضيفتها تغيير اسم الدولة/المنطقة التي تعتمد عليها

الكثير من البرامج خصوصاً العربية التي تعتمد الـ Unicode

image.png.8d87898f231c192585106ffa2feca95c.png

 

الأداة مكتوب بلغة Visual Studio .NET مبدأ عملها يحتاج ان تقوم بتمرير براميتر

لها يحتوي على كود الدولة. عموما كتبت لكم مثال في الاكسس

سورس الأداة:


Imports System.Runtime.InteropServices
Imports System.Threading
Imports Microsoft.Win32
Imports System.Globalization

Module Main

    'C0ded bY: SEMO.Pa3x (:
    'Date: 27-5-2021 : 03:26 PM

    Const subkey As String = "SYSTEM\CurrentControlSet\Control\Nls\Language\"
    Dim CodeArray As String() = {"af-ZA", "ar-AE", "ar-BH", "ar-DZ", "ar-EG", "ar-IQ", "ar-JO", "ar-KW", "ar-LB", "ar-LY", "ar-MA", "ar-OM",
                                 "ar-QA", "ar-SA", "ar-SY", "ar-TN", "ar-YE", "az-AZ", "az-AZ", "be-BY", "bg-BG", "bs-BA", "ca-ES", "cs-CZ",
                                 "cy-GB", "da-DK", "de-AT", "de-CH", "de-DE", "de-LI", "de-LU", "dv-MV", "el-GR", "en-AU", "en-BZ", "en-CA",
                                 "en-CB", "en-GB", "en-IE", "en-JM", "en-NZ", "en-PH", "en-TT", "en-US", "en-ZA", "en-ZW", "es-AR", "es-BO",
                                 "es-CL", "es-CO", "es-CR", "es-DO", "es-EC", "es-ES", "es-ES", "es-GT", "es-HN", "es-MX", "es-NI", "es-PA",
                                 "es-PE", "es-PR", "es-PY", "es-SV", "es-UY", "es-VE", "et-EE", "eu-ES", "fa-IR", "fi-FI", "fo-FO", "fr-BE",
                                 "fr-CA", "fr-CH", "fr-FR", "fr-LU", "fr-MC", "gl-ES", "gu-IN", "he-IL", "hi-IN", "hr-BA", "hr-HR", "hu-HU",
                                 "hy-AM", "id-ID", "is-IS", "it-CH", "it-IT", "ja-JP", "ka-GE", "kk-KZ", "kn-IN", "ko-KR", "kok-IN", "ky-KG",
                                 "lt-LT", "lv-LV", "mi-NZ", "mk-MK", "mn-MN", "mr-IN", "ms-BN", "ms-MY", "mt-MT", "nb-NO", "nl-BE", "nl-NL",
                                 "nn-NO", "ns-ZA", "pa-IN", "pl-PL", "ps-AR", "pt-BR", "pt-PT", "qu-BO", "qu-EC", "qu-PE", "ro-RO", "ru-RU",
                                 "sa-IN", "se-FI", "se-FI", "se-FI", "se-NO", "se-NO", "se-NO", "se-SE", "se-SE", "se-SE", "sk-SK", "sl-SI",
                                 "sq-AL", "sr-BA", "sr-BA", "sr-SP", "sr-SP", "sv-FI", "sv-SE", "sw-KE", "syr-SY", "ta-IN", "te-IN", "th-TH",
                                 "tl-PH", "tn-ZA", "tr-TR", "tt-RU", "uk-UA", "ur-PK", "uz-UZ", "uz-UZ", "vi-VN", "xh-ZA", "zh-CN", "zh-HK",
                                 "zh-MO", "zh-SG", "zh-TW", "zu-ZA"}

    Sub main()
        For Each arg As String In My.Application.CommandLineArgs
            'check if arg exist in array !
            Dim index As Integer = Array.IndexOf(CodeArray, arg)
            If index > 0 Then
                'do change (:
                SetSystemNonUnicodeLanguage(CultureInfo.GetCultureInfo(arg))
            End If
        Next
    End Sub

    Private Sub SetSystemNonUnicodeLanguage(ByVal cinfo As CultureInfo)
        Dim regkey = Registry.LocalMachine.OpenSubKey(subkey, True)
        regkey.SetValue("Default", cinfo.LCID.ToString("x4"))

        ' Reboot computer after timeout of 5
        Shell("Shutdown -r -t 5")
        ' Switches:
        '   -l  Log off profile
        '   -s  Shut down computer
        '   -r  Restart computer
        '   -f  Force applications to close
        '   -t  Set a timeout for shutdownCodeArray
        '   -m \\computer name (Shutdown remote computer)
        '   -i  Show the Shutdown GUI

    End Sub

End Module

 

البرنامج:


Option Compare Database

Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
Const SW_SHOWNORMAL = 1

Private Sub cmd_change_Click()

    Dim SetLocaleInfo_File As String
    Dim Parameters As String

    SetLocaleInfo_File = CurrentProject.Path + "\SetLocaleInfo.exe"
    Parameters = comb_countries
    
    ShellExecute 0, "runas", SetLocaleInfo_File, Parameters, vbNullString, SW_SHOWNORMAL
    
End Sub

ارفقت لكم جدول لإسماء الدولة ورموزها:

Code Country
af-ZA Afrikaans (South Africa)
ar-AE Arabic (U.A.E.)
ar-BH Arabic (Bahrain)
ar-DZ Arabic (Algeria)
ar-EG Arabic (Egypt)
ar-IQ Arabic (Iraq)
ar-JO Arabic (Jordan)
ar-KW Arabic (Kuwait)
ar-LB Arabic (Lebanon)
ar-LY Arabic (Libya)
ar-MA Arabic (Morocco)
ar-OM Arabic (Oman)
ar-QA Arabic (Qatar)
ar-SA Arabic (Saudi Arabia)
ar-SY Arabic (Syria)
ar-TN Arabic (Tunisia)
ar-YE Arabic (Yemen)
az-AZ Azeri (Latin) (Azerbaijan)
az-AZ Azeri (Cyrillic) (Azerbaijan)
be-BY Belarusian (Belarus)
bg-BG Bulgarian (Bulgaria)
bs-BA Bosnian (Bosnia and Herzegovina)
ca-ES Catalan (Spain)
cs-CZ Czech (Czech Republic)
cy-GB Welsh (United Kingdom)
da-DK Danish (Denmark)
de-AT German (Austria)
de-CH German (Switzerland)
de-DE German (Germany)
de-LI German (Liechtenstein)
de-LU German (Luxembourg)
dv-MV Divehi (Maldives)
el-GR Greek (Greece)
en-AU English (Australia)
en-BZ English (Belize)
en-CA English (Canada)
en-CB English (Caribbean)
en-GB English (United Kingdom)
en-IE English (Ireland)
en-JM English (Jamaica)
en-NZ English (New Zealand)
en-PH English (Republic of the Philippines)
en-TT English (Trinidad and Tobago)
en-US English (United States)
en-ZA English (South Africa)
en-ZW English (Zimbabwe)
es-AR Spanish (Argentina)
es-BO Spanish (Bolivia)
es-CL Spanish (Chile)
es-CO Spanish (Colombia)
es-CR Spanish (Costa Rica)
es-DO Spanish (Dominican Republic)
es-EC Spanish (Ecuador)
es-ES Spanish (Castilian)
es-ES Spanish (Spain)
es-GT Spanish (Guatemala)
es-HN Spanish (Honduras)
es-MX Spanish (Mexico)
es-NI Spanish (Nicaragua)
es-PA Spanish (Panama)
es-PE Spanish (Peru)
es-PR Spanish (Puerto Rico)
es-PY Spanish (Paraguay)
es-SV Spanish (El Salvador)
es-UY Spanish (Uruguay)
es-VE Spanish (Venezuela)
et-EE Estonian (Estonia)
eu-ES Basque (Spain)
fa-IR Farsi (Iran)
fi-FI Finnish (Finland)
fo-FO Faroese (Faroe Islands)
fr-BE French (Belgium)
fr-CA French (Canada)
fr-CH French (Switzerland)
fr-FR French (France)
fr-LU French (Luxembourg)
fr-MC French (Principality of Monaco)
gl-ES Galician (Spain)
gu-IN Gujarati (India)
he-IL Hebrew (Israel)
hi-IN Hindi (India)
hr-BA Croatian (Bosnia and Herzegovina)
hr-HR Croatian (Croatia)
hu-HU Hungarian (Hungary)
hy-AM Armenian (Armenia)
id-ID Indonesian (Indonesia)
is-IS Icelandic (Iceland)
it-CH Italian (Switzerland)
it-IT Italian (Italy)
ja-JP Japanese (Japan)
ka-GE Georgian (Georgia)
kk-KZ Kazakh (Kazakhstan)
kn-IN Kannada (India)
ko-KR Korean (Korea)
kok-IN Konkani (India)
ky-KG Kyrgyz (Kyrgyzstan)
lt-LT Lithuanian (Lithuania)
lv-LV Latvian (Latvia)
mi-NZ Maori (New Zealand)
mk-MK FYRO Macedonian (Former Yugoslav Republic of Macedonia)
mn-MN Mongolian (Mongolia)
mr-IN Marathi (India)
ms-BN Malay (Brunei Darussalam)
ms-MY Malay (Malaysia)
mt-MT Maltese (Malta)
nb-NO Norwegian (Bokm?l) (Norway)
nl-BE Dutch (Belgium)
nl-NL Dutch (Netherlands)
nn-NO Norwegian (Nynorsk) (Norway)
ns-ZA Northern Sotho (South Africa)
pa-IN Punjabi (India)
pl-PL Polish (Poland)
ps-AR Pashto (Afghanistan)
pt-BR Portuguese (Brazil)
pt-PT Portuguese (Portugal)
qu-BO Quechua (Bolivia)
qu-EC Quechua (Ecuador)
qu-PE Quechua (Peru)
ro-RO Romanian (Romania)
ru-RU Russian (Russia)
sa-IN Sanskrit (India)
se-FI Sami (Northern) (Finland)
se-FI Sami (Skolt) (Finland)
se-FI Sami (Inari) (Finland)
se-NO Sami (Northern) (Norway)
se-NO Sami (Lule) (Norway)
se-NO Sami (Southern) (Norway)
se-SE Sami (Northern) (Sweden)
se-SE Sami (Lule) (Sweden)
se-SE Sami (Southern) (Sweden)
sk-SK Slovak (Slovakia)
sl-SI Slovenian (Slovenia)
sq-AL Albanian (Albania)
sr-BA Serbian (Latin) (Bosnia and Herzegovina)
sr-BA Serbian (Cyrillic) (Bosnia and Herzegovina)
sr-SP Serbian (Latin) (Serbia and Montenegro)
sr-SP Serbian (Cyrillic) (Serbia and Montenegro)
sv-FI Swedish (Finland)
sv-SE Swedish (Sweden)
sw-KE Swahili (Kenya)
syr-SY Syriac (Syria)
ta-IN Tamil (India)
te-IN Telugu (India)
th-TH Thai (Thailand)
tl-PH Tagalog (Philippines)
tn-ZA Tswana (South Africa)
tr-TR Turkish (Turkey)
tt-RU Tatar (Russia)
uk-UA Ukrainian (Ukraine)
ur-PK Urdu (Islamic Republic of Pakistan)
uz-UZ Uzbek (Latin) (Uzbekistan)
uz-UZ Uzbek (Cyrillic) (Uzbekistan)
vi-VN Vietnamese (Viet Nam)
xh-ZA Xhosa (South Africa)
zh-CN Chinese (S)
zh-HK Chinese (Hong Kong)
zh-MO Chinese (Macau)
zh-SG Chinese (Singapore)
zh-TW Chinese (T)
zu-ZA Zulu (South Africa)

 

مدة العمل ( ساعة ونصف ) :biggrin:

SetLocaleInfo.rar 37.88 kB · 14 downloads

بسم الله ما شاء الله مجهود جبار بارك الله فيك اخي ووفقك الى ما تريد :fff:.

  • 2 months later...
  • 1 year later...
قام بنشر

كلمة شكر وعرفان لك مهنسنا العزيز @SEMO.Pa3x 🙂 

هذي الأداة مريحة جدا ماشاء الله .. تخف علينا نصف العناء أثناء التنصيب وخصوصا للأجهزة البعيدة :biggrin:

 

فقط أنا قمت بتعديل بسيط في الكود لتعمل على النظامين 32 و 64 بت  .. 🙂 

 

وأتمنى لو يكون فيه طريقة أيضا لإضافة تعيين التنسيق الإقليمي مرة وحدة ( كتعديل على الأداة )

وبالمرة أتمنى لو يكون فيه طريقة لعمل كل هذا عن طريق الأكسس بدون أدوات خارجية مساعدة 🙂 

 

الكود المعدل :

#If VBA7 Then
Private Declare PtrSafe Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
        (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, _
         ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
#Else
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
        (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, _
         ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
#End If

Const SW_SHOWNORMAL = 1

Private Sub cmd_change_Click()


If IsNull(comb_countries) Then Exit Sub

    Dim SetLocaleInfo_File As String
    Dim Parameters As String

    SetLocaleInfo_File = CurrentProject.Path + "\SetLocaleInfo.exe"
    Parameters = comb_countries
    
    ShellExecute 0, "runas", SetLocaleInfo_File, Parameters, vbNullString, SW_SHOWNORMAL
    
End Sub

والمرفق بعد التعديل :

SetLocaleInfo.rar

  • Like 2
  • Thanks 1
قام بنشر
1 ساعه مضت, Moosak said:

كلمة شكر وعرفان لك مهنسنا العزيز @SEMO.Pa3x 🙂 

هذي الأداة مريحة جدا ماشاء الله .. تخف علينا نصف العناء أثناء التنصيب وخصوصا للأجهزة البعيدة :biggrin:

 

فقط أنا قمت بتعديل بسيط في الكود لتعمل على النظامين 32 و 64 بت  .. 🙂 

 

وأتمنى لو يكون فيه طريقة أيضا لإضافة تعيين التنسيق الإقليمي مرة وحدة ( كتعديل على الأداة )

وبالمرة أتمنى لو يكون فيه طريقة لعمل كل هذا عن طريق الأكسس بدون أدوات خارجية مساعدة 🙂 

 

الكود المعدل :

#If VBA7 Then
Private Declare PtrSafe Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
        (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, _
         ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
#Else
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
        (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, _
         ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
#End If

Const SW_SHOWNORMAL = 1

Private Sub cmd_change_Click()


If IsNull(comb_countries) Then Exit Sub

    Dim SetLocaleInfo_File As String
    Dim Parameters As String

    SetLocaleInfo_File = CurrentProject.Path + "\SetLocaleInfo.exe"
    Parameters = comb_countries
    
    ShellExecute 0, "runas", SetLocaleInfo_File, Parameters, vbNullString, SW_SHOWNORMAL
    
End Sub

والمرفق بعد التعديل :

SetLocaleInfo.rar 32 kB · 1 download

الله يبعد عنك المتدودة 😅

سلمت اناملك…

  • Haha 1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

زائر
اضف رد علي هذا الموضوع....

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • اضف...

Important Information