如何在Virtual Pascal中绘制图形?

时间:2015-02-19 15:14:32

标签: graphics pascal

我一直在使用VP(Virtual Pascal)创建一个学校商店作为我的项目。我刚刚完成了该程序,我真的希望能够添加图形。没有什么太花哨的,只需点击按钮即可转到“订单”而不是:

Procedure ordersMenu;

  VAR

     orderMenuChoice : CHAR;

  BEGIN
     REPEAT
        CLRSCR;
        TEXTCOLOR(15);
        GOTOXY(30,2);
        WRITELN('Orders Menu');
        TEXTCOLOR(11);
        GOTOXY(30,3);
        WRITELN('-----------');
        WRITELN('');

        WRITE('A ':25);
        TEXTCOLOR(15);
        WRITELN(': Create a New Customer Order');
        WRITELN;
        TEXTCOLOR(11);

        WRITE('B ':25);
        TEXTCOLOR(15);
        WRITELN(': Search For A Customer Order');
        WRITELN;
        TEXTCOLOR(11);

        WRITE('C ':25);
        TEXTCOLOR(15);
        WRITELN(': Delete A Customer Order');
        WRITELN;
        TEXTCOLOR(11);

        WRITE('D ':25);
        TEXTCOLOR(15);
        WRITELN(': Display All Orders');
        WRITELN;
        TEXTCOLOR(11);

        WRITE('X ':25);
        TEXTCOLOR(15);
        WRITELN(': Quit');
        WRITELN;

        WRITE('Enter choice: ':23);
        orderMenuChoice:=UPCASE(READKEY);
        sndPlaySound('F:\School\IB 1\HL subjects\Computer Science\Pascal programs\InternalAssessment\sound files\beep.wav', snd_Async or snd_NoDefault );
        TEXTCOLOR(11);
        WRITELN(orderMenuChoice);
        DELAY(200);
        TEXTCOLOR(15);


        CASE orderMenuChoice OF

           'A' : CreateCustomerOrder;
           'B' : searchForCustomerOrder;
           'C' : DeleteCustomerOrder;
           'D' : DisplayAllOrders;
           'X' : WRITELN('Goodbye.');

        ELSE
        BEGIN
           WRITELN;
           TEXTCOLOR(12);
           WRITELN('ERROR - Only Enter A-D Or X To Exit. Try Again.');
           TEXTCOLOR(15);
           READLN;
        END
        END;

     UNTIL OrderMenuChoice = 'X';

  END;

我以前从未在编程中使用过图形,所以我不知道从哪里开始。 我需要什么样的图书馆?

我已经使用过CRT,SYSUTILS,USES32等... 哪个是使用图形的正确方法?

0 个答案:

没有答案