tailieunhanh - AutoI Technology Curriculum Book part 64

Tham khảo tài liệu 'autoi technology curriculum book part 64', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | GUISetAccelerators Sets the accelerator table to be used in a GUI window. GUISetAccelerators accelerators winhandle Parameters accelerators A 2 dimensional array holding the accelerator table See remarks . winhandle optional Windows handle as returned by GUICreate default is the previously used window . Return Value Success Returns 1. Failure Returns 0. Remarks The array passed to this function contains the hotkey and the control ID of the accelerator. The array must be defined as Dim array n 2 - where n is the number of accelerator keys to set array 0 0 Hotkey in HotKeySet format of 1st accelerator array 0 1 Control ID of the 1st accelerator as returned by GUICtrlCreate. array 1 0 Hotkey of 2nd accelerator array 1 1 Control ID of the 2nd accelerator . array n 0 Hotkey of nth accelerator array n 1 Control ID of the nth accelerator Passing this function a non-array will unset all accelerators for the given winhandle. Related GUICreate HotKeySet Example A simple custom messagebox that uses the MessageLoop mode include GUICreate Custom Msgbox 210 80 GUICtrlCreateLabel Please click a button 10 10 YesID GUICtrlCreateButton Yes 10 50 50 20 NoID GUICtrlCreateButton No 80 50 50 20 ExitID GUICtrlCreateButton Exit 150 50 50 20 Set accelerators for Ctrl y and Ctrl n Dim AccelKeys 2 2 Ay YesID An NoID GUISetAccelerators AccelKeys GUISetState display the GUI Do msg GUIGetMsg Select Case msg YesID MsgBox 0 You clicked on Yes Case msg NoID MsgBox 0 You clicked on No Case msg ExitID MsgBox 0 You clicked on Exit Case msg GUI_EVENT_CLOSE MsgBox 0 You clicked on Close EndSelect Until msg GUI_EVENT_CLOSE Or msg ExitID Function Reference GUISetBkColor Sets the background color of the GUI window. GUISetBkColor background winhandle Parameters background Background color of the dialog box. winhandle optional Windows handle as returned by GUICreate default is the previously used window . Return Value Success Returns 1. Failure Returns 0. Remarks Earlier versions of .