
菜单 “工具” -> “选项” -> “邮件格式” -> “国际选项” -> “常规设置”
Archive for the ‘技术’ Category
2007年12月19日 星期三
几天没有在家上网了, 今天打开电脑看看, Firefox提示有新版本, 于是点击下载安装. 重启后就看到了这个画面. 似乎Firefox也开始迎合现在网民们的取舍观念了. 存照留念.
2007年12月11日 星期二
You can disable CTRL-ENTER in Outlook by adding the two following registry keys:
Key: HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\11.0\Outlook\DisabledShortcutKeysCheckBoxes
String Value: CtrlEnter
Value Data: 13,8
Key: HKEY_CURRENT_USER\Software\Policies\Microsoft\Office\11.0\Word\DisabledShortcutKeysCheckBoxes
String Value: CtrlEnter
Value Data: 13,8
NOTE: I’m using Office 2003 = 11.0 (XP = 10.0, 2000 = 9.0)
From Microsoft:
Disable a Predefined Shortcut Key with a Policy Setting
In order to disable predefined (built-in) and custom shortcut keys for commands in Microsoft Office XP, you must know how to type the shortcut key ID into the System Policy Editor. Several built-in shortcut keys are listed in the Predefined category of most application policy templates.
To disable a predefined shortcut key with a policy:
1. Start the System Policy Editor.
2. Double-click the policy profile that you want to work with.
3. Expand the Office application node (click the plus [+] sign, or double-click the application name) that contains the built-in shortcut key that you want to disable.
4. Expand the Disable items in user interface node.
5. Expand the Predefined node.
6. Select the Disable shortcut keys check box.
7. In the Settings for Disable shortcut keys work area, select the check box next to the shortcut key that you want to disable.
For example, select the CTRL+K (Insert Hyperlink) check box to disable the shortcut key for the Hyperlink command (on the Insert menu) in Word.
来源: http://bhandler.spaces.live.com/Blog/cns!1pt1v0Q4vD8jSvNS4lqdAuug!303.entry
2007年12月06日 星期四
忙了一个星期终于搞掂了,心情顺畅,以此志之。
代码如下:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, ExtCtrls, StdCtrls;
type
MQDataInfo = record
ID : Integer;
Name : PAnsiChar;
Value : PAnsiChar;
Image : TBitmap;
end;
PMQDataInfo = ^MQDataInfo;
type
TForm1 = class(TForm)
Memo1: TMemo;
Button1: TButton;
LabeledEdit1: TLabeledEdit;
LabeledEdit2: TLabeledEdit;
LabeledEdit3: TLabeledEdit;
Button2: TButton;
Button3: TButton;
Image1: TImage;
procedure Button1Click(Sender: TObject);
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
uses MQI;
const
QM_NAME : MQCHAR48 = ‘MyTest’#0;
QUEUE_NAME : MQCHAR48 = ‘Test001′#0;
procedure TForm1.Button1Click(Sender: TObject);
var
Hconn : MQHCONN;
Hobj : MQHOBJ;
ConnectOpts : MQCNO;
QMgrName : MQCHAR48;
ObjDesc : MQOD;
Options, CompCode, Reason : MQLONG;
Buffer : MQDataInfo; //PAnsiChar;//Array[0..1024000] of Byte;
BufferLength : Integer;
MsgDesc : MQMD;
PutMsgOptions : MQPMO;
begin
QMgrName := QM_NAME;
ConnectOpts := MQCNO_DEFAULT;
MQCONNX ( @QMgrName, @ConnectOpts, @HConn, @Compcode, @Reason);
if CompCode <> MQCC_OK then
begin
Self.Memo1.Lines.Add(‘Connect Failed’);
end
else
begin
Self.Memo1.Lines.Add(‘Connected successed’);
end;
Options := MQOO_FAIL_IF_QUIESCING + MQOO_OUTPUT;
ObjDesc := MQOD_DEFAULT;
ObjDesc.ObjectName := QUEUE_NAME;
MQOPEN (HConn, @ObjDesc, Options, @HObj, @Compcode, @Reason );
if CompCode <> MQCC_OK then
begin
Self.Memo1.Lines.Add(‘Open Failed’);
end
else
begin
Self.Memo1.Lines.Add(‘Open Successed’);
end;
MsgDesc := MQMD_DEFAULT;
PutMsgOptions := MQPMO_DEFAULT;
Buffer.ID := 100;
Buffer.Name := ‘Name001′#0;
Buffer.Value := ‘Value001′#0;
Buffer.Image := TBitmap.Create;
Buffer.Image.Assign(Self.Image1.Picture.Bitmap);
BufferLength := sizeof(Buffer);
MQPUT(HConn, Hobj, @MsgDesc, @PutMsgOptions, BufferLength, @Buffer, @Compcode, @Reason);
if CompCode <> MQCC_OK then
begin
Self.Memo1.Lines.Add(‘Put Failed’);
end
else
begin
Self.Memo1.Lines.Add(‘Put Successed’);
end;
Options := MQCO_NONE;
MQCLOSE ( HConn, @Hobj, Options, @Compcode, @Reason);
if CompCode <> MQCC_OK then
begin
Self.Memo1.Lines.Add(‘Close Failed’);
end
else
begin
Self.Memo1.Lines.Add(‘Close Successed’);
end;
MQDISC ( @HConn, @Compcode, @Reason );
if CompCode <> MQCC_OK then
begin
Self.Memo1.Lines.Add(‘Disconnect Failed’);
end
else
begin
Self.Memo1.Lines.Add(‘Disconnected successed’);
end;
Self.Memo1.Lines.Add(‘———————-’);
end;
procedure TForm1.Button2Click(Sender: TObject);
var
Hconn : MQHCONN;
Hobj : MQHOBJ;
ConnectOpts : MQCNO;
QMgrName : MQCHAR48;
ObjDesc : MQOD;
Options, CompCode, Reason : MQLONG;
Buffer : MQDataInfo;// Array[0..1024000] of Char;
BufferLength : Integer;
MsgDesc : MQMD;
GetMsgOptions : MQGMO;
DataLength : MQLONG;
begin
QMgrName := QM_NAME;
ConnectOpts := MQCNO_DEFAULT;
MQCONNX ( @QMgrName, @ConnectOpts, @HConn, @Compcode, @Reason);
if CompCode <> MQCC_OK then
begin
Self.Memo1.Lines.Add(‘Connect Failed’);
end
else
begin
Self.Memo1.Lines.Add(‘Connected successed’);
end;
Options := MQOO_FAIL_IF_QUIESCING + MQOO_INPUT_AS_Q_DEF;
ObjDesc := MQOD_DEFAULT;
ObjDesc.ObjectName := QUEUE_NAME;
MQOPEN (HConn, @ObjDesc, Options, @HObj, @Compcode, @Reason );
if CompCode <> MQCC_OK then
begin
Self.Memo1.Lines.Add(‘Open Failed’);
end
else
begin
Self.Memo1.Lines.Add(‘Open Successed’);
end;
BufferLength := sizeof(Buffer);
DataLength := 0;
MsgDesc := MQMD_DEFAULT;
GetMsgOptions := MQGMO_DEFAULT;
MQGET(HConn, Hobj, @MsgDesc, @GetMsgOptions, BufferLength, @Buffer, @DataLength, @Compcode, @Reason);
if CompCode <> MQCC_OK then
begin
//队列无消息信息
if Reason = MQRC_NO_MSG_AVAILABLE then
begin
Self.Memo1.Lines.Add(‘The queue is empty’);
end
else
begin
Self.Memo1.Lines.Add(‘Get Failed’);
end;
end
else
begin
Self.LabeledEdit1.Text := IntToStr(Buffer.ID);
Self.LabeledEdit2.Text := Buffer.Name;
Self.LabeledEdit3.Text := Buffer.Value;
Self.Image1.Picture.Bitmap.Assign(Buffer.Image);
Self.Memo1.Lines.Add(‘Get Successed’);
end;
Options := MQCO_NONE;
MQCLOSE ( HConn, @Hobj, Options, @Compcode, @Reason);
if CompCode <> MQCC_OK then
begin
Self.Memo1.Lines.Add(‘Close Failed’);
end
else
begin
Self.Memo1.Lines.Add(‘Close Successed’);
end;
MQDISC ( @HConn, @Compcode, @Reason );
if CompCode <> MQCC_OK then
begin
Self.Memo1.Lines.Add(‘Disconnect Failed’);
end
else
begin
Self.Memo1.Lines.Add(‘Disconnected successed’);
end;
Self.Memo1.Lines.Add(‘———————-’);
end;
procedure TForm1.Button3Click(Sender: TObject);
begin
Self.LabeledEdit1.Text := ‘0′;
Self.LabeledEdit2.Text := ”;
Self.LabeledEdit3.Text := ”;
Self.Image1.Picture.Assign(nil);
end;
end.
2007年12月06日 星期四
测试服务器到服务器:
要测试安装,必须设置两个工作站,一个作为发送方,另一个作为接收方。
1.设置发送方工作站:
1.1.创建名为“saturn.queue.manager”的缺省队列管理器。
命令为:crtmqm -q saturn.queue.manager
消息显示已创建该队列管理器,并且创建了缺省WebSphere MQ对象。
1.2.启动缺省队列管理器。
命令为:strmqm
队列管理器启动时,将显示信息。
1.3.启动MQSC命令。
命令为:runmqsc
MQSC启动时,显示消息“启动WebSphere MQ命令”。MQSC不使用命令提示。
1.4.定义一个本地队列,作为名为Transmit1.queue的传输队列。
命令:define qlocal(transmit1.queue) usage(xmitq)
创建队列时,显示消息“已创建WebSphere MQ队列”。
1.5.创建远程队列的本地定义。
命令:define qremote(local.def.remote.queue) rname(orange.queue)
rqmname(‘venus.queue.manager’) xnitq(transmit1.queue)
rname参数指定该消息将要发送到远程机器上的队列名称。
因此,rname参数指定的名称必须是向其发送消息的队列名称(即接收方工作站的Orange.queue)。
1.6.定义发送方通道。
命令:define channel(first.channel) chltype(sdr) conname(con-name)
xmitq(transmit1.queue) trptype(tcp)
值con-name是接收方工作站的TCP/IP地址。
1.7.停止MQSC。
命令:end
—————————————————
现在,已经定义了一下对象:
1.名为saturn.queue.manager的缺省队列管理器
2.名为Transmit1.queue的传输队列
3.名为Local.def.of.remote.queue的远程队列
4.名为First.Channel的发送方通道
2.设置接收方工作站:
2.1.创建名为venus.queue.manager的缺省队列管理器。
命令:crtmqm -q venus.queue.manager
消息显示已创建该队列管理器,并且创建了缺省WebSphere MQ对象。
2.2.启动队列管理器。
命令:strmqm
队列管理器启动时,将显示消息。
2.3.启动WebSphere MQ侦听器。
命令:runmqlsr -t tcp
侦听器启动时,将显示消息。
2.4.打开一个新的命令提示窗口,准备发出MQSC命令。
命令:runmqsc
MQSC启动时,显示消息“启动WebSphere MQ命令”。MQSC不使用命令提示。
2.5.定义名为Orange.Queue的本地队列。
命令:define qlocal(orange.queue)
创建队列时,显示消息“已创建WebSphere MQ队列”。
2.6.创建接收方通道。
命令:define channel(first.channel) chltype(rcvr) trptype(tcp)
2.7.停止MQSC。
命令:end
——————————————
现在,已经定义了以下对象:
1.名为venus.queue.manager的缺省队列管理器
2.名为Orange.Queue的队列
3.名为First.Channel的接收方通道
3.测试工作站之间的通信:
3.1.如果两个工作站已停止,则使用strmqm命令重新启动它们。
3.2.在发送方工作站上,启动发送方通道。
命令:runmqchl -c FIRST.CHANNEL -m saturn.queue.manager
启动发送方通道时,将自动启动接收方工作站上的接收方通道。
3.3.在发送方工作站上,打开一个新的命令提示窗口并更改到Bin目录。
3.4.将消息放入队列。
命令:amqsput LOCAL.DEF.OF.REMOTE.QUEUE
这个命令将消息放入远程队列的本地定义(它指定远程队列名称)。
3.5.输入消息文本,然后按两次Enter键。
3.6.在接收方工作站上,更改到Bin目录。
3.7.从队列中获取消息。
命令:amqsget ORANGE.QUEUE
样本程序启动,并显示消息。暂停后,样本结束并再次显示命令提示符。