原帖地址:https://delphi.ktop.com.tw/board.php?cid=30&fid=72&tid=92608
Q:例如以下的handle
ClassName=SysTabControl32 handle=4851172
gettext=
要切換不同的TabSheet要如何傳參數呢
SendMessage(h,BM_CLICK, 0, 0); //我是用這來傳按Button的,但
TabSheet查了 API的書就沒有介紹到
A:
MSDN http://msdn2.microsoft.com/en-us/library/ms907677.aspx
USES CommCtrl;
SendMessage(PageControl1.Handle,TCM_SETCURFOCUS , 0,0); // TabSheet1
SendMessage(PageControl1.Handle,TCM_SETCURFOCUS , 1,0); // TabSheet2
Q:例如以下的handle
ClassName=SysTabControl32 handle=4851172
gettext=
要切換不同的TabSheet要如何傳參數呢
SendMessage(h,BM_CLICK, 0, 0); //我是用這來傳按Button的,但
TabSheet查了 API的書就沒有介紹到
A:
MSDN http://msdn2.microsoft.com/en-us/library/ms907677.aspx
USES CommCtrl;
SendMessage(PageControl1.Handle,TCM_SETCURFOCUS , 0,0); // TabSheet1
SendMessage(PageControl1.Handle,TCM_SETCURFOCUS , 1,0); // TabSheet2