哈哈,收到了,谢谢! 下面是关于位运算的所有运算符号The following logical operators perform bitwise manipulation on integer operands. For example, if the value stored in X (in binary) is 001101 and the value stored in Y is 100001, the statementZ := X or Y;assigns the value 101101 to Z.Operator Operation Operand types Result type Examples not bitwise negation integer integer not X and bitwise and integer integer X and Y or bitwise or integer integer X or Y xor bitwise xor integer integer X xor Y shl bitwise shift left integer integer X shl 2 shr bitwise shift right integer integer Y shl I The following rules apply to bitwise operators.The result of a not operation is of the same type as the operand. If the operands of an and, or, or xor operation are both integers, the result is of the predefined integer type with the smallest range that includes all possible values of both types. The operations x shl y and x shr y shift the value of x to the left or right by y bits, which is equivalent to multiplying or dividing x by 2^y; the result is of the same type as x. For example, if N stores the value 01101 (decimal 13), then N shl 1 returns 11010 (decimal 26).
下面是关于位运算的所有运算符号The following logical operators perform bitwise manipulation on integer operands. For example, if the value stored in X (in binary) is 001101 and the value stored in Y is 100001, the statementZ := X or Y;assigns the value 101101 to Z.Operator Operation Operand types Result type Examples
not bitwise negation integer integer not X
and bitwise and integer integer X and Y
or bitwise or integer integer X or Y
xor bitwise xor integer integer X xor Y
shl bitwise shift left integer integer X shl 2
shr bitwise shift right integer integer Y shl I
The following rules apply to bitwise operators.The result of a not operation is of the same type as the operand.
If the operands of an and, or, or xor operation are both integers, the result is of the predefined integer type with the smallest range that includes all possible values of both types.
The operations x shl y and x shr y shift the value of x to the left or right by y bits, which is equivalent to multiplying or dividing x by 2^y; the result is of the same type as x. For example, if N stores the value 01101 (decimal 13), then N shl 1 returns 11010 (decimal 26).
$10是十六进制的10,也就是十进位制的16;DELPHI中用$标识十六进制,同C/C++中的0x
发送消息激发特定的事件?搞不清楚什么意思!你是不是激发指定控件的指定时间?这倒有简单方法,例如:
Bit1Click中写入:
Bit2.OnClick:=Bit1Click;
俺在button2的OnClick事件中想触发button1的OnClick事件,模拟户不点击button1的效果。
俺想应该只用在Bit2Click中写入
Bit1Click;
即可。估计button1不会有被按下的效果。如果不是button1,而是一些复选项的东西。那
它的状态就不会改变了。对吗?所以,俺想传递一个消息给Button1,模拟OnClick事件。
俺在button2的OnClick事件中想触发button1的OnClick事件,模拟户不点击button1的效果。
俺想应该只用在Bit2Click中写入
Bit1Click;
即可。估计button1不会有被按下的效果。如果不是button1,而是一些复选项的东西。那
它的状态就不会改变了。对吗?所以,俺想传递一个消息给Button1,模拟OnClick事件。
BUTTON1没有按下的效果,但它的作用还是实现了。如果它要改变什么状态,应该有改变了!
先要想办法获得那个控件的句柄,或那个控件所在窗口的句柄
然后可以用postmessage,或mouse_event, ken_event等函数来发出相应的消息
应该没问题的
还有,我看到有人小看API,你别告诉我你是ASM高手,或更厉害,能直接用01写代码
只有掌握了API,才是真正的编程高手,至少在WIN下是这样的
在我看来,几乎全世界也没几个人全面了解API的函数,更别说它的强大了
先要想办法获得那个控件的句柄,或那个控件所在窗口的句柄
然后可以用postmessage,或mouse_event, ken_event等函数来发出相应的消息
应该没问题的
还有,我看到有人小看API,你别告诉我你是ASM高手,或更厉害,能直接用01写代码
只有掌握了API,才是真正的编程高手,至少在WIN下是这样的
在我看来,几乎全世界也没几个人全面了解API的函数,更别说它的强大了
例如建立两个Button,然后:
procedure TTemplyForm.Button1Click(Sender: TObject);
begin
ShowMessage('Click Button2 Active Button1');
Button2.OnClick:=Button1Click;
end;当然,你可以在其它地方写入:Button2.OnClick:=Button1Click;
但是如果的的两个Button激活的事件完全一样,那么可以在设计时选中Button2,然后从OnClick中选择你要激活的事件(注意:是选择,这可能是我首先发现的!)
给三分别嫌少哦。