Relative Content

Daily Archives: May 2, 2016

C# exercises (3) Common Control

ディジタル時計の作成 Create Digital Clock デザイン ツールボックスの中で、 –コモンコントロール「TextBox」 –コンポーネント「Timer」 Formにドラッグ&ドロップする Timerのプロパティ(値)を変更 timer1のプロパティ Enabled⇒ True (Enabled:タイマーを実行する) Interval⇒ 1000 (Interval:タイマーの実行間隔, 1000⇒1000ms(1秒))   TextBoxのプロパティ Font :36ポイント –文字のサイズ⇒好きなサイズに ForeColor :緑 –文字の色⇒好きな色に BackColor :ブラック –TextBoxの背景色⇒好きな色に TextAlign :Center –文字を表示する場所⇒真ん中(Center) Text: 00:00:00 –表示する文字列⇒最初は00時00分00秒をあらわす     ディジタル時計の完成 timer1をダブルクリックすると、timer処理に関する関数(メソッド)が自動生成される using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; […]