顯示具有 C# 標籤的文章。 顯示所有文章
顯示具有 C# 標籤的文章。 顯示所有文章

2009年7月6日 星期一

Package 'Microsoft.VisualStudio.Xaml' has failed to load properly

Package 'Microsoft.VisualStudio.Xaml' has failed to load properly

Micorosft Visual Studio 2008
-> Visual Studio Tools
-> Visual Studio 2008 Command Prompt
devenv /resetskippkgs


resetskippkgs(reset skip packages)的作用:是告訴Visual Studio先清除所有載入失败的VSPackage,重新載入所有VSPackage後再啟動Visual Studio

2009年7月3日 星期五

Windows 7 Multi-touch Using WPF

Windows 7 Multi-touch Using WPF

[DllImport("user32.dll")]
public static extern bool SetProp(IntPtr hWnd, string lpString, IntPtr hData);

SetProp(HWND, "MicrosoftTabletPenServiceProperty", new IntPtr(0x01000000));


WPF Windows 7 Multi-touch
WPF team is working on adding MultiTouch related support for Win7 in WPF.

Disabling Press and Hold in Applications Written for Tablet PC

2009年6月25日 星期四

WPF NotifyIcon

WPF NotifyIcon
from Code Project, I encountered some exceptions when opening it on some Vista and Window 7 computers.

Taskbar Compass: how to use NotifyIcon in WPF
Using System.Windows.Forms.NotifyIcon control


Plus: WPF - Hide the Cursor
Mouse.OverrideCursor = Cursors.None;

2009年6月7日 星期日

C# SendKey

MSDN SendKeys 類別
klcintw [C#]程式幫您按按鈕(SendKey & SendMessage)

MSDN SendInput
The SendInput function inserts the events in the INPUT structures serially into the keyboard or mouse input stream. These events are not interspersed with other keyboard or mouse input events inserted either by the user (with the keyboard or mouse) or by calls to keybd_event, mouse_event, or other calls to SendInput.

2009年1月29日 星期四

C# string.Format

C# string.Format, reference from zbwmx的專欄

Symbol

example

output

C string.Format("{0:C3}", 2) $2.000
D string.Format("{0:D3}", 2) 002
E 1.20E+001 1.20E+001
G string.Format("{0:G}", 2) 2
N string.Format("{0:N}", 250000) 250,000.00
X string.Format("{0:X000}", 12) C

string.Format("{0:000.000}", 12.2) 012.200


DateTime.ToString() Patterns
MM/dd/yyyy 08/22/2006
dddd, dd MMMM yyyy Tuesday, 22 August 2006
dddd, dd MMMM yyyy HH:mm Tuesday, 22 August 2006 06:30
dddd, dd MMMM yyyy hh:mm tt Tuesday, 22 August 2006 06:30 AM
dddd, dd MMMM yyyy H:mm Tuesday, 22 August 2006 6:30
dddd, dd MMMM yyyy h:mm tt Tuesday, 22 August 2006 6:30 AM
dddd, dd MMMM yyyy HH:mm:ss Tuesday, 22 August 2006 06:30:07
MM/dd/yyyy HH:mm 08/22/2006 06:30
MM/dd/yyyy hh:mm tt 08/22/2006 06:30 AM
MM/dd/yyyy H:mm 08/22/2006 6:30
MM/dd/yyyy h:mm tt 08/22/2006 6:30 AM
MM/dd/yyyy h:mm tt 08/22/2006 6:30 AM
MM/dd/yyyy h:mm tt 08/22/2006 6:30 AM
MM/dd/yyyy HH:mm:ss 08/22/2006 06:30:07
MMMM dd August 22
MMMM dd August 22
yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK 2006-08-22T06:30:07.7199222-04:00
yyyy'-'MM'-'dd'T'HH':'mm':'ss.fffffffK 2006-08-22T06:30:07.7199222-04:00
ddd, dd MMM yyyy HH':'mm':'ss 'GMT' Tue, 22 Aug 2006 06:30:07 GMT
ddd, dd MMM yyyy HH':'mm':'ss 'GMT' Tue, 22 Aug 2006 06:30:07 GMT
yyyy'-'MM'-'dd'T'HH':'mm':'ss 2006-08-22T06:30:07
HH:mm 06:30
hh:mm tt 06:30 AM
H:mm 6:30
h:mm tt 6:30 AM
HH:mm:ss 06:30:07
yyyy'-'MM'-'dd HH':'mm':'ss'Z' 2006-08-22 06:30:07Z
dddd, dd MMMM yyyy HH:mm:ss Tuesday, 22 August 2006 06:30:07
yyyy MMMM 2006 August
yyyy MMMM 2006 August


Powered By Blogger