1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
| MODIFY WINDOW SCREEN FONT "arial,TUR",10 STYLE "B";
FROM 10,10 TO 30,35;
NOCLOSE MINIMIZE NOFLOAT NOGROW NOZOOM;
TITLE SPACE(70)+"xxx"
***pencere oluşturdum.***
ybut1=0
@ 1,1 GET ybut1 PICTURE "@*H xxx;Bayrak;yyy;Döviz" SIZE 1.5,11,0.5 STYLE "BI" FONT "ARIAL,TUR",12 DEFAULT O
READ
*** buton oluşturdum. * Bu butonlardan ana pencere üzerinde çok sayıda var....
IF ybut1=2
DO fo1
LOOP
ENDIF
*** ile kaçıncı butona basıldığını kontrol ediyorum ve Bayrak butonuna basılıınca fo1.prg çalıştırılıyor.
***** fo1.prg içeriği..... ********
Clear All
Public oForm
oForm = Createobject("bayrak")
oForm.Show()
Define Class bayrak As Form
DataSession = 2
Height = 500
Width = 800
Name = "bayrak"
Caption = "Bayrak Kodu"
Add Object lblno As Label With ;
left = 5, Top = 5, Width = 45, Caption = "No :"
Add Object lbladi As Label With ;
left = 5, Top = 30, AutoSize=.T., Caption = "Adı :"
Add Object txtNo As myTextBox With ;
left = 35, Top = 2, Width = 30, ControlSource = "bayrak.no",Enabled = .T.,SelectOnEntry = .T.
Add Object txtAdi As myTextBox With ;
left = 35, Top = 27, ControlSource = "bayrak.adi",Enabled = .T.
Add Object cmdNew as CommandButton With ;
Top = 2, ;
Left = 175, ;
Height = 27, ;
Width = 84, ;
Caption = 'Yeni Kayıt', ;
Enabled = .t.
Add Object cmdSave as CommandButton With ;
Top = 2, ;
Left = 175, ;
Height = 27, ;
Width = 84, ;
Caption = 'Sakla', ;
Visible = .f.
Add Object cmdEdit as CommandButton With ;
Top = 32, ;
Left = 175, ;
Height = 27, ;
Width = 84, ;
Caption = 'Düzelt', ;
Enabled = .t.
Add Object cmdUpdate as CommandButton With ;
Top = 32, ;
Left = 175, ;
Height = 27, ;
Width = 84, ;
Caption = 'Sakla', ;
Visible = .f.
Add Object cmdDelete as CommandButton With ;
Top = 62, ;
Left = 175, ;
Height = 27, ;
Width = 84, ;
Caption = 'Sil', ;
Enabled = .t.
Add Object cmdClose as CommandButton With ;
Top = 92, ;
Left = 175, ;
Height = 27, ;
Width = 84, ;
Caption = 'Kapat'
Procedure cmdNew.Click
ppNew()
EndProc
Procedure cmdClose.Click
CLOSE ALL
thisform.Release
EndProc
* Add Object grdOrders As Grid With ;
* Left = 10, Top = 90, Height = 400, Width = 780, ;
* RecordSource = "Orders", ;
* LinkMaster = "Customer", ;
* ChildOrder = "cust_id",;
* RelationalExpr = "cust_id"
Procedure Load
Use bayrak INDEX bayrak1,bayrak2
* In 0
* Use (_samples+"data\orders") In 0
* cursorsetprop("buffering",5,"customer")
* cursorsetprop("buffering",5,"orders")
Endproc
Enddefine
******************************************************************
Define Class myTextBox as TextBox
******************************************************************
Enabled = .f.
DisabledForeColor = Rgb(0,0,0)
SelectOnEntry = .t.
EndDefine
******************************************************************
Procedure ppNew
******************************************************************
With oForm
.txtNo.Enabled = .t.
.txtNo.Value = 0
.txtAdi.Enabled = .t.
.txtAdi.Value = ''
.cmdNew.Visible = .f.
.cmdSave.Visible = .t.
.cmdEdit.Visible = .f.
.cmdDelete.Visible = .f.
* .grdListe.Enabled = .f.
.txtNo.SetFocus()
EndWith
EndProc
*************************** ŞEKLİNDE. (Hala bitmedi devam ediyor )
************ SORUNUM : fo1.prg ÇALIŞTIĞINDA
@ 1,1 GET ybut1 PICTURE "@*H xxx;Bayrak;yyy;Döviz" SIZE 1.5,11,0.5 STYLE "BI" FONT "ARIAL,TUR",12 DEFAULT O |