WinForms

コンピュータ

C#のWinFormsでコンボボックスのイベントを確認する。

コンボボックスで値を選択する場合と入力した場合のイベントを確認してみました。 テストプログラムソース using System.Diagnostics; namespace ComboBoxEventTest; public partial...
コンピュータ

C#のWinFormsでファイルマネージャーのような物をつくる。

ファイルマネージャーをUserControlで作成すると再利用できるのではないかと思い試作してみました。 ファイル名:Form1.cs namespace FileManagerControl; public partial class F...
コンピュータ

C#のWinFormsでマウスカーソルを変更する。

formのCursorプロパティに変更したいカーソルをセットします。 namespace MouseCursor; public partial class Form1 : Form { public Form1() { Initializ...
コンピュータ

C#のWinFormsで直線を点滅させる。

タイマーで一定時間ごと白い線と黒い線を交互に表示しています。 namespace BlinkLine; public partial class Form1 : Form { public Form1() { InitializeCompo...
コンピュータ

C#のwinformsでUserControlのサンプル

UserControlで16進数を入力するサンプルを作成してみました。 namespace UserControlSample; public class User1 : UserControl { Font fnt = new Font(...
コンピュータ

C#のwinformsでアニメーションGIFを表示する。

gifファイルをエクスプローラーからドラッグアンドドロップすることでアニメーションを表示します。 実行環境構築 プロジェクトの作成 mkdir プロジェクト名 cd プロジェクト名 dotnet new winforms code . ソー...
コンピュータ

WinFormsでアイコンエディタを作る5。「新規作成」

プロジェクトの作成 mkdir IconE cd IconE dotnet new winforms code . ソース ファイル名:Form1.cs namespace IconE; public partial class Form1...
コンピュータ

WinFormsでアイコンエディタを作る4。「アイコンの保存と読み込み」

プロジェクトの作成 mkdir IconE cd IconE dotnet new winforms code . ソース ファイル名:Form1.cs namespace IconE; public partial class Form1...
コンピュータ

WinFormsでアイコンエディタを作る3。「色選択」

色の選択機能を追加しました。 プロジェクトの作成 mkdir IconE cd IconE dotnet new winforms code . ソース ファイル名:Form1.cs namespace IconE; public part...
コンピュータ

WinFormsでアイコンエディタを作る2。「消去機能」

セル(ドット)の消去機能と描画との切り替えのラジオボタンを設置しました。 プロジェクトの作成 mkdir IconE cd IconE dotnet new winforms code . ソース ファイル名:Form1.cs namesp...
コンピュータ

C#で動画ファイルの解像度やフレームレートなどを取得する【ffmpeg|ffprobe】

動画ファイルを扱う場合、解像度などの情報が欲しいことがあります。Nugetでffprobeと検索したところ、使えそうなパッケージがあったので試してみます。 dotnetバージョン dotnet --version 6.0.301 プロジェク...
コンピュータ

WinFormでボールが壁で跳ね返るプログラム

System.Environment.TickCount64を使い描画のタイミングをとっています。 プロジェクトの作成 PowerShellで実行。要dotnet.exe mkdir プロジェクト名 cd プロジェクト名 dotnet ne...
コンピュータ

【.Net5】WinFormで時計2【System.Timers.Timer】

以前に作成した時計はタイマーがSystem.Threading.Timerでしたが、タイマーをSystem.Timers.Timerに変更したバージョンになります。 プロジェクトの作成 PowerShellで実行。要dotnet.exe m...
コンピュータ

【.Net5】WinFormで時計

プロジェクトの作成 PowerShellで実行。要dotnet.exe mkdir Clock3 cd Clock3 dotnet new winforms code . ソースコード ファイル名:Form1.cs using System...