﻿<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>C++博客-fenglin-文章分类-Delphi</title><link>http://www.cppblog.com/fenglin/category/14187.html</link><description>创新、创意、挑战</description><language>zh-cn</language><lastBuildDate>Wed, 08 Sep 2010 05:53:41 GMT</lastBuildDate><pubDate>Wed, 08 Sep 2010 05:53:41 GMT</pubDate><ttl>60</ttl><item><title>多线程同步</title><link>http://www.cppblog.com/fenglin/articles/126147.html</link><dc:creator>风林</dc:creator><author>风林</author><pubDate>Wed, 08 Sep 2010 03:47:00 GMT</pubDate><guid>http://www.cppblog.com/fenglin/articles/126147.html</guid><wfw:comment>http://www.cppblog.com/fenglin/comments/126147.html</wfw:comment><comments>http://www.cppblog.com/fenglin/articles/126147.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/fenglin/comments/commentRss/126147.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/fenglin/services/trackbacks/126147.html</trackback:ping><description><![CDATA[<p><strong style="COLOR: red"><u>1、临界区</u></strong><br>一次只能由一个线程来执行的一段代码。<br><strong style="COLOR: red"><u>2、互斥<br></u></strong>互斥非常类似于临界区，除了两个关键的区别：首先，互斥可用于跨进程的线程同步。其次，互斥能被赋予一个字符串名字，并且通过引用此名字创建现有互斥对象的附加句柄。<br>临界区与事件对象（如互斥对象）的最大区别是在性能上。临界区在没有线程冲突时，要用10-15个时间片，而事件对象由于涉及到系统内核要用400-600个时间片。<br><strong><u style="COLOR: red">3、信号量</u></strong><br>它是在互斥的基础上建立的，但信号量增加了资源计数的功能，预定数目的线程允许同时进入要同步的代码。<br><br>{*******************************************************}<br>{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 多线程同步演示代码&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 版权所有 (C) 2010 风林&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>{&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br>{*******************************************************}</p>
<p><br>unit untMain;</p>
<p>interface</p>
<p>uses<br>&nbsp; Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,<br>&nbsp; Dialogs, StdCtrls;</p>
<p>type<br>&nbsp; TForm1 = class(TForm)<br>&nbsp;&nbsp;&nbsp; btnStart: TButton;<br>&nbsp;&nbsp;&nbsp; procedure btnStartClick(Sender: TObject);<br>&nbsp; private<br>&nbsp;&nbsp;&nbsp; procedure ThreadsDone(Sender:TObject);<br>&nbsp; public<br>&nbsp;&nbsp;&nbsp; { Public declarations }<br>&nbsp; end;</p>
<p>var<br>&nbsp; Form1: TForm1;</p>
<p>implementation</p>
<p>{$R *.dfm}<br>var<br>&nbsp; CS:TRTLCriticalSection; //临界区记录<br>&nbsp; hMutex:THandle = 0; //互斥句柄<br>&nbsp; hSem:THandle = 0;//信号量句柄<br>&nbsp; DoneFlags:Integer = 0;<br>threadvar//线程局部变量<br>&nbsp; GlobalStr:string;<br>type<br>&nbsp; TTLSThread = class(TThread)<br>&nbsp;&nbsp;&nbsp; private<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FNewStr:string;<br>&nbsp;&nbsp;&nbsp; protected<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; procedure Execute;override;<br>&nbsp;&nbsp;&nbsp; public<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; constructor Create(const ANewStr:string);<br>&nbsp; end;</p>
<p>procedure SetShowStr(const S:string);<br>begin<br>&nbsp; if S = '' then<br>&nbsp;&nbsp;&nbsp; MessageBox(0,PChar(GlobalStr),'The string is...',MB_OK)<br>&nbsp; else<br>&nbsp;&nbsp;&nbsp; GlobalStr := S;&nbsp; <br>end;</p>
<p>{ TTLSThread }</p>
<p>constructor TTLSThread.Create(const ANewStr: string);<br>begin<br>&nbsp; FNewStr := ANewStr;<br>&nbsp; inherited Create(False);<br>end;</p>
<p>procedure TTLSThread.Execute;<br>var<br>&nbsp; WaitReturn:DWORD;<br>begin<br>&nbsp; OnTerminate := Form1.ThreadsDone; //线程结束时执行相应清理代码<br>&nbsp; FreeOnTerminate := True; //自动释放资源<br>&nbsp; //EnterCriticalSection(CS); //进入临界区<br>&nbsp; WaitReturn := WaitForSingleObject(hSem,INFINITE);//计数器减1<br>//&nbsp; if WaitForSingleObject(hMutex,INFINITE)= WAIT_OBJECT_0 then<br>&nbsp; if WaitReturn = WAIT_OBJECT_0&nbsp; then<br>&nbsp; begin<br>&nbsp;&nbsp;&nbsp; SetShowStr(FNewStr);<br>&nbsp;&nbsp;&nbsp; SetShowStr('');<br>&nbsp;&nbsp;&nbsp; Sleep(100);<br>&nbsp; end;<br>&nbsp; //LeaveCriticalSection(CS);//离开临界区<br>//&nbsp; ReleaseMutex(hMutex); //解除拥有关系,互斥对象重新进入发信号状态<br>&nbsp; ReleaseSemaphore(hSem,1,nil);//信号量对象计数加1<br>end;</p>
<p>procedure TForm1.btnStartClick(Sender: TObject);<br>begin<br>//&nbsp; InitializeCriticalSection(CS);//初始化临界区<br>//&nbsp; hMutex := CreateMutex(nil,False,nil); //创建一个互斥量<br>&nbsp; hSem := CreateSemaphore(nil,<br>&nbsp;&nbsp;&nbsp; 1, //这个值必须在0和lMaximumCount之间，大于0则表示处理发信号状态<br>&nbsp;&nbsp;&nbsp; 1, //由于只允许个线程进入同步代码，所以设置成1<br>&nbsp;&nbsp;&nbsp; nil);//<br>&nbsp; SetShowStr('Hello world');<br>&nbsp; TTLSThread.Create('Dilbert');<br>&nbsp; TTLSThread.Create('xx');<br>&nbsp; TTLSThread.Create('test');<br>end;</p>
<p>procedure TForm1.ThreadsDone(Sender: TObject);<br>begin<br>&nbsp; Inc(DoneFlags);<br>&nbsp; if DoneFlags = 3 then&nbsp; //当前测试时创建了3个线程<br>&nbsp; begin<br>&nbsp;&nbsp; // DeleteCriticalSection(CS); //删除临界区记录信息<br>&nbsp;&nbsp; //CloseHandle(hMutex);//释放由CreateMutex创建对象的句柄<br>&nbsp;&nbsp; CloseHandle(hSem);//释放由CreateSemaphore创建对象的句柄<br>&nbsp; end;<br>end;</p>
<p>end.<br></p>
<img src ="http://www.cppblog.com/fenglin/aggbug/126147.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/fenglin/" target="_blank">风林</a> 2010-09-08 11:47 <a href="http://www.cppblog.com/fenglin/articles/126147.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item><item><title>DELPHI中的快捷方式一览(完全正式版) </title><link>http://www.cppblog.com/fenglin/articles/119771.html</link><dc:creator>风林</dc:creator><author>风林</author><pubDate>Thu, 08 Jul 2010 12:45:00 GMT</pubDate><guid>http://www.cppblog.com/fenglin/articles/119771.html</guid><wfw:comment>http://www.cppblog.com/fenglin/comments/119771.html</wfw:comment><comments>http://www.cppblog.com/fenglin/articles/119771.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://www.cppblog.com/fenglin/comments/commentRss/119771.html</wfw:commentRss><trackback:ping>http://www.cppblog.com/fenglin/services/trackbacks/119771.html</trackback:ping><description><![CDATA[<br>&nbsp; 1.SHIFT+鼠标左键 &nbsp; &nbsp; &nbsp; &nbsp; 先选中任一控件,按键后可选中窗体(选中控件后按Esc效果一样) <br>&nbsp; 2.Shift+F8 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 调试时弹出CPU窗口。 <br>&nbsp; 3.Shift+F10 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 等于鼠标右键（Windows快捷键）。 <br>&nbsp; 4.Shitf+箭头 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 选择 <br>&nbsp; 5.shift &nbsp; +F12 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 快速查找窗体并打开 <br>&nbsp; 6.F7 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; （步进式调试同时追踪进入子过程） <br>&nbsp; 7.F8 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; （步进式调试不进入子过程） <br>&nbsp; 8.F9 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 运行 <br>&nbsp; 9.F12 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 切换EDITOR,FORM <br>&nbsp; 10.Alt+F4 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 关闭所有编辑框中打开的源程序文件，但不关闭项目 <br>&nbsp; 11.ALT+鼠标左键 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 可以块选代码，用来删除对齐的重复代码非常有用 <br>&nbsp; 12.Ctrl+F9 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 编译 <br>&nbsp; 13.Ctrl+shift+N(n=1,2,3,4......) &nbsp; &nbsp; 定义书签 <br>&nbsp; 14.Ctrl+n(n=1,2,3,4......)跳到书签n <br>&nbsp; 15.CTRL &nbsp; +SHIFT+N &nbsp; &nbsp; &nbsp; &nbsp; 在书签N处，再按一次 &nbsp; 取消书签 <br>&nbsp; 16.Ctrl+PageUp &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 将光标移至本屏的第一行，屏幕不滚动 <br>&nbsp; 17.Ctrl+PageDown &nbsp; &nbsp; &nbsp; &nbsp; 将光标移至本屏的最后一行，屏幕不滚动 <br>&nbsp; 18.Ctrl+&#8595; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 向下滚动屏幕，光标跟随滚动不出本屏 <br>&nbsp; 19.Ctrl+&#8593; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 向上滚动屏幕，光标跟随滚动不出本屏 <br>&nbsp; 20.Ctrl+Home &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 将光标移至文件头 <br>&nbsp; 21.Ctrl+End &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 将光标移至文件尾 <br>&nbsp; 22.Ctrl+B &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Buffer &nbsp; List窗口 <br>&nbsp; 23.Ctrl+I &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 同Tab键 <br>&nbsp; 24.CTRL+J &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; (弹出Delphi语句提示窗口，选择所需语句将自动完成一条语句)代码模板 <br>&nbsp; 25.Ctrl+M &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 同Enter键。 <br>&nbsp; 26.Ctrl+N &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 同Enter键，但光标位置保持不变 <br>&nbsp; 27.Ctrl+T &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 删除光标右边的一个单词 <br>&nbsp; 28.Ctrl+Y &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 删除光标所在行 <br>&nbsp; 29.CTRL+C &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 复制 <br>&nbsp; 30.CTRL+V &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 粘贴 <br>&nbsp; 31.CTRL+X &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 剪切 <br>&nbsp; 32.CTRL+Z &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 还原(Undo) <br>&nbsp; 33.CTRL+S &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 保存 <br>&nbsp; 34.Ctrl+F &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 查找 <br>&nbsp; 35.Ctrl+L &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 继续查找 <br>&nbsp; 36.Ctrl+r &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 替换 <br>&nbsp; 37.CTRL+ENTER &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 定位到单元文件 <br>&nbsp; 38.Ctrl+F3 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 弹出Call &nbsp; Stack窗口 <br>&nbsp; 39.Ctrl+F4 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 等于File菜单中的Close项 <br>&nbsp; 40.Ctrl+Backspace &nbsp; &nbsp; &nbsp; 后退删除一个词,直到遇到一个分割符 <br>&nbsp; 41.Ctrl+鼠标转轮 &nbsp; &nbsp; &nbsp; &nbsp; 加速滚屏 <br>&nbsp; 42.Ctrl+O+U &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 切换选择块的大小写(注意松开O后再按U,Ctrl保持按下) <br>&nbsp; 43.Ctrl+K+O &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 切换选择块为小写(注意松开K后再按O,Ctrl保持按下) <br>&nbsp; 44.Ctrl+K+N &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 切换选择块为大写(注意松开K后再按N,Ctrl保持按下) <br>&nbsp; 45.Ctrl+Shift+G &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 插入GUID <br>&nbsp; 46.Ctrl+Shift+T &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 在光标行加入To-Do注释 <br>&nbsp; 47.Ctrl+Shift+Y &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 删除光标之后至本行末尾之间的文本 <br>&nbsp; 48.CTRL+SHIFT+C &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 编写申明或者补上函数，绝好!!! <br>&nbsp; 49.CTRL+SHIFT+E &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 显示EXPLORER <br>&nbsp; 50.Ctrl+Tab &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 在Inspector中切换Properties页和Events页 <br>&nbsp; 51.CTRL+SHIFT+U &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 代码整块左移2个空格位置 <br>&nbsp; 52.CTRL+SHIFT+I &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 代码整块右移2个空格位置 <br>&nbsp; 53.CTRL+SHIFT+&#8593; &nbsp; &nbsp; &nbsp; &nbsp; 在过程、函数、事件内部, &nbsp; 可跳跃到相应的过程、函数、事 <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 件的定义（在interface和implementation之间来回切换） <br>&nbsp; 54.CTRL+SHIFT+&#8595; &nbsp; &nbsp; &nbsp; &nbsp; 在过程、函数、事件的定义处， &nbsp; 可跳跃到具体过程、函数、事件内部(同上) <br>&nbsp; 55.Tab &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 在object &nbsp; inspector窗口按tab键将光标移动到属性名区，然后键入属性名的开头 <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 字母可快速定位到该属性 <br>&nbsp; 56.Ctrl+Alt &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 按着Ctrl+Alt之后，可用鼠标选择一个矩形块中的代码， <br>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 并可比它进行复制，粘贴 <br>&nbsp; 57.Shift+&#8595;、&#8593;、&#8594;、&#8592; &nbsp; 以1像素单位更改所选控件大小 <br>&nbsp; 58.Ctrl+&#8595;、&#8593;、&#8594;、&#8592;以1像素单位更改所选控件位置 <br>&nbsp; 59.Ctrl+E &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 快速选择&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <br><br>
<img src ="http://www.cppblog.com/fenglin/aggbug/119771.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://www.cppblog.com/fenglin/" target="_blank">风林</a> 2010-07-08 20:45 <a href="http://www.cppblog.com/fenglin/articles/119771.html#Feedback" target="_blank" style="text-decoration:none;">发表评论</a></div>]]></description></item></channel></rss>