۱۶-مهر-۱۳۸۷, ۱۰:۴۰:۱۹
۱۷-مهر-۱۳۸۷, ۰۹:۲۳:۱۰
تبدیل انگلیسی به فارسی راحته اما تبدیل فارسی به انگلیسی سخته چون ما تو فارسی هجی ها رو نمینویسیم مثل اعراب
۱۷-مهر-۱۳۸۷, ۱۰:۲۴:۰۸
منظورشون تغيير زبان كيبورد نبود؟
۱۷-مهر-۱۳۸۷, ۲۳:۳۴:۲۸
نه نمی خوام زبان کیبورد رو عوض کنم
۱۸-مهر-۱۳۸۷, ۰۱:۲۹:۵۳
آقای lord میشه یشتر در مورد LoadKeyboardLayoutتوضیح بدین
۱۸-مهر-۱۳۸۷, ۰۸:۵۸:۵۸
کد:
LoadKeyboardLayout(pchar('00000429'),KLF_ACTIVATE);
این تابع 2 تا مقدار میگیره اولیش نام اون layoutرو مشخص میکنه که باید یک مقدار هگز از شناسه ان layout که در سیستم نصب شده[/code] باشه که میخواهین اسفاده کنین که مال فارسی 00000429 هست و دومین مقدار هم وضعیت بارگزاری layout جدیدرو مشخص میکنه
نقل قول: he LoadKeyboardLayout function loads a keyboard layout.
HKL LoadKeyboardLayout(
LPCTSTR pwszKLID, // address of buffer for layout name
UINT Flags // keyboard layout flags
);
Parameters
pwszKLID
Points to the buffer that specifies the name of the keyboard layout. The name should be derived from the hexadecimal value of the language identifier corresponding to the layout. For example, U.S. English has a language identifier of 0x0409, so the primary U.S. English layout is named "00000409". Variants of U.S. English layout, such as the Dvorak layout, are named "00010409", "00020409", and so on. For a list of the primary language identifiers and sub-language identifiers that make up a language identifier, see the MAKELANGID macro.
Flags
Specifies how the keyboard layout is to be loaded. This parameter can be one of the following values:
Value Meaning
KLF_ACTIVATE The function loads the layout if it is not already loaded, and activates it. This value activates the layout for the entire system not just the calling thread.
KLF_REORDER This flag is meaningful only if the KLF_ACTIVATE flag is set and the layout is already loaded. If these conditions are met and the KLF_REORDER bit is set, the function removes the specified layout from its position in the system's circular list of loaded layouts, and places it at the head of the list as the active layout.
If the KLF_ACTIVATE bit is set and the layout is loaded but the KLF_REORDER bit is not set, the function simply rotates the system's circular list of loaded layouts.
If the KLF_ACTIVATE flag is set and the layout is not already loaded, it is loaded as the active layout and inserted in the system's circular list of keyboard layouts ahead of the previously active layout.
KLF_SUBSTITUTE_OK The specified layout is looked up in the user's profile (in the registry under the key HKEY_CURRENT_USER\Keyboard Layout\Substitutes) to find a substitution layout preferred by the user. For example, if there was a value in this section of name "00000409" equal to "00010409", loading the U.S. English layout ("00000409") with the KLF_SUBSTITUTE_OK flag set would cause the Dvorak U.S. English layout ("00010409") to be loaded.
KLF_UNLOADPREVIOUS If KLF_ACTIVATE is specified, and the layout is loaded and activated successfully, the function unloads the previously active layout. Otherwise, the function ignores this flag.
Return Values
If the function succeeds, the return value is the handle of the keyboard layout.
If the function fails, the return value is NULL. To get extended error information, call GetLastError.
Remarks
Several keyboard layouts can be loaded at a time, but only one at a time is active. Loading multiple keyboard layouts makes it possible to switch rapidly between layouts.
۲۴-مهر-۱۳۸۷, ۱۸:۴۳:۵۷
اقای lord دستوری که داده بودید error میده لطف کنید و بیشتر راهنمایی کنیدممنون
۲۴-مهر-۱۳۸۷, ۲۲:۵۰:۵۰
جه errori میده ؟
کدی که من گزاشتم به دلفی هست شما نمونشو به vb پیدا کن
کدی که من گزاشتم به دلفی هست شما نمونشو به vb پیدا کن
۳۰-تير-۱۳۸۸, ۲۰:۴۷:۳۰
نقل قول: جه errori میده ؟
کدی که من گزاشتم به دلفی هست شما نمونشو به vb پیدا کن
بفرما این هم کد vb :
کد:
Private Declare Function LoadKeyboardLayout Lib "user32" Alias "LoadKeyboardLayoutA" (ByVal pwszKLID As String, ByVal flags As Long) As Long
Private Sub Form_Load()
' change language to persian
StrLocId = LoadKeyboardLayout("00000429", 1)
End Sub
Private Sub Form_Unload(Cancel As Integer)
' return language to fingelish
StrLocId = LoadKeyboardLayout(vbNull, 1)
End Sub
موفق باشید .