graphic problem in c++

hi
i am using borland c++ 5.02 for making a graphic program(new project---platform Dos standard---libraries---BGI), it works correctly in my pc (my OS is xp sp2) but when i want to use it in my labtop in VM with the same OS it dosent run Fullscreen what should i do?!
here is my code
plz help
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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
#include <iostream.h>
#include <graphics.h>
#include <conio.h>
#include <stdio.h>
 main()
{
int driver = DETECT, mode;
initgraph(&driver, &mode, "c:\\tc\\bgi");
int x1,x2,x3,x4;
int y1,y2,y3,y4;
int s,s1;
cout<<"\nchand ozv mikhahid tarif konid?(max 4):";
cin>>s;
//--------------------------------------strat switch 1
switch(s){
//--------------------------------------2 noghte   start
case 2:
cout << "\nenter x1,y1:";
cin>>x1>>y1;
cout << "\nenter x2,y2:";
cin>>x2>>y2;
line(x1,y1,x2,y2);
getch();
clrscr();
setbkcolor(0);
if(y1==y2){
cout<<"\n Nemodare hass nist";
line(x1,y1,x2,y2);
}
if(y2>y1){
outtextxy(x1+10,y1-10,"b");
outtextxy(x2+10,y2-10,"a");
line(x1,y1,x2,y2);
cout<<"\n              A={(a,a),(a,b),(b,b)}";}
else{
outtextxy(x1+10,y1-10,"a");
outtextxy(x2+10,y2-10,"b");
line(x1,y1,x2,y2);
}
break;
//--------------------------------------2 noghte   end
//--------------------------------------3 noghte   start
case 3:
cout << "\nenter x1,y1:";
cin>>x1>>y1;
cout << "\nenter x2,y2:";
cin>>x2>>y2;
cout << "\nenter x3,y3:";
cin>>x3>>y3;
line(x1,y1,x2,y2);
line(x3,y3,x2,y2);
getch();
clrscr();
if(y1==y2 || y2==y3) {
cout<<"\n Nemodare hass nist";
line(x1,y1,x2,y2);
line(x3,y3,x2,y2);
outtextxy(x1+10,y1-10,"c");
outtextxy(x2+10,y2-10,"b");
outtextxy(x3+10,y3-10,"a");}
else {
line(x1,y1,x2,y2);
line(x3,y3,x2,y2);
//---------------------------------
if(y1<=y2 && y1<=y3){
outtextxy(x1+10,y1+10,"c");
if(y2<y3){
outtextxy(x2+10,y2-10,"b");
outtextxy(x3+10,y3-10,"a");}
else{
outtextxy(x2+10,y2-10,"a");
outtextxy(x3+10,y3-10,"b");}
if(y1>y3 || y2<y3)
cout<<"\nA={(a,a),(a,c),(a,b),(b,b),(b,c),(c,c)}";
else
cout<<"\nA={(a,a),(a,c),(a,b),(b,b),(c,c)}";
break;}

//----------------------------------
if(y2<=y1 && y2<=y3){
outtextxy(x2+10,y2-10,"c");
if(y1<y3){
outtextxy(x1+10,y1-10,"b");
outtextxy(x3+10,y3-10,"a");}
else{
outtextxy(x1+10,y1-10,"a");
outtextxy(x3+10,y3-10,"b");}
cout<<"\nA={(a,a),(a,c),(b,b),(b,c),(c,c)}";
break;}
//---------------------------------
if(y3<=y1 && y3<=y2){
outtextxy(x3+10,y3-10,"c");
if(y1<y2){
outtextxy(x1+10,y1-10,"b");
outtextxy(x2+10,y2-10,"a");}
else{
outtextxy(x1+10,y1-10,"a");
outtextxy(x2+10,y2-10,"b");}
}
cout<<"\nA={(a,a),(a,c),(a,b),(b,b),(b,c),(c,c)}";
break;}
//--------------------------------------3 noghte   end
//--------------------------------------4 noghte   start
case 4:
//----------------------------1
line(50,50,30,70);
line(30,70,50,120);
line(50,120,70,100);
line(70,100,50,50);
outtextxy(50,130,"1");

//---------------------------  2
line(120,50,100,70);
line(100,70,120,120);
line(120,120,140,100);
outtextxy(120,130,"2");
//---------------------------  3
line(200,120,150,70);
line(200,120,180,70);
line(200,120,210,70);
outtextxy(200,130,"3");
//---------------------------   4
line(250,70,220,120);
line(250,70,250,120);
line(250,70,290,120);
outtextxy(250,130,"4");
//---------------------------  5
line(310,50,290,70);
line(290,70,310,120);
line(310,120,330,100);
line(330,100,310,50);
line(310,50,310,120);
outtextxy(310,130,"5");
//---------------------------  6
line(350,120,380,70);
line(350,120,350,140);
line(350,120,330,70);
outtextxy(360,130,"6");
//---------------------------  7
line(400,70,390,120);
line(400,70,400,50);
line(400,70,410,120);
outtextxy(400,130,"7");
//---------------------------
outtextxy(10,300,"ENTER THE NUMBER OF SHAPES:");
cin>>s1;
//--------------------------------------strat switch 2
switch(s1){
//---------------------------------------------------------start case 1
case 1:
clrscr();
line(50,50,30,70);
line(30,70,50,120);
line(50,120,70,100);
line(70,100,50,50);
outtextxy(55,50,"d");
outtextxy(20,70,"b");
outtextxy(60,120,"a");
outtextxy(80,100,"c");
cout<<"A={(a,a),(a,b),(a,c),(a,d),(b,b),(b,d),(c,d),(d,d)}";
break;
//---------------------------------------------------------end case 1
//---------------------------------------------------------start case 1
case 2:
clrscr();
line(120,50,100,70);
line(100,70,120,120);
line(120,120,140,100);
outtextxy(125,50,"d");
outtextxy(105,70,"b");
outtextxy(125,120,"a");
outtextxy(145,100,"c");
cout<<"A={(a,a),(a,b),(a,c),(a,d),(b,b),(b,d),(d,d)}";
break;
//---------------------------------------------------------end case 2
//---------------------------------------------------------start case 3
case 3:
clrscr();
line(200,120,150,70);
line(200,120,180,70);
line(200,120,210,70);
outtextxy(150,60,"d");
outtextxy(190,70,"b");
outtextxy(205,120,"a");
outtextxy(215,70,"c");
cout<<"A={(a,a),(a,b),(a,c),(a,d),(b,b),(c,c),(d,d)}";
break;
//---------------------------------------------------------end case 3
//---------------------------------------------------------start case 4
case 4:
clrscr();
line(250,70,220,120);
line(250,70,250,120);
line(250,70,290,120);
outtextxy(255,70,"d");
outtextxy(225,120,"b");
outtextxy(255,120,"a");
outtextxy(295,120,"c");
cout<<"A={(a,a),(a,d),(b,b),(b,d),(c,c),(c,d),(d,d)}";
break;
//---------------------------------------------------------end case 4
//---------------------------------------------------------start case 5
case 5:
clrscr();
line(310,50,290,70);
line(290,70,310,120);
line(310,120,330,100);
line(330,100,310,50);
line(310,50,310,120);
outtextxy(315,50,"d");
outtextxy(280,70,"b");
outtextxy(315,120,"a");
outtextxy(330,100,"c");
cout<<"A={(a,a),(a,b),(a,c),(a,d),(b,b),(b,d),(c,d),(d,d)}";
break;
//---------------------------------------------------------end case 5
//---------------------------------------------------------start case 6
case 6:
clrscr();
line(350,120,380,70);
line(350,120,350,140);
line(350,120,330,70);
outtextxy(355,120,"b");
outtextxy(370,60,"d");
outtextxy(345,140,"a");
outtextxy(325,60,"c");
cout<<"A={(a,a),(a,b),(a,c),(a,d),(b,b),(b,c),(b,d),(c,c),(d,d)}";
break;
//---------------------------------------------------------end case 6
//---------------------------------------------------------start case 7
case 7:
clrscr();
line(400,70,390,120);
line(400,70,400,50);
line(400,70,410,120);
outtextxy(405,120,"b");
outtextxy(390,45,"d");
outtextxy(380,115,"a");
outtextxy(390,65,"c");
break;
}}
//---------------------------------------------------------end case 7
//--------------------------------------4 noghte   end
//--------------------------------------end switch 2
//--------------------------------------end switch 1
getch ();
return 0;
}
oh i solved that. instead of DETECT, i should use PC3270HI
Topic archived. No new replies allowed.