随笔分类 - Tips
摘要:Several Tips:0. Dispose() requires explicitly called, no matter manually calling it OR putting it into finalizer. 1. 不要override Finalize(),而是提供析构函数。编译器会在IL里把他 编译成Finalize().2. View C# IL code:IL DASM.3. In callstack window, RMB click, go to disassembly. 4. In case you want to force a managed class t
阅读全文
摘要:.net Reflector is convenient to view a assembly's resource especially string table.
阅读全文
摘要:一般情况下,需要透明背景图片时,会首先想到icon文件。但是,有些场合下,必须用其他格式比如bmp。透明背景的bmp叫做loose image,做法很简单:1. 如果是从icon文件转换为bmp,可以用photoshop + icon plugin的组合。注:ps不能直接打开icon文件。2. 打开icon文件或新建一文件,只包含你想要透明显示的东西。3. 创建一新层,作为背景层,用油漆桶把(192,192,192)的rgb设在那一层上。4. 保存为bmp。搞定。
阅读全文
摘要:Use taskkill.exe from cmd like this:taskkill /f /IM "Inventor.exe"
阅读全文
摘要:In a managed C++ project, we can use the “using namespace” expression to include managed types. Just like using “#include” incorrectly will cause some compile error, declaring ...
阅读全文
摘要:C# contains a struct called Intptr, which aims to be the same position as void* in unmanaged world. So it will be 32bit on x32 hardware and OS and be 64bit on x63 platform. So be careful about misusin...
阅读全文
摘要:MSDN Returns a string array containing the command-line arguments for the current process.Input at the command lineResulting command line argumentsMyApp alpha betaMyApp, alpha, betaMyApp "alpha with s...
阅读全文
摘要:转载自:C++数据类型转换技巧类型转换是将一种类型的值映射为另一种类型的值。进行数据类型的转换。 是在实际代码编写中经常遇到的问题,特别是字符串和其他类型的转换。 1.将字符串转换为整数 (1).转换函数 // 双精度函数 double atof( const char *string ); double _wtof( const wchar_t *string ); 自适应 TC...
阅读全文
摘要:I recently met a issue that: when starting our app by command line way (passing several arguments to the app), on Win7, the specified file can always be opened after lanuching our app, while on XP, th...
阅读全文
摘要:们从网上下载了Chm文档,下载后却发现只能看见目录,而不能查看其中的网页。 其实只要Chm文档可以被打开,就基本排除了文档被破坏的可能。 这时,右键点击Chm文档,进入【属性】(property),如果发现有一个【解除锁定】(unblock)的按钮,点击即可。
阅读全文
摘要:(MSDN)You can use PtrToStringChars in Vcclr.h to convert String to native wchar_t * or char *. This always returns a wide Unicode string pointer because CLR strings are internally Unicode. You can th...
阅读全文
摘要:1. VS project setting regards with platformFor native c++ project, there are debug | win32, debug | x64, release | win32, release | x64 configurations. Note:"debug" / "release" can be renamed while "w...
阅读全文
摘要:You can get Debugger Roadmap from MSDN to know everything about VS debugger.Exception Handling:There is a Exceptions dialog box in VS to configure how the debugger behaves with exceptions. In general,...
阅读全文
摘要:As known, the Find combox on the toolbar in VS, can serve as a mini command window to support typing commands in. A key tip in using it is:Type below:> of thefileNameYouWantToOpenall files that is ...
阅读全文
摘要:Attention to its rich propertes to read back a XmlNode's content:XmlNode.InnerText: escape all markup and just return the text. XmlNode.InnerXMLXmlNode.OuterXML MSDN example this:
阅读全文
摘要:This is the case: let's say there are two branches: BranchA and Main. On BranchA, there happens two kinds of code changes: one is needed for Main in this time integration and the other is not needed. ...
阅读全文
摘要:Just find and use it today!It's easy and works well.For example:1. Start debugging your first app in VS..2. When it calls up the second app to run, switch to the VS with its solution opened and select...
阅读全文
摘要:Quick toggle between .h and .cpp files When programming C++ it is a very common need to switch between the .h and .cpp file. There are no built in way to do this in Visual Studio, however i...
阅读全文
摘要:以下的,都在线了:UML diagram IDE (http://www.coderun.com/ide/)Code Run (http://codepad.org/, where you can just paste your code in and run it to get result for list of languages)
阅读全文
摘要:1. How to programatically create a bitmap by filling in existing images.Steps: a. Create an empty bitmap with you wanted size and get graphics from it. b. Create TextureBrushes with intended to fill i...
阅读全文

浙公网安备 33010602011771号