
October 10, 2008 18:13 by
VSTO も当然ながら、Win フォームのコンポーネントを作成して、ドキュメントや作業ウィンドウから Win フォームを起動することができます。
作業ウィンドウで操作してしまえばよい部分はありますが、やはり、領域の問題などもあり、どうしても Win フォームを呼び出してから、値を取得しドキュメント上で利用するケースもあるかと思います。
[More]
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5

October 10, 2008 14:54 by
取得した名前から、DB や Web サービスから情報を追加で取得して、分析をおこなうようなシナリオも考えられます。
※一番右の要素をクリックした際のメッセージボックス
※一番左の要素をクリックした際のメッセージボックス
Excel VSTO でグラフと連動した動的なアプリケーションを作成する際に有効です。
以下手順です。
手順:
1. 任意のグラフ付きのブックを用意します。
2. VSTO で読み込み、以下のコードを記述します。
Sub elementChart_MouseD...
[More]
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5

October 9, 2008 12:04 by
StackFrame クラス (System.Diagnostics) を使用すると、呼び出し元メソッドを取得することができる。しかし、Release ビルドされたアセンブリでは JIT 最適化により呼び出し元メソッドがインライン化されている可能性がある。
例えば、次のコードの実行結果を Debug ビルドと Release ビルド (非デバッグ実行) とで比較すると一目瞭然だ。
[More]
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5

October 6, 2008 21:32 by
次の Visual Studio と .NET Framework のバージョンは、Visual Studio 2010 と .NET Framework 4.0 になるとのこと。
気になるのは、.NET Framework 4.0 の CLR のバージョンがどうなるかですね。
[More]
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5

September 14, 2008 19:23 by
とりこびとさんの記事を読んでいて、そういえば VB のイベント定義って C# と違うんだよなぁと思い出したことがきっかけで、久々に VB のコードを書いてみました。そしたら、ちょっとした問題に気づきました。
[More]
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5

August 21, 2008 23:31 by
LINQ + VB.NETで実装した場合のWhere条件における「Is Nothing」vs 「= Nothing」の違いを 纏めました
[More]
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5

August 17, 2008 00:40 by
DataGridViewButtonColumnインスタンス(これがボタン列になります)を作成して、DataGridViewに追加すればOKです。
ボタンがクリックされると、CellContentClickイベントが発生するので、引数e(DataGridViewCellEventArgs)のe.RowIndexやe.ColumnIndexを調べればどのボタンが押されたかがわかります。
[More]
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5

May 6, 2008 08:08 by
指定した年と月に含まれる日数を取得するには、DateTime の DaysInMonth メソッドを使用します。
引数に取得したい年と月を指定することで、指定した年と月に含まれる日数が返されます。
[More]
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5

March 24, 2008 22:13 by
なるべく高速に文字列を処理するには、StringBuilder クラスを使用します。
頻繁に文字列に対して処理が発生する場合に使用すると効果的です。
ある程度、使用するサイズが決まっている場合は Capacity プロパティに値をセットしておきます。
Capacity プロパティは現在の Length より低い値に設定すると ArgumentOutOfRangeException が発生します。
その他、StringBuilder クラスのメンバには、String クラスと同じようなものが多数存在します。
[More]
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5

March 21, 2008 05:00 by
System.String クラスの IndexOf メソッドを使用すると、先頭から文字を検索することができます。
これとは別で IndexOfAny メソッドというメソッドがあります。
IndexOfAny メソッドは Char 型の配列を指定し、その配列内に存在する文字のいずれかがヒットした最初のインデックス値を返します。
[More]
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5

March 18, 2008 01:08 by
Excel アプリケーションは、Excel.Application のインスタンスを生成し、Visible を true に設定することで表示されます。
終了させる場合は Quit メソッドを使用しますが、その後に System.Runtime.InteropServices.Marshal クラスの ReleaseComObject メソッドを使用して、COM オブジェクトを解放しなければなりません。
[More]
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5

March 4, 2008 04:14 by
WindowsXP Visual Basic .NET 2003
必要により画像ファイルを準備願います。
[More]
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5

February 28, 2008 02:56 by
Visual Studio 2008 Web Deployment Projects 日本語版リリース
[More]
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5

February 16, 2008 01:45 by
サーバーが80番以外のポート番号を使用している場合(通常は80番です)は、次のようにします。
http://www.site.com:8080/html/attr/url.htm
同じサーバー上のファイルであれば、http://サーバ名 を省略することができます。
[More]
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5

February 16, 2008 00:07 by
Stringクラスではなく、System.Text.StringBuilderクラスを使うことにより、文字列の置換や追加などの処理をより高速に行うことができます。例えば、Stringクラスで文字列の連結を行うと、文字列を連結するたびに新しいインスタンスを作成するため、パフォーマンスが落ちますが、StringBuilderクラスでは、そのようなことがありません。文字列の置換や追加などの処理を頻繁に行う時は、StringBuilderクラスを使うとよいでしょう。
[More]
Be the first to rate this post
- Currently 0/5 Stars.
- 1
- 2
- 3
- 4
- 5