OSDN Git Service

20021009版ソース
[seraphyscrtools/SeraphyScriptTools.git] / TestScript / form3.vbs
1 option explicit
2
3 dim obj
4 set obj = CreateObject("SeraphyScriptTools.Instance")
5
6 dim dl,de,cmd
7
8 wscript.ConnectObject obj.mainframe, "event_"
9 with obj.mainframe
10         .backcolor = "&HF0FF80"
11         .SetPlacement ,,,180
12         .SetWindowStyle 0,1,0
13         with .form
14                 .ControlPad ,5
15                 .label "\83h\83\8d\83b\83v\83_\83E\83\93\83G\83f\83B\83b\83g"
16                 set de = .dropdownedit("DROPDOWNEDIT",,8)
17                 .label "\83h\83\8d\83b\83v\83_\83E\83\93\83\8a\83X\83g"
18                 set dl = .dropdownlist(,8)
19                 .controlbreak
20                 .controlpad ,10
21                 set cmd = .button("SHOW",6)
22                 .controlpad 90
23                 .button("EXIT",6).SetID(2)
24         end with
25         .open "\83h\83\8d\83b\83v\83_\83E\83\93\83\8a\83X\83g\81E\83G\83f\83C\83b\83g\83T\83\93\83v\83\8b"
26         with de
27                 .addstring "ABCDEFG"
28                 .addstring "0123456"
29                 .addstring "*/-+.?<>"
30                 .addstring "4"
31                 .addstring "3"
32                 .addstring "2"
33                 .addstring "1"
34         end with
35         with dl
36                 .addstring "ABCDEFG"
37                 .addstring "0123456"
38                 .addstring "*/-+.?<>"
39                 .addstring "4"
40                 .addstring "3"
41                 .addstring "2"
42                 .addstring "1"
43         end with
44         dl.currentselecteditem = 0
45         .domodal
46 end with
47 wscript.disconnectobject obj
48
49 sub event_OnCommand
50         dim idx1,idx2,mes
51         select case obj.mainframe.event.parameter
52                 case cmd.id
53                         idx1 = de.currentselecteditem
54                         idx2 = dl.currentselecteditem
55                         mes = "\83h\83\8d\83b\83u\83_\83E\83\93\83G\83e\83C\83b\83g\82Ì\91I\91ð = " & idx1 & vbcrlf
56                         mes = mes & "\93à\97e = " & de.text & vbcrlf
57                         mes = mes & vbcrlf & "\83h\83\8d\83b\83v\83_\83E\83\93\83\8a\83X\83g\82Ì\91I\91ð = " & idx2 & vbcrlf
58                         if(idx2 >= 0) then
59                                 mes = mes & "\93à\97e = " & de.itemtext(idx2)
60                         end if
61                         obj.dialog.messagebox mes
62         end select
63 end sub