SBGメモ (1)

★ APIコール可能…なのか?

MSDN Forums » Gadgets » Sidebar Gadget Development の
Keyboard State Gadget (IanPaskin – 04 Dec 2006, 1:03 PM UTC) に対する、

(Scott Allen(MVP)  – 04 Dec 2006, 7:40 PM UTC)の書込:

I don’t believe you’ll be able to get the keyboard state just using JavaScript. The only approach I can think of offhand is to write a COM wrapper that calls GetKeyState in user32.dll. You can use that COM object from your gadget script, then.

(Jonathan Abbott – 06 Dec 2006, 9:26 AM UTC)の書込:

As Scott states, you’ll need a COM. Here’s the code you’ll need (VB). I haven’t tried it, but I believe it returns 1 for NumLock/CapsLock/ShiftLock if they’re on.

Private Declare Function GetKeyState Lib "user32" _
    (ByVal key As Long) As Integer
Public Function KeyState(keyCode As Long) As Integer
     KeyState = GetKeyState(keyCode)
End Function

★ XAMLとの連携可能 → WPF/E使用

“WPF/E” (codename) Community Technology Preview for Windows (Dec 2006)

Microsoft Expression Web Free Trial (Web用XAMLが書けるんではなかったっけ。)

Microsoft Expression Design December 2006 CTP (グラフィックパーツはこっちの担当ではなかったっけ。)

MSDN "WPF/E" (codename) Dev Center
「WPF/E" (codename) CTP (December 2006) SDK Samples」でWPF/Eを使ったプログラムサンプルへのリンクがいくつかある。WPF/E CTP(Dec2006)をインストールすると動作確認可能。

★ SideBarGadgets サンプル

Building a Windows Vista Email Gadget using the .NET Framework(Coding4Fun)
メールのアラートを表示。.NET Frameworkとの連携サンプルでもある。VB/C#対応のソースダウンロード可能。

とりあえずここまで。

コメントを投稿