Windows7中提供的搜索功能很强大,内置了Windows Search 4.0。同时提供搜索历史记录提示框,确实方便了不少。但是时间长了免不了想要清理这些搜索历史记录。

image

打开注册表(运行窗口中运行Regedit命令),定位到下列键值:

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\WordWheelQuery

选择需要清理的项目,删除即可。

还有一种方法就是彻底禁用搜索历史记录。

打开组策略窗口,定位到“用户配置 >管理模版 > Windows组件 > Windows资源管理器”目录,找到“在Windows资源管理器搜索框中关闭最近搜索条目的显示”项。启用即可。

posted @ 2009-08-12 21:22 Tony Chi 阅读(2430) 评论(0) 编辑

我的CSDN博客转移过来,发布日期:2007-09-30

到面前为止,net里的DataGridView控件不能实现你的要求,如下:

Code Snippet
  1.     private void dataGridView1_CellPainting(object sender, DataGridViewCellPaintingEventArgs e)
  2.     {
  3.         if (e.ColumnIndex == 2 && e.RowIndex != -1)  //判断所在列
  4.         {
  5.             DataGridViewCell cell = dataGridView1.Rows[e.RowIndex].Cells[e.ColumnIndex];
  6.             int a = Convert.ToInt32(cell.Value);
  7.             if (a > 10)  //判断变\u-32142 ?条件
  8.             {
  9.                 //\u-28711 ?\u-28212 ?把整\u-30644 ?的\u-32564 ?景\u-32142 ?\u-28419 ?变了。
  10.                 dataGridView1.Rows[e.RowIndex].DefaultCellStyle.BackColor = Color.BurlyWood;
  11.             }
  12.         }
  13.     \


想必上面的代码你很清楚,DataGridView控件无法实现你的需求,两个解决办法:
1.自己扩展DataGridView控件,使之实现你的要求.
2.找第三方控件.这里我用过DevExpress的GridControl控件,功能非常强大.完全可以实现这个功能,它可以直接设置每个单元格的外观.

Code Snippet
  1.     using DevExpress.XtraGrid.Views.Grid;
  2.     //注册RowStyleChange事件
  3.     private void gridView1_RowStyle(object sender, DevExpress.XtraGrid.Views.Grid.RowStyleEventArgs e)
  4.     {
  5.         GridView view = sender as GridView;
  6.         if (e.RowHandle >= 0)
  7.         {
  8.             string category = view.GetRowCellDisplayText(e.RowHandle, view.Columns["Category"]);
  9.             if (category == "Beverages")
  10.             {
  11.                 e.Appearance.BackColor = Color.Salmon;
  12.                 e.Appearance.BackColor2 = Color.SeaShell;
  13.             }
  14.         }
  15.     \
posted @ 2009-08-09 10:12 Tony Chi 阅读(893) 评论(0) 编辑

机子上存储了很多电子书,经常会遇到的CHM文件无法打开的情况。

比如:

一、正确操作方法
二、出现空白页面或该页无法显示的错误
三、不能打开文件mk:@*.chm
四、XP系统无法打开chm文件的解决方法
五、在英文操作系统下无法打开
六、chm文件不能运行
七、Hhctrl.ocx文件版本不对

今天在网上找了找,发现有一篇blog写的不错,特地转来。哈哈!里面详细的罗列了上面的集中问题的解决办法。

原文地址:http://www.yaosansi.com/post/cannot_open_chm_file.html

出处:http://www.yaosansi.com

如果有些朋友不太喜欢CHM文件的话,可以尝试使用这么一个工具ABC Amber CHM Converter。它可以将CHM文件转换为PDF、DOC、PDB、RTF等29种格式。而且内置了50中语言的支持。

有兴趣的可以到这里下载个30天试用版本。

posted @ 2009-08-02 22:03 Tony Chi 阅读(1140) 评论(0) 编辑

上一篇博客中解决了Windows 7 RC下Chrome崩溃的问题。文中提到使用Chrome的命令行参数,在网上找了找Chrome的其他一些参数。直接转过来大家看吧。

还有一个比较有意思的参数是可以自定义用户数据路径。

Specifies the user data directory, which is where the browser will look
for all of its state.
--user-data-dir


默认的用户数据存储在C盘的用户数据目录下。

Windows 7的路径:

C:\Users\用户名\AppData\Local\Google\Chrome\User Data

Windows XP的路径:

C:\Documents and Settings\用户名\Local Settings\Application Data\Google\Chrome\User Data

用户数据里包含了所有的浏览器设置和用户收藏夹等等内容。通过这个参数可以实现多用户,多配置。不错!

还有很多参数,大家逐步摸索吧。

 

原文地址:http://www.ericdlarson.com/misc/chrome_command_line_flags.html

原文内容:
From the source file chrome_switches.cc

I wasn't able to find a list of all the current command line flags for chrome.exe, so here they are:

Suppresses hang monitor dialogs in renderer processes.
--disable-hang-monitor
Completely disables UMA metrics system.
--disable-metrics
Disables only the sending of metrics reports. In contrast to
kDisableMetrics, this executes all the code that a normal client would use
for reporting, except the report is dropped rather than sent to the server.
This is useful for finding issues in the metrics code during UI and
performance tests.
--disable-metrics-reporting
Causes the browser process to throw an assertion on startup.
--assert-test
Causes the renderer process to throw an assertion on launch.
--renderer-assert-test
Causes the browser process to crash on startup.
--crash-test
Causes the renderer process to crash on launch.
--renderer-crash-test
Causes the renderer process to display a dialog on launch.
--renderer-startup-dialog
Causes the plugin process to display a dialog on launch.
--plugin-startup-dialog
Causes the test shell process to display a dialog on launch.
--testshell-startup-dialog
Specifies a command that should be used to launch the plugin process. Useful
for running the plugin process through purify or quantify. Ex:
--plugin-launcher="path\to\purify /Run=yes"
--plugin-launcher
The value of this switch tells the child process which
IPC channel the browser expects to use to communicate with it.
--channel
The value of this switch tells the app to listen for and broadcast
testing-related messages on IPC channel with the given ID.
--testing-channel
The value of this switch specifies which page will be displayed
in newly-opened tabs. We need this for testing purposes so
that the UI tests don't depend on what comes up for http://google.com.
--homepage
When this switch is present, the browser will throw up a dialog box
asking the user to start a renderer process independently rather
than launching the renderer itself. (This is useful for debugging.)
--start-renderers-manually
Causes the process to run as renderer instead of as browser.
--renderer
Path to the exe to run for the renderer subprocess
--renderer-path
Causes the process to run as plugin host
--plugin
Runs the renderer and plugins in the same process as the browser
--single-process
Runs each set of script-connected tabs (i.e., a BrowsingInstance) in its own
renderer process. We default to using a renderer process for each
site instance (i.e., group of pages from the same registered domain with
script connections to each other).
--process-per-tab
Runs a single process for each site (i.e., group of pages from the same
registered domain) the user visits. We default to using a renderer process
for each site instance (i.e., group of pages from the same registered
domain with script connections to each other).
--process-per-site
Runs plugins inside the renderer process
--in-process-plugins
Runs the renderer outside the sandbox.
--no-sandbox
Runs the plugin processes inside the sandbox.
--safe-plugins
Excludes these plugins from the plugin sandbox.
This is a comma separated list of plugin dlls name and activex clsid.
--trusted-plugins
Runs the security test for the sandbox.
--test-sandbox
Specifies the user data directory, which is where the browser will look
for all of its state.
--user-data-dir
Specifies that the associated value should be launched in "application" mode.
--app
Specifies the file that should be uploaded to the provided application. This
switch is expected to be used with --app option.
--upload-file
Specifies if the dom_automation_controller_ needs to be bound in the
renderer. This binding happens on per-frame basis and hence can potentially
be a performance bottleneck. One should only enable it when automating
dom based tests.
--dom-automation
Tells the plugin process the path of the plugin to load
--plugin-path
Specifies the flags passed to JS engine
--js-flags
The GeoID we should use. This is normally obtained from the operating system
during first run and cached in the preferences afterwards. This is a numeric
value; see http://msdn.microsoft.com/en-us/library/ms776390.aspx .
--geoid
The language file that we want to try to open. Of the form
language[-country] where language is the 2 letter code from ISO-639.
--lang
Will add kDebugOnStart to every child processes. If a value is passed, it
will be used as a filter to determine if the child process should have the
kDebugOnStart flag passed on or not.
--debug-children
Will add kWaitForDebugger to every child processes. If a value is passed, it
will be used as a filter to determine if the child process should have the
kWaitForDebugger flag passed on or not.
--wait-for-debugger-children
Will filter log messages to show only the messages that are prefixed
with the specified value
--log-filter-prefix
Force logging to be enabled. Logging is disabled by default in release
builds.
--enable-logging
Force logging to be disabled. Logging is enabled by default in debug
builds.
--disable-logging
Sets the minimum log level. Valid values are from 0 to 3:
INFO = 0, WARNING = 1, LOG_ERROR = 2, LOG_FATAL = 3.
--log-level
Dump any accumualted histograms to the log when browser terminates (requires
logging to be enabled to really do anything). Used by developers and test
scripts.
--dump-histograms-on-exit
enable remote debug / automation shell on the specified port
--remote-shell-port
Runs un-installation steps that were done by chrome first-run.
--uninstall
Number of entries to show in the omnibox popup.
--omnibox-popup-count
The value of this switch tells the app to listen for and broadcast
automation-related messages on IPC channel with the given ID.
--automation-channel
Indicates the last session should be restored on startup. This overrides
the preferences value and is primarily intended for testing.
--restore-last-session
Chrome supports a playback and record mode. Record mode saves *everything*
to the cache. Playback mode reads data exclusively from the cache. This
allows us to record a session into the cache and then replay it at will.
--record-mode
--playback-mode
Don't record/playback events when using record & playback.
--no-events
Make Windows happy by allowing it to show "Enable access to this program"
checkbox in Add/Remove Programs->Set Program Access and Defaults. This
only shows an error box because the only way to hide Chrome is by
uninstalling it.
--hide-icons
--show-icons
Make Chrome default browser
--make-default-browser
Use a specified proxy server, overrides system settings. This switch only
affects HTTP and HTTPS requests.
--proxy-server
Chrome will support prefetching of DNS information. Until this becomes
the default, we'll provide a command line switch.
--dns-log-details
--dns-prefetch-disable
Enables support to debug printing subsystem.
--debug-print
Allow initialization of all activex controls. This is only to help website
developers test their controls to see if they are compatible in Chrome.
Note there's a duplicate value in activex_shared.cc (to avoid
dependency on chrome module). Please change both locations at the same time.
--allow-all-activex
Browser flag to disable the web inspector for all renderers.
--disable-dev-tools
Enable web inspector for all windows, even if they're part of the browser.
Allows us to use our dev tools to debug browser windows itself.
--always-enable-dev-tools
Used to set the value of SessionRestore::num_tabs_to_load_. See
session_restore.h for details.
const wchar_t kTabCountToLoadOnSessionRestore[] =
--tab-count-to-load-on-session-restore
Enable dynamic loading of the Memory Profiler DLL, which will trace
all memory allocations during the run.
--memory-profile
Configure Chrome's memory model.
Does chrome really need multiple memory models? No. But we get a lot
of concerns from individuals about how the changes work on *their*
system, and we need to be able to experiment with a few choices.
--memory-model
By default, cookies are not allowed on file://. They are needed in for
testing, for example page cycler and layout tests. See bug 1157243.
--enable-file-cookies
Start the browser maximized, regardless of any previous settings.
TODO(pjohnson): Remove this once bug 1137420 is fixed. We are using this
as a workaround for not being able to use moveTo and resizeTo on a
top-level window.
--start-maximized
Spawn threads to watch for excessive delays in specified message loops.
User should set breakpoints on Alarm() to examine problematic thread.
Usage: -enable-watchdog=[ui][io]
Order of the listed sub-arguments does not matter.
--enable-watchdog
Display the First Run experience when the browser is started, regardless of
whether or not it's actually the first run.
--first-run
Enable histograming of tasks served by MessageLoop. See about:histograms/Loop
for results, which show frequency of messages on each thread, including APC
count, object signalling count, etc.
--message-loop-histogrammer
Perform importing from another browser. The value associated with this
setting encodes the target browser and what items to import.
--import
Change the DCHECKS to dump memory and continue instead of crashing.
This is valid only in Release mode when --enable-dcheck is specified.
--silent-dump-on-dcheck
Normally when the user attempts to navigate to a page that was the result of
a post we prompt to make sure they want to. This switch may be used to
disable that check. This switch is used during automated testing.
--disable-prompt-on-repost
Disable pop-up blocking.
--disable-popup-blocking
Don't execute JavaScript (browser JS like the new tab page still runs).
--disable-javascript
Prevent Java from running.
--disable-java
Prevent plugins from running.
--disable-plugins
Prevent images from loading.
--disable-images
Use the low fragmentation heap for the CRT.
--use-lf-heap
Debug only switch to specify which gears plugin dll to load.
--gears-plugin-path
Switch to load Gears in the renderer process.
--gears-in-renderer
Enable new HTTP stack.
--new-http
Allow loading of the javascript debugger UI from the filesystem.
--javascript-debugger-path
--enable-p13n

posted @ 2009-07-18 15:13 Tony Chi 阅读(638) 评论(0) 编辑

装上Windows 7 RC之后还没来的急装Chrome,今天尝试了一下。安装很顺利但是没想到运行一会之后(大概15分钟)突然弹出了一个提示说浏览器崩溃是否提交问题并重启。点确定重启之后有死掉了。重复几次之后发现浏览器怎么也打不开了。

Google一把,终于被我找到了。貌似是因为插件的问题造成的。打开浏览器的快捷方式的属性窗口,在原有的目标项后增加一个参数:

--in-process-plugins

参数的意义是:Runs plugins inside the renderer process

注意增加空格,增加之后的地址如下:
C:\Users\TonyChi\AppData\Local\Google\Chrome\Application\chrome.exe --in-process-plugins

保存之后。重新打开浏览器,没有崩溃的提示了。使用了2小时崩溃提示也没再出现。
哈哈,问题解决!

posted @ 2009-07-18 15:10 Tony Chi 阅读(1607) 评论(0) 编辑

由于Windows 7自带了.NET Framework 3.5 SP1, 所以在安装VS 2008 SP1的时候会发生fatal error during installation的错误, 网上找来解决办法是需要将SP1中一个配置文件关于 3.5 的部分删除掉。

于是将SP1的ISO文件解压缩出来, 找到ParameterInfo.xml文件, 定位到

<Exe Name="dotnetfx35.exe" URL="http://go.microsoft.com/fwlink/?LinkId=119353&amp;clcid=0x409" DownloadSize="242743296" SystemDriveSize="859390404" InstalledProductSize="0" InstallCommandLine="/q /norestart /lang:ENU" UninstallCommandLine="/q /uninstall" CanonicalTargetName="#(loc.dotnetfx35sp1)" ExeType="Cartman" LogFileHint="%temp%\dd_dotnet*.txt|%temp%\dd_net_framework*.txt|%temp%\dd_depcheck*.txt|%temp%\..\dd_dotnet*.txt|%temp%\..\dd_net_framework*.txt|%temp%\..\dd_depcheck*.txt" HashValue="0582515BDE321E072F8673E829E175ED2E7A53E803127C50253AF76528E66BC1">
      <ApplicableIf>
        <GreaterThan LeftHandSide="3.5.30729.01" BoolWhenNonExistent="true">
          <RegKeyValue Location="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\NET Framework Setup\NDP\v3.5\Version" />
        </GreaterThan>
      </ApplicableIf>
    </Exe>

删除该节点。 如果是中文的visual studio, 还有语言包。保存文件,最后再次运行SPInstall.exe。测试通过!

哈哈!

posted @ 2009-07-01 23:42 Tony Chi 阅读(2252) 评论(0) 编辑
摘要: 今天访问本地的Xampp管理页面,提示失败下面的错误信息:Warning: file_get_contents(lang.tmp) [function.file-get-contents]: failed to open stream: No such file or directory in D:\Program Files\xampp\htdocs\xampp\index.php on lin...阅读全文
posted @ 2009-06-30 17:07 Tony Chi 阅读(499) 评论(0) 编辑
摘要: Windows 7 首次安装Fetion 2008 之后可以正常运行,奇怪的是重新之后就无法运行了。总是提示下面这么一个提示:无法定位程序输入点 DwmHintDxUpdate 于动态链接库 USER32.dll 。找了好久发现是因为Fetion目录下的动态库dwmapi.dll不是最新的。解决办法就是到%System32%目录下找到dwmapi.dll覆盖Fetion目录下的文件就可以了。阅读全文
posted @ 2009-06-12 09:23 Tony Chi 阅读(105) 评论(0) 编辑
摘要: 使用VS2008开发Web Application项目时,调试总是提示无法连接错误,但是将地址中的localhost改为127.0.0.1就可以访问。想到host文件是不是有问题,打开host文件发现127.0.0.1 localhost 这一项是被注释掉的。安装好系统之后没有动过该文件呀,难道默认?随即我在host文件中取消掉注释。然后再次测试通过。哈哈!阅读全文
posted @ 2009-06-11 11:46 Tony Chi 阅读(442) 评论(0) 编辑
摘要: 前段时间Windows7 RC发布,想尝尝鲜。安装常用软件基本上没有遇到什么问题(兼容性提高不少哈!)。但是在安装VS2008 RTM版时总是遇到下面的一段提示。应用程序无法正常启动(0xc0000006)。请单击“确定”关闭应用程序。找了好久都没有发现问题。这里需要说明的是。我是使用虚拟光驱直接挂在ISO文件进行安装的。最后把这个ISO文件提出出来。尝试了一下一切正常。郁...阅读全文
posted @ 2009-05-26 17:09 Tony Chi 阅读(570) 评论(1) 编辑