<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>www.be-styles.jp &#187; Tips</title>
	<atom:link href="http://www.be-styles.jp/archives/tag/tips/feed" rel="self" type="application/rss+xml" />
	<link>http://www.be-styles.jp</link>
	<description>そうだ、ダルダルしよう。</description>
	<lastBuildDate>Mon, 29 Nov 2010 08:48:09 +0000</lastBuildDate>
	<language>ja</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>[WPF] がんばってバージョン情報ダイアログ作ってみた</title>
		<link>http://www.be-styles.jp/archives/3800</link>
		<comments>http://www.be-styles.jp/archives/3800#comments</comments>
		<pubDate>Mon, 21 Sep 2009 16:52:35 +0000</pubDate>
		<dc:creator>daruyanagi</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://www.be-styles.jp/archives/3800</guid>
		<description><![CDATA[ちょっと頼まれてソフトをしこしこ作っていたのだけど、コアな機能よりUIに手間がかかってしまいます。WPF って慣れないので、ひとつひとつの作業にいちいちヘルプをにらめっこする必要があるんですよねぇ… 今日はバージョン情報ダイアログを作るのに四苦八苦。必要な機能は、 アセンブリからアプリ名やバージンを勝手に取ってくること アプリケーションアイコンを抽出して表示すること Read More... or Visit Original post.]]></description>
			<content:encoded><![CDATA[				
				<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin: 0.5em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.be-styles.jp%252Farchives%252F3800%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22%5BWPF%5D%20%E3%81%8C%E3%82%93%E3%81%B0%E3%81%A3%E3%81%A6%E3%83%90%E3%83%BC%E3%82%B8%E3%83%A7%E3%83%B3%E6%83%85%E5%A0%B1%E3%83%80%E3%82%A4%E3%82%A2%E3%83%AD%E3%82%B0%E4%BD%9C%E3%81%A3%E3%81%A6%E3%81%BF%E3%81%9F%22%20%7D);"></div>
				<p><a href="http://www.be-styles.jp/wp-content/image889.png" rel="lightbox"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.be-styles.jp/wp-content/image_thumb221.png" width="500" height="390" /></a> </p>
				<p>ちょっと頼まれてソフトをしこしこ作っていたのだけど、コアな機能よりUIに手間がかかってしまいます。WPF って慣れないので、ひとつひとつの作業にいちいちヘルプをにらめっこする必要があるんですよねぇ…</p>
				<p>今日はバージョン情報ダイアログを作るのに四苦八苦。必要な機能は、</p>
				<ol>
				<li>アセンブリからアプリ名やバージンを勝手に取ってくること</li>
				<li>アプリケーションアイコンを抽出して表示すること</li>
				</ol>
				<p class="continue"><a href="http://www.be-styles.jp/archives/3800#extended" title="Read the full text of [WPF] がんばってバージョン情報ダイアログ作ってみた" rel="nofollow">(続きを読む&#8230;)</a></p>
<p><a href="http://www.be-styles.jp/archives/3800">Read More... or Visit Original post.</p>


]]></content:encoded>
			<wfw:commentRss>http://www.be-styles.jp/archives/3800/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Make Link と、ほかのサイトからの引用に便利な設定。</title>
		<link>http://www.be-styles.jp/archives/3196</link>
		<comments>http://www.be-styles.jp/archives/3196#comments</comments>
		<pubDate>Wed, 22 Jul 2009 18:25:27 +0000</pubDate>
		<dc:creator>daruyanagi</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.be-styles.jp/archives/3196</guid>
		<description><![CDATA[Make Link :: Firefox Add-ons ブログでほかのサイトを引用するのに便利な「Make Link」。でも、デフォルトでは引用向けの設定があまり登録されていないのかな？数種類登録しておくと便利なんだけど。 ということで、自分用に設定をメモ。 Read More... or Visit Original post.]]></description>
			<content:encoded><![CDATA[				
				<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin: 0.5em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.be-styles.jp%252Farchives%252F3196%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22Make%20Link%20%E3%81%A8%E3%80%81%E3%81%BB%E3%81%8B%E3%81%AE%E3%82%B5%E3%82%A4%E3%83%88%E3%81%8B%E3%82%89%E3%81%AE%E5%BC%95%E7%94%A8%E3%81%AB%E4%BE%BF%E5%88%A9%E3%81%AA%E8%A8%AD%E5%AE%9A%E3%80%82%22%20%7D);"></div>
				<p><a href="http://www.be-styles.jp/wp-content/image692.png" rel="lightbox"><img style="border-right-width: 0px; display: inline; border-top-width: 0px; border-bottom-width: 0px; border-left-width: 0px" title="image" border="0" alt="image" src="http://www.be-styles.jp/wp-content/image_thumb32.png" width="500" height="345" /></a> </p>
				<p><cite><a href="https://addons.mozilla.org/ja/firefox/addon/142">Make Link :: Firefox Add-ons</a></cite></p>
				<p>ブログでほかのサイトを引用するのに便利な「Make Link」。でも、デフォルトでは引用向けの設定があまり登録されていないのかな？数種類登録しておくと便利なんだけど。</p>
				<p>ということで、自分用に設定をメモ。</p>
				<p class="continue"><a href="http://www.be-styles.jp/archives/3196#extended" title="Read the full text of Make Link と、ほかのサイトからの引用に便利な設定。" rel="nofollow">(続きを読む&#8230;)</a></p>
<p><a href="http://www.be-styles.jp/archives/3196">Read More... or Visit Original post.</p>


]]></content:encoded>
			<wfw:commentRss>http://www.be-styles.jp/archives/3196/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[C#] ダブルクリックでフォームを閉じる＆ドラッグでフォームを移動する</title>
		<link>http://www.be-styles.jp/archives/3170</link>
		<comments>http://www.be-styles.jp/archives/3170#comments</comments>
		<pubDate>Thu, 16 Jul 2009 17:23:29 +0000</pubDate>
		<dc:creator>daruyanagi</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.be-styles.jp/archives/3170</guid>
		<description><![CDATA[懐かしいことを聞かれたので。調べたら、VBのコードが多いのね。 Read More... or Visit Original post.]]></description>
			<content:encoded><![CDATA[				
				<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin: 0.5em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.be-styles.jp%252Farchives%252F3170%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22%5BC%23%5D%20%E3%83%80%E3%83%96%E3%83%AB%E3%82%AF%E3%83%AA%E3%83%83%E3%82%AF%E3%81%A7%E3%83%95%E3%82%A9%E3%83%BC%E3%83%A0%E3%82%92%E9%96%89%E3%81%98%E3%82%8B%EF%BC%86%E3%83%89%E3%83%A9%E3%83%83%E3%82%B0%E3%81%A7%E3%83%95%E3%82%A9%E3%83%BC%E3%83%A0%E3%82%92%E7%A7%BB%E5%8B%95%E3%81%99%E3%82%8B%22%20%7D);"></div>
				<p>懐かしいことを聞かれたので。調べたら、VBのコードが多いのね。</p>
				<p class="continue"><a href="http://www.be-styles.jp/archives/3170#extended" title="Read the full text of [C#] ダブルクリックでフォームを閉じる＆ドラッグでフォームを移動する" rel="nofollow">(続きを読む&#8230;)</a></p>
<p><a href="http://www.be-styles.jp/archives/3170">Read More... or Visit Original post.</p>


]]></content:encoded>
			<wfw:commentRss>http://www.be-styles.jp/archives/3170/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress で特定カテゴリのフィードを除外して取得する</title>
		<link>http://www.be-styles.jp/archives/3104</link>
		<comments>http://www.be-styles.jp/archives/3104#comments</comments>
		<pubDate>Mon, 06 Jul 2009 14:04:41 +0000</pubDate>
		<dc:creator>daruyanagi</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[WordPress]]></category>

		<guid isPermaLink="false">http://www.be-styles.jp/archives/3104</guid>
		<description><![CDATA[WordPress では特定のカテゴリーを排除してフィードを表示することができる。ただし、それにはカテゴリのIDが必要。 たとえば、ウザい僕の日記を読みたくない場合、日記のCategory IDは「5」なので、http://www.be-styles.jp/feed?cat=-5 と打てば日記以外を表示できる（「-」をとれば、日記カテゴリのフィードにリダイレクトされる）。 さらに、バイクの話題も興味がない場合、バイクの Category ID は「11」なので、http://www.be-styles.jp/feed?cat=-11 と打てばバイクの話題以外のフィードを取得できる。 さらにさらに、日記もバイクもウザい人のためには、http://www.be-styles.jp/feed?cat=-5&#38;cat=-11 が使える……と思ったが、ウチのサイトでは使えないようだ。 via Exclude Categories From WordPress Feeds &#8212; WordPress の RSS Feed に関する Tips &#8211; www.be-styles.jp Read More... or Visit Original post.]]></description>
			<content:encoded><![CDATA[				
				<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin: 0.5em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.be-styles.jp%252Farchives%252F3104%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22WordPress%20%E3%81%A7%E7%89%B9%E5%AE%9A%E3%82%AB%E3%83%86%E3%82%B4%E3%83%AA%E3%81%AE%E3%83%95%E3%82%A3%E3%83%BC%E3%83%89%E3%82%92%E9%99%A4%E5%A4%96%E3%81%97%E3%81%A6%E5%8F%96%E5%BE%97%E3%81%99%E3%82%8B%22%20%7D);"></div>
				<p>WordPress では特定のカテゴリーを排除してフィードを表示することができる。ただし、それにはカテゴリのIDが必要。</p>
				<p>たとえば、ウザい僕の日記を読みたくない場合、日記のCategory IDは「5」なので、<a title="http://www.be-styles.jp/feed?cat=-5" href="http://www.be-styles.jp/feed?cat=-5"><em>http://www.be-styles.jp/feed?cat=-5</em></a> と打てば日記以外を表示できる（「-」をとれば、日記カテゴリのフィードにリダイレクトされる）。</p>
				<p>さらに、バイクの話題も興味がない場合、バイクの Category ID は「11」なので、<a title="http://www.be-styles.jp/feed?cat=-11" href="http://www.be-styles.jp/feed?cat=-11"><em>http://www.be-styles.jp/feed?cat=-11</em></a> と打てばバイクの話題以外のフィードを取得できる。</p>
				<p>さらにさらに、日記もバイクもウザい人のためには、<a title="http://www.be-styles.jp/feed?cat=-5&amp;cat=-11" href="http://www.be-styles.jp/feed?cat=-5&amp;cat=-11"><em>http://www.be-styles.jp/feed?cat=-5&amp;cat=-11</em></a> が使える……と思ったが、ウチのサイトでは使えないようだ。</p>
				<p>via <a href="http://www.ghacks.net/2009/07/03/exclude-categories-from-wordpress-feeds/">Exclude Categories From WordPress Feeds</a></p>
				<p>&#8212;</p>
				<p><a href="http://www.be-styles.jp/archives/1337">WordPress の RSS Feed に関する Tips &#8211; www.be-styles.jp</a></p>
<p><a href="http://www.be-styles.jp/archives/3104">Read More... or Visit Original post.</p>


]]></content:encoded>
			<wfw:commentRss>http://www.be-styles.jp/archives/3104/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>[ネットブック] Windows 7 のタスクバーを縦表示に</title>
		<link>http://www.be-styles.jp/archives/2843</link>
		<comments>http://www.be-styles.jp/archives/2843#comments</comments>
		<pubDate>Sat, 23 May 2009 19:21:50 +0000</pubDate>
		<dc:creator>daruyanagi</dc:creator>
				<category><![CDATA[Computer]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Windows 7]]></category>

		<guid isPermaLink="false">http://www.be-styles.jp/archives/2843</guid>
		<description><![CDATA[ネットブック ＋ Windows 7 の組み合わせは良好。 ただ、不満がひとつあって、タダでさえ足りない縦解像度が、縦幅倍増の新タスクバーで圧迫されてしまう。 それを解決するために、タスクバーを縦表示にしてみた。 &#160; 日付表示が消えてしまった！（右は通常の場合） Read More... or Visit Original post.]]></description>
			<content:encoded><![CDATA[				
				<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin: 0.5em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.be-styles.jp%252Farchives%252F2843%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22%5B%E3%83%8D%E3%83%83%E3%83%88%E3%83%96%E3%83%83%E3%82%AF%5D%20Windows%207%20%E3%81%AE%E3%82%BF%E3%82%B9%E3%82%AF%E3%83%90%E3%83%BC%E3%82%92%E7%B8%A6%E8%A1%A8%E7%A4%BA%E3%81%AB%22%20%7D);"></div>
				<p><a href="http://www.be-styles.jp/wp-content/netbook-2.png" rel="lightbox"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="netbook_2" border="0" alt="netbook_2" src="http://www.be-styles.jp/wp-content/netbook-2-thumb.png" width="500" height="293" /></a> </p>
				<p>ネットブック ＋ Windows 7 の組み合わせは良好。   <br />ただ、不満がひとつあって、タダでさえ足りない縦解像度が、縦幅倍増の新タスクバーで圧迫されてしまう。 それを解決するために、タスクバーを縦表示にしてみた。</p>
				<p><a href="http://www.be-styles.jp/wp-content/image635.png" rel="lightbox"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.be-styles.jp/wp-content/image-thumb255.png" width="243" height="242" /></a>&#160; <a href="http://www.be-styles.jp/wp-content/image636.png" rel="lightbox"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="image" border="0" alt="image" src="http://www.be-styles.jp/wp-content/image-thumb256.png" width="242" height="242" /></a> </p>
				<p>日付表示が消えてしまった！（右は通常の場合）</p>
				<p class="continue"><a href="http://www.be-styles.jp/archives/2843#extended" title="Read the full text of [ネットブック] Windows 7 のタスクバーを縦表示に" rel="nofollow">(続きを読む&#8230;)</a></p>
<p><a href="http://www.be-styles.jp/archives/2843">Read More... or Visit Original post.</p>


]]></content:encoded>
			<wfw:commentRss>http://www.be-styles.jp/archives/2843/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[WPF] アプリケーションの実行パスを取得する</title>
		<link>http://www.be-styles.jp/archives/2468</link>
		<comments>http://www.be-styles.jp/archives/2468#comments</comments>
		<pubDate>Sun, 29 Mar 2009 14:43:49 +0000</pubDate>
		<dc:creator>daruyanagi</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://www.be-styles.jp/archives/2468</guid>
		<description><![CDATA[小ネタ。 WPF の Application クラスには、System.Windows.Forms.Application クラスほど便利ではなく、たとえば StartupPath プロパティがない。ないなら作れ、って感じなのだけど、はてさて。 public string GetStartupPath() { System.IO.Path.GetDirectoryName( Environment.GetCommandLineArgs()[0]); } Environment.GetCommandLine はコマンドライン引数を返してくれるが、その先頭には必ずアプリケーションの実行パスが含まれている。それを利用しよう。つまり、コマンドライン引数を string 配列にして返してくれる Environment.GetCommandLineArgs()[0] がすなわちそのまま EXE のパスになっている。 ほかにも、System.Windows.Forms.Application にはいろいろ便利なプロパティや関数があるので、それをマネして WPF の App クラス（プロジェクト作成時に自動生成されるヤツ）のプロパティとして実装しておけば、いろいろと便利かもしれない。 Read More... or Visit Original post.]]></description>
			<content:encoded><![CDATA[				
				<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin: 0.5em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.be-styles.jp%252Farchives%252F2468%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22%5BWPF%5D%20%E3%82%A2%E3%83%97%E3%83%AA%E3%82%B1%E3%83%BC%E3%82%B7%E3%83%A7%E3%83%B3%E3%81%AE%E5%AE%9F%E8%A1%8C%E3%83%91%E3%82%B9%E3%82%92%E5%8F%96%E5%BE%97%E3%81%99%E3%82%8B%22%20%7D);"></div>
				<p>小ネタ。</p>
				<p>WPF の Application クラスには、System.Windows.Forms.Application クラスほど便利ではなく、たとえば StartupPath プロパティがない。ないなら作れ、って感じなのだけど、はてさて。</p>
				</p>
				<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:9eabae9f-8c4c-4eb1-88d8-9b93c6b1a4e7" class="wlWriterEditableSmartContent">
				<pre name="code" class="c#">public string GetStartupPath()
{
	System.IO.Path.GetDirectoryName(
		Environment.GetCommandLineArgs()[0]);
}</pre>
				</div>
				<p>Environment.GetCommandLine はコマンドライン引数を返してくれるが、その先頭には必ずアプリケーションの実行パスが含まれている。それを利用しよう。つまり、コマンドライン引数を string 配列にして返してくれる Environment.GetCommandLineArgs()[0] がすなわちそのまま EXE のパスになっている。</p>
				<p>ほかにも、System.Windows.Forms.Application にはいろいろ便利なプロパティや関数があるので、それをマネして WPF の App クラス（プロジェクト作成時に自動生成されるヤツ）のプロパティとして実装しておけば、いろいろと便利かもしれない。</p>
				<p class="continue"><a href="http://www.be-styles.jp/archives/2468#extended" title="Read the full text of [WPF] アプリケーションの実行パスを取得する" rel="nofollow">(続きを読む&#8230;)</a></p>
<p><a href="http://www.be-styles.jp/archives/2468">Read More... or Visit Original post.</p>


]]></content:encoded>
			<wfw:commentRss>http://www.be-styles.jp/archives/2468/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[WPF] キーボードフック（WM_KEYBOARD_LL）</title>
		<link>http://www.be-styles.jp/archives/2467</link>
		<comments>http://www.be-styles.jp/archives/2467#comments</comments>
		<pubDate>Sun, 29 Mar 2009 09:55:28 +0000</pubDate>
		<dc:creator>daruyanagi</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://www.be-styles.jp/archives/2467</guid>
		<description><![CDATA[SetWindowsHookExは本来DLLを作成し、そのインスタンスを指定しなければならない。でも参考にしたプログラムはEXE上のフックプロセスをそのまま指定していた。何故可能なのかは不明だが確かにそのサンプルAPは動く。そこでそれをそのまま真似てみたがSetWindowsHookExからはエラーが返ってくる。この原因がわかるまで１週間近くかかってしまった。 結論から言うと（と言うか結論しか言えない）、プロジェクトのプロパティにあるデバックタグに「Visual Studioホスティングプロセスを有効にする」が規定値でオンになっている。このチェックを外さないとSetWindowsHookExはフックプロセスを異常とみなすようだ。 Ｊｕｍｂｏのブログ! &#124; WPFを使った拡大鏡を目指して フックってDLL作ってやらなきゃいけないと思ってけど、そんなことしなくても動くんだね。これを参考にして、キーボードのローレベルフックをやってみた。 Read More... or Visit Original post.]]></description>
			<content:encoded><![CDATA[				
				<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin: 0.5em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.be-styles.jp%252Farchives%252F2467%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22%5BWPF%5D%20%E3%82%AD%E3%83%BC%E3%83%9C%E3%83%BC%E3%83%89%E3%83%95%E3%83%83%E3%82%AF%EF%BC%88WM_KEYBOARD_LL%EF%BC%89%22%20%7D);"></div>
				<blockquote><p>SetWindowsHookExは本来DLLを作成し、そのインスタンスを指定しなければならない。でも参考にしたプログラムはEXE上のフックプロセスをそのまま指定していた。何故可能なのかは不明だが確かにそのサンプルAPは動く。そこでそれをそのまま真似てみたがSetWindowsHookExからはエラーが返ってくる。この原因がわかるまで１週間近くかかってしまった。</p>
				<p>結論から言うと（と言うか結論しか言えない）、プロジェクトのプロパティにあるデバックタグに「Visual Studioホスティングプロセスを有効にする」が規定値でオンになっている。このチェックを外さないとSetWindowsHookExはフックプロセスを異常とみなすようだ。</p>
				<p>   <cite><a href="http://blog.motdotnet.com/?eid=507989">Ｊｕｍｂｏのブログ! | WPFを使った拡大鏡を目指して</a></cite> </p></blockquote>
				<p>フックってDLL作ってやらなきゃいけないと思ってけど、そんなことしなくても動くんだね。これを参考にして、キーボードのローレベルフックをやってみた。</p>
				<p class="continue"><a href="http://www.be-styles.jp/archives/2467#extended" title="Read the full text of [WPF] キーボードフック（WM_KEYBOARD_LL）" rel="nofollow">(続きを読む&#8230;)</a></p>
<p><a href="http://www.be-styles.jp/archives/2467">Read More... or Visit Original post.</p>


]]></content:encoded>
			<wfw:commentRss>http://www.be-styles.jp/archives/2467/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>[WPF] WPFでいろいろ躓いたところ</title>
		<link>http://www.be-styles.jp/archives/2439</link>
		<comments>http://www.be-styles.jp/archives/2439#comments</comments>
		<pubDate>Sun, 22 Mar 2009 00:17:19 +0000</pubDate>
		<dc:creator>daruyanagi</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Download]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[WPF]]></category>

		<guid isPermaLink="false">http://www.be-styles.jp/archives/2439</guid>
		<description><![CDATA[描画領域を取得したい場合は、 RenderSize が使える。以下は、コンテンツが 590&#215;450になるようにウィンドウサイズを変更する例。 private void buttonAdjustWindowSize_Click( object sender, RoutedEventArgs e) { Width -= (grid.RenderSize.Width - 590); Height -= (grid.RenderSize.Height - 450); } Window -&#62; grid -&#62; その他もろもろ といった感じにコントロールを配置しているので、grid の大きさが、いわば Form アプリの ClientRect() に相当する感じになっているので、それを利用してみた。 まぁ、API でガリガリとウィンドウ枠の幅を取得しても良かったんだけど、めんどくさいしね。 Read More... or Visit Original post.]]></description>
			<content:encoded><![CDATA[				
				<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin: 0.5em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.be-styles.jp%252Farchives%252F2439%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22%5BWPF%5D%20WPF%E3%81%A7%E3%81%84%E3%82%8D%E3%81%84%E3%82%8D%E8%BA%93%E3%81%84%E3%81%9F%E3%81%A8%E3%81%93%E3%82%8D%22%20%7D);"></div>
				<p>描画領域を取得したい場合は、 RenderSize が使える。以下は、コンテンツが 590&#215;450になるようにウィンドウサイズを変更する例。</p>
				<div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:a19c8780-e368-48be-95e6-2e52c70d68e6" class="wlWriterEditableSmartContent">
				<pre name="code" class="c#">private void buttonAdjustWindowSize_Click(
	object sender, RoutedEventArgs e)
{
	Width -= (grid.RenderSize.Width - 590);
	Height -= (grid.RenderSize.Height - 450);
}</pre>
				</div>
				<p>Window -&gt; grid -&gt; その他もろもろ といった感じにコントロールを配置しているので、grid の大きさが、いわば Form アプリの ClientRect() に相当する感じになっているので、それを利用してみた。</p>
				<p>まぁ、API でガリガリとウィンドウ枠の幅を取得しても良かったんだけど、めんどくさいしね。</p>
				<p class="continue"><a href="http://www.be-styles.jp/archives/2439#extended" title="Read the full text of [WPF] WPFでいろいろ躓いたところ" rel="nofollow">(続きを読む&#8230;)</a></p>
<p><a href="http://www.be-styles.jp/archives/2439">Read More... or Visit Original post.</p>


]]></content:encoded>
			<wfw:commentRss>http://www.be-styles.jp/archives/2439/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>[C#] Int を byte[] に分解する</title>
		<link>http://www.be-styles.jp/archives/2179</link>
		<comments>http://www.be-styles.jp/archives/2179#comments</comments>
		<pubDate>Sun, 04 Jan 2009 10:29:39 +0000</pubDate>
		<dc:creator>daruyanagi</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Study]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.be-styles.jp/archives/2179</guid>
		<description><![CDATA[たとえば、Color.ToArgb() で返ってくる整数値（AARRGGBB の32ビット）を成分ごとにばらしたい場合などなど。 シフト演算をしてもよいが、私のような文系人間には少しつらい。ちょうどいいことに、.NET には専用のコンバータークラスがあるのでそれを利用すればいい。 BitConverter はさまざまな型の変数を、バイト配列に変換してくれる。 たとえば、.GetBytes() に整数値を渡せば、byte を4つ格納した配列を返す。 Int32 i = /* 何らかの整数値 */; byte[] b = BitConverter.GetBytes(i); label1.Text = string.Format( "{0:X2}-{1:X2}-{2:X2}-{3:X2}", b[0], b[1], b[2], b[3]); 出力結果は、 C0-AA-F2-87 とかそんな感じになるはず。 Read More... or Visit Original post.]]></description>
			<content:encoded><![CDATA[				
				<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin: 0.5em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.be-styles.jp%252Farchives%252F2179%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22%5BC%23%5D%20Int%20%E3%82%92%20byte%5B%5D%20%E3%81%AB%E5%88%86%E8%A7%A3%E3%81%99%E3%82%8B%22%20%7D);"></div>
				<p>たとえば、Color.ToArgb() で返ってくる整数値（AARRGGBB の32ビット）を成分ごとにばらしたい場合などなど。</p>
				<p>シフト演算をしてもよいが、私のような文系人間には少しつらい。ちょうどいいことに、.NET には専用のコンバータークラスがあるのでそれを利用すればいい。</p>
				<p>BitConverter はさまざまな型の変数を、バイト配列に変換してくれる。   <br />たとえば、.GetBytes() に整数値を渡せば、byte を4つ格納した配列を返す。</p>
				<div class="wlWriterEditableSmartContent" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:4d647fb7-64c3-404d-8ef8-8794c5d39dd8" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">
				<pre name="code" class="c#">Int32 i = /* 何らかの整数値 */;

byte[] b = BitConverter.GetBytes(i);
label1.Text = string.Format(
	"{0:X2}-{1:X2}-{2:X2}-{3:X2}",
	b[0], b[1], b[2], b[3]);</pre>
				</div>
				<p>出力結果は、 C0-AA-F2-87 とかそんな感じになるはず。</p>
				<p class="continue"><a href="http://www.be-styles.jp/archives/2179#extended" title="Read the full text of [C#] Int を byte[] に分解する" rel="nofollow">(続きを読む&#8230;)</a></p>
<p><a href="http://www.be-styles.jp/archives/2179">Read More... or Visit Original post.</p>


]]></content:encoded>
			<wfw:commentRss>http://www.be-styles.jp/archives/2179/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>[C#] 拡張メソッドでちょっとコードをきれいにする</title>
		<link>http://www.be-styles.jp/archives/2013</link>
		<comments>http://www.be-styles.jp/archives/2013#comments</comments>
		<pubDate>Tue, 09 Dec 2008 00:19:44 +0000</pubDate>
		<dc:creator>daruyanagi</dc:creator>
				<category><![CDATA[Study]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Tips]]></category>

		<guid isPermaLink="false">http://www.be-styles.jp/archives/2013</guid>
		<description><![CDATA[点と点の距離や中点をとる場合などに、Point型をPointF型に簡単に変換できたら便利。そのためのメソッドは、こんな感じになるだろう。 public PointF PointToPointF(Point p) { return new PointF((float)p.X, (float)p.Y); } けど、こんなメソッドが増えてくると、なんだか全体のコードの見通しが悪くなって気持ち悪い。ユーティリティー系メソッドを別ファイルにしてまとめておくというのもアリだが、PointToPointF() という名前がなんともはや（Delphi ならこれでもいい気がするけど）。 できれば、i.ToString() みたいに p.ToPointF() なんて書ければいいのだが。 C#3.0 なら拡張メソッドを使うことで、簡単に（継承を使わずに）既存のクラスへ新しいメソッドを付け加えることが出来るらしい。 Read More... or Visit Original post.]]></description>
			<content:encoded><![CDATA[				
				<div class="topsy_widget_data topsy_theme_blue" style="float: right;margin: 0.5em; background: url(data:,%7B%20%22url%22%3A%20%22http%253A%252F%252Fwww.be-styles.jp%252Farchives%252F2013%22%2C%20%22style%22%3A%20%22big%22%2C%20%22title%22%3A%20%22%5BC%23%5D%20%E6%8B%A1%E5%BC%B5%E3%83%A1%E3%82%BD%E3%83%83%E3%83%89%E3%81%A7%E3%81%A1%E3%82%87%E3%81%A3%E3%81%A8%E3%82%B3%E3%83%BC%E3%83%89%E3%82%92%E3%81%8D%E3%82%8C%E3%81%84%E3%81%AB%E3%81%99%E3%82%8B%22%20%7D);"></div>
				<p>点と点の距離や中点をとる場合などに、Point型をPointF型に簡単に変換できたら便利。そのためのメソッドは、こんな感じになるだろう。</p>
				<div class="wlWriterEditableSmartContent" id="scid:812469c5-0cb0-4c63-8c15-c81123a09de7:31ffce54-729e-405d-ace4-0da6a1d73a36" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">
				<pre name="code" class="c#">public PointF PointToPointF(Point p)
{
    return new PointF((float)p.X, (float)p.Y);
}
</pre>
				</div>
				<p>けど、こんなメソッドが増えてくると、なんだか全体のコードの見通しが悪くなって気持ち悪い。ユーティリティー系メソッドを別ファイルにしてまとめておくというのもアリだが、PointToPointF() という名前がなんともはや（Delphi ならこれでもいい気がするけど）。</p>
				<p>できれば、i.ToString() みたいに <em>p.ToPointF()</em> なんて書ければいいのだが。</p>
				<p>C#3.0 なら<strong>拡張メソッド</strong>を使うことで、簡単に（継承を使わずに）既存のクラスへ新しいメソッドを付け加えることが出来るらしい。</p>
				<p class="continue"><a href="http://www.be-styles.jp/archives/2013#extended" title="Read the full text of [C#] 拡張メソッドでちょっとコードをきれいにする" rel="nofollow">(続きを読む&#8230;)</a></p>
<p><a href="http://www.be-styles.jp/archives/2013">Read More... or Visit Original post.</p>


]]></content:encoded>
			<wfw:commentRss>http://www.be-styles.jp/archives/2013/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

