Skip to content

月份:2008年6月

win2008内存管理

    前几天又重装了一下win2008,因为用着有问题。我以为是我之前装那次系统驱动没装好,因为在升级显卡驱动时经常装了又卸载。现象为:我本本装的是2G内存,没有启用虚拟内存。内存使用量到1.5G左右就会发生一些奇怪的问题,像Word会报没有内存、磁盘空间不足等。还有QQ有可能会死掉,其他程序也一样。

    这次重装系统我先不装显卡驱动,把软件先装了。发生还是会有一样的问题,像使用Delphi7。打开Delphi7后把它最小化,桌面最上边会有一些残留。我不知道这是为什么,原以为是我安装的显卡驱动有问题,没在意。可这次我还没装显卡驱动。

    先不管,把安装完成,再装Office等软件。然后才去装显卡驱动。

Leave a Comment

Delphi IDE 缺省快捷键

    从Borland网站上找到的快捷键列表,这里列出的快捷键应该是比较全的,另外还有一些有关Delphi的技巧,到这个网站去看:http://bdn1.borland.com/article/borcon/files/3010/slides/3010_files/frame.htm

Ctrl+F 进行搜索

快捷键 描述 IDE 版本
Escape Selects parent control in design mode. Left mouse click + Escape drags the parent control Delphi 2 and up
Shift + Click After selecting control in form designer, click on it with Shift again to select top most parent Form Delphi 5 and up
Tab In Object Inspector activates incremental search for properties. Press again Tab to move focus to property value Delphi 5 and up
Ctrl + J Invoke code templates also called code snippets Delphi 5 and up
Ctrl + T Delete text from cursor position until end of word Delphi 5 and up
Ctrl + E Incremental search Delphi 5 and up
Ctrl + Y Delete current line Delphi 5 and up
Ctrl + B Invoke buffer window when focus is on editor. The buffer window shows a list of all different tabs. Delphi 2007 and up
Ctrl + Shift + G Insert a new GUID at the cursor position Delphi 5 and up
Ctrl + Shift + I Indent the current selected block Delphi 5 and up
Ctrl + Shift + U Unindent the current selected block Delphi 5 and up
Ctrl + K + I Indent the current selected block or current line in case of no selection Delphi 5 and up
Ctrl + K + U Unindent the current selected block or current line in case of no selection Delphi 5 and up
Ctrl + Shift + J Invoke SyncEdit Borland Developer Studio 2006
Ctrl + Shift + V Automatically declare variable at cursor position Borland Developer Studio 2006
Ctrl + Shift + Y Delete to the end of line Delphi 5 and up
Alt + [ Match pair forward Delphi 5 and up
Alt + ] Match pair backward Delphi 5 and up
Alt + RightArrow Browse forward (hotlink history) Delphi 7 and up
Alt + LeftArrow Browse backward (hotlink history) Delphi 7 and up
Alt + UpArrow Browse to symbol under editor cursor (invoke a hotlink and add it to the hotlink history) Borland Developer Studio 2006
F4 Run program to current cursor position Delphi 2 and up
F5 Toggle breakpoint Delphi 2 and up
F7 Debugger step into Delphi 2 and up
Shift – F7 Trace into next source line Delphi 5 and up
F8 Debugger step over Delphi 2 and up
Shift – F8 Run until return Delphi 5 and up
F9 Run program under debugger Delphi 2 and up
Ctrl + F2 Program Reset Delphi 5 and up
Ctrl + F7 Evaluate/modify Delphi 2005 and up
Ctrl + F5 Add Watch Delphi 5 and up
Ctrl + F12 View units Delphi 2 and up
Alt + G Goto line number in editor Delphi 2 and up
Ctrl + O + G Goto line number in editor Delphi 5 and up
Ctrl + Shift + R Start/stop recording editor macro Delphi 2 and up
Ctrl + Shift + P Play editor macro Delphi 2 and up
Ctrl + Spacebar Invoke code completion Delphi 5 and up
Ctrl + Shift + Spacebar Invoke code parameter hints Delphi 5 and up
Ctrl + Enter Open file at cursor Delphi 2 and up
Ctrl + Shift + Enter Find all references Delphi 2005 and up
Ctrl + Shift + C Invoke class completion for the class that currently contains the cursor Delphi 5 and up
Ctrl + Shift + UpArrow Navigate to method implementation/declaration Delphi 5 and up
Ctrl + Shift + DownArrow Navigate to method implementation/declaration Delphi 5 and up
Ctrl + Alt + F12 Opens the drop-down on the top-right corner of the code editor, listing all open files Borland Developer Studio 2006
Ctrl + Alt + Mouse Wheel Navigate to previous or next method implementation in lexical order in this source unit, or within the class to which scope has been limited using Ctrl+Q+L Borland Developer Studio 2006
Ctrl + Alt + UpArrow Navigate to previous method implementation in lexical order in this source unit, or within the class to which scope has been limited using Ctrl+Q+L Borland Developer Studio 2006
Ctrl + Alt + DownArrow Navigate to next method implementation in lexical order in this source unit, or within the class to which scope has been limited using Ctrl+Q+L Borland Developer Studio 2006
Ctrl + Alt + Home Navigate to the lexically first method implementation in this source unit, or within the class to which scope has been limited using Ctrl+Q+L Borland Developer Studio 2006
Ctrl + Alt + End Navigate to the lexically last method implementation in this source unit, or within the class to which scope has been limited using Ctrl+Q+L Borland Developer Studio 2006
Ctrl + Alt + P Activate the Tool Palette in filtering mode (start typing, press Enter to drop component) Delphi 2005 and up
Ctrl + / Toggle comment per line or selected block, Ctrl + ‘ on nordic (and perhaps other international ) keyboards Delphi 2005 and up
Ctrl + Shift + T Add todo list item Delphi 2005 and up
Alt + F12 Toggle between Form as text mode of design mode Delphi 5 and up
Alt + F11 Invoke Use unit dialog Delphi 5 and up
Ctrl + F11 Invoke Open Project Dialog Delphi 2005 and up
Ctrl + Alt + F11 Invoke Project manager window Delphi 2005 and up
F11 Invoke Object Inspector window Delphi 5 and up
F12 Toggle between code view and design view Delphi 5 and up
Alt + 0 Invoke Window list Delphi 2005 and up
Shift + Alt + F11 Invoke Structure window Delphi 2005 and up
Ctrl + Shift + B Invoke Browser window Delphi 5
Ctrl + Alt + B Invoke Breakpoint window Delphi 5 and up
Ctrl + Alt + S Invoke Call Stack window Delphi 5 and up
Ctrl + Alt + W Invoke Watches window Delphi 5 and up
Ctrl + Alt + L Invoke Local Variables window Delphi 5 and up
Ctrl + Alt + T Invoke Threads window Delphi 7 and up
Ctrl + Alt + F Invoke FPU window Delphi 2005(removed from Delphi 2006)
Ctrl + Alt + C Invoke CPU window Delphi 5 and up
Ctrl + Alt + V Invoke Event window Delphi 5 and up
Ctrl + Alt + M Invoke Modules window Delphi 2005 and up
Shift + F12 Invoke Forms window Delphi 5 and up
Ctrl + Shift + A Invoke Add to uses clause(Find unit in Delphi 2006) window (Refactoring) Delphi 2005 and up
Ctrl + Shift + F11 Invoke Project Options window Delphi 2005 and up
Ctrl + F9 Compile Project Delphi 5 and up
Shift + F9 Build Project Delphi 5 and up
Shift + F11 Invoke Add to project window Delphi 5 and up
Shift + Ctrl + F9 Run without debugging Delphi 2005 and up
Ctrl + F Find Delphi 3 and up
Shift + Ctrl + F Find in Files Delphi 3 and up
Alt + F7/F8 Previous/next result (for Find in Files and Messages) Delphi 7 and up
Ctrl+K+E Changes a word to lowercase and deselects selection Delphi 5 and up
Ctrl+K+F Changes a word to uppercase and deselects selection Delphi 5 and up
Ctrl+K+O Changes a word to lowercase Delphi 5 and up
Ctrl+K+N Changes a word to uppercase Delphi 5 and up
Ctrl+O+U Toggles case Delphi 5 and up
Ctrl+Shift+K+O Toggles Code folding between On and Off Delphi 2006 and up
Ctrl+Shift+K+A Code folding: Expands All blocks of code Delphi 2006 and up
Ctrl+Shift+K+E Code folding: Collapse current block of code Delphi 2006 and up
Ctrl+Shift+K+U Code folding: Expand current block of code Delphi 2006 and up
Ctrl+Shift+K+T Code folding: Toggle Current block (expand & collapse)  
Ctrl+Shift+K+R Code folding: Collapses all regions {$region ‘comment’}..{$endregion} Delphi 2006 and up
Ctrl+Shift+K+P Code folding: Collapse nested procedures  
Ctrl+Shift+K+M Code folding: Collapse all methods  
Ctrl+Shift+K+C Code folding: Collapse all classes  
Ctrl+Shift+K+G Code folding: Collapses down to primary Groups [Interface/Implementation] Delphi 2006 and up
Ctrl+Shift+K+N Code folding: Collapses Namespace/Unit Delphi 2006 and up
Ctrl+Tab Switch to the next open file in the editor Delphi 2006 and up
Ctrl+Shift+Tab Switch to the previous open file in the editor Delphi 2006 and up
Ctrl + K + P Invokes print selection dialog Delphi 5 and up
Ctrl + K + W Invokes Write block to file(selected text) Delphi 5 and up
Ctrl + K + R Invokes Read block from file(inserts text at cursor) Delphi 5 and up
Ctrl + K + C Copies selected text at the end of the selection Delphi 5 and up
Ctrl + K + T Select word at cursor position Delphi 5 and up
Ctrl + O + L Selects current line Delphi 5 and up
Ctrl + Q + L Toggles between limiting the Ctrl+Alt navigation shortcuts to the current class, or limiting it to the current unit Borland Developer Studio 2006
Ctrl + Q + W Go to next item of Messages window Delphi 5 and up

 

Leave a Comment

win2008休眠,唉。。。

    昨天走的时候懒,就按了一下电源键关机。没留意当时是休眠,今天回来开机才知道。接上电源开机,win2008让我选是否恢复之前的状态。我选择恢复了。谁知道启动后黑屏!!!唉。。之前也遇过一次了。没完,后边还有戏。

    接着我再按Ctrl+Alt+Del等什么热键都没反应,只好再按电源键关机。谁知道它又进了休眠状态,因为再按开机时没有BIOS自检。这次启动来事了,屏幕变白屏了。并不是全白,而是中间白四边淡入的黑,像是显示器坏掉哪种。吓人哪!!再点电源关机再开机还是一样。惨了,这回以为 是机子出问题了。

    回想一下,刚才都是休眠关机的,如果我让它真正关机再开呢。不管了,先试一下再说。按着电源键几秒,这回真正关机了。再重开,终于看到BIOS自检的画面了,这才松了一口气。

Leave a Comment

CodeBlocks+wxWidgets

    之前也安装过CodeBlocks,只是当时没有安装wxWidgets,试着新建一个wxWidgets工程后没有看到界面设计的东东就放弃了。今天发现群里的南果梨也在用CodeBlocks,在他的帮助也终于成功的安装了wxWidgets。

  1. 到www.CodeBlocks.org下载并安装CodeBlocks,最好下载MinGW版本的,可以省掉安装和配置GCC的麻烦。
  2. 到www.wxWidgets.org下载并安装wxWidgets,如果只开发Windows程序可以只下载wxMSW版本,如果你喜欢也可以下载wxAll版本。
  3. 编译wxWidgets,如果不知道如何编译可以使用下面的wxbuild.bat进行编译,编译过程大概30分钟。
  4. 因为CodeBlocks是使用GCC编译器的,所以得先改一下编译选项以支持中文,到Settings->Compiler and debugger下的Other option标签中加入:-finput-charset=GBK,如果源文件是UTF-8或Unicode编码就改成相应的。
  5. 现在就可以新建wxWidgets工程了。

wxbuild.bat,运行脚本前先把CodeBlocks安装目录下的MinGW\bin\目录设到PATH变量里。

@echo off

cd build\msw

title 编译wxWidgets

echo 开始编译

echo ———————————————————————

echo 编译发行版本

mingw32-make -f makefile.gcc BUILD=release SHARED=1 MONOLITHIC=0 UNICODE=1

echo 编译调试版本

mingw32-make -f makefile.gcc BUILD=debug SHARED=1 MONOLITHIC=0 UNICODE=1

echo ———————————————————————

echo 编译结束

pause

Leave a Comment