Archive for May, 2011

WPF: Enter/Esc key as shortcuts of OK/Cancel buttons

May 29, 2011

DialogBox is the easiest example that comes, but 99% of windows should have shortcuts for “OK” and “CANCEL” button.
The keys supposed to be the shortcut keys are always the same: ENTER and ESC key.
In XAML, you can set up this shortcut in button properties, via IsDefault and IsCancel properties.

Here is an example:


<Button Name="btnOK" IsDefault="True">OK</Button>
<Button Name="btnCancel" IsCancel="True">CANCEL</Button>

source: Dialog Boxes Overview

Advertisements

Dell Studio ‘break’ key

May 27, 2011

Following an old post on Dell Studio laptops …
It seems that ‘break’ key has a replacement, and it’s always been there: Fn+F12.
So, for those of you that need Ctrl+Break, try instead Ctrl+Fn+F12 😉

EnricoG tryed with his Dell Studio XPS (Visual Studio), and it worked!
Thank you!

I tryed on my Dell Studio 1557, but it didn’t  😦

source #1: Dell Studio 1555: missing PAUSE/BREAK key
source #2: Missing “Pause / Break” Key On Dell Studio Laptops
source #3: Problems with Dell Latitude E6400

Technorati tags: Dell

Word poisoning #1: VBA samples

May 21, 2011

Is this office automation ? I mean the poisoning series 😀

MS Word can be automated, the way Excel does: VBA. 😉

Here is a collection of samples, it might be usefull if you are newbie to this tasks .
Word-VBA Code Samples for Newbies & Others by JoJo Zawawi.

Technorati Tags: .

Visual Studio: lots of MB missing in hard disk

May 15, 2011

Well, virtual machine let you know some settings wrong set.

Every day, main hard disk in dev virtual machine was filled of “some” MB…by the end of the week it was full-full-full.
How could this happen? … Intellitrace was the answer.
In ‘C:\Documents and Settings\All Users\Application Data\Microsoft Visual Studio\10.0\TraceDebugging’ were located some .itrace files … I was very lucky, they all were less than 30MB.

source #1: IntelliTrace: Fast Track to Debug Microsoft .NET Applications in Visual Studio 2010
source #2: Clean up Microsoft Visual Studio IntelliTrace iTrace Files and get much more free space on your HDD
source #3: Visual Studio 2010 is eating your Hard Disk space with IntelliTrace

Technorati Tags: , .

Excel Interop: BorderAround does not color

May 14, 2011

Range’s member BorderAround simply crash, when param color is not Type.Missing … means: when you want to set a border color. 😦

A quick tournaround is:


range.Borders.LineStyle = Excel.XlLineStyle.xlContinuous;
range.Borders.Color = System.Drawing.ColorTranslator.ToOle(Color.Red);

source: Excel Range.BorderAround(), Border is always black by Stackoverflow

Technorati Tags: , .
  • May 2011
    M T W T F S S
    « Apr   Jun »
     1
    2345678
    9101112131415
    16171819202122
    23242526272829
    3031  
  • .

    .Net Agile Antivirus Book C# Programming EntityFramework GTD Hyper-V LinQ MVVM Office Resharper SCRUM Security Sharepoint Silverlight SQLServer TFS ToDoList Unit Test VirtualBox Virtual PC Visual Studio VMware Windows7 WPF XeDotNet XML XPath