OSDN Git Service

キャンセルボタン追加。無効な文字列が入っても処理できるようにした。
[gikonavigoeson/gikonavi.git] / IndividualAbon.pas
1 unit IndividualAbon;
2
3 interface
4
5 uses
6   Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
7   Dialogs, StdCtrls, Buttons;
8
9 type
10   TIndividualAbonForm = class(TForm)
11     ComboBox1: TComboBox;
12     Label1: TLabel;
13     Button1: TButton;
14     BitBtn1: TBitBtn;
15     procedure Button1Click(Sender: TObject);
16   private
17     { Private \90é\8c¾ }
18   public
19     { Public \90é\8c¾ }
20     ResNumber : Integer;
21   end;
22
23 var
24   IndividualAbonForm: TIndividualAbonForm;
25
26 implementation
27
28 {$R *.dfm}
29
30 procedure TIndividualAbonForm.Button1Click(Sender: TObject);
31 begin
32     if ComboBox1.Text <> '' then begin
33         try
34                         ResNumber := StrToInt(ComboBox1.Items[ComboBox1.ItemIndex]);
35         Except
36             ResNumber := 0;
37         end;
38     end;
39 end;
40
41 end.