Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

help needed!

yoyo_ryuyoyo_ryu Member Posts: 18
i have made a project which does the timetables for a school and i want to print the timetables using graphics. how can i do so?
thanks

Comments

  • Phat NatPhat Nat Member Posts: 757
    : i have made a project which does the timetables for a school and i want to print the timetables using graphics. how can i do so?
    : thanks
    :

    Do you just want a printout of a table? You could display it graphically, save it into a BMP format and print it out of Paint.

    Phat Nat
  • yoyo_ryuyoyo_ryu Member Posts: 18
    : : i have made a project which does the timetables for a school and i want to print the timetables using graphics. how can i do so?
    : : thanks
    : :
    :
    : Do you just want a printout of a table? You could display it graphically, save it into a BMP format and print it out of Paint.
    :
    : Phat Nat
    :
    yes i want a printout! how can i save it as a bmp in pascal?
  • Phat NatPhat Nat Member Posts: 757
    : : : i have made a project which does the timetables for a school and i want to print the timetables using graphics. how can i do so?
    : : : thanks
    : : :
    : :
    : : Do you just want a printout of a table? You could display it graphically, save it into a BMP format and print it out of Paint.
    : :
    : : Phat Nat
    : :
    : yes i want a printout! how can i save it as a bmp in pascal?
    :

    (Assuming you are using TP7/equivilant DOS based Pascal Compiler)

    After your program runs, put it into a window (not full screen) by hitting ALT-Enter, then hit ALT-Print Screen. This will copy the output to the clipboard. You can then go into Paint and hit paste and it will show your output, which you can then save or print.

    Phat Nat

  • yoyo_ryuyoyo_ryu Member Posts: 18
    : : : : i have made a project which does the timetables for a school and i want to print the timetables using graphics. how can i do so?
    : : : : thanks
    : : : :
    : : :
    : : : Do you just want a printout of a table? You could display it graphically, save it into a BMP format and print it out of Paint.
    : : :
    : : : Phat Nat
    : : :
    : : yes i want a printout! how can i save it as a bmp in pascal?
    : :
    :
    : (Assuming you are using TP7/equivilant DOS based Pascal Compiler)
    :
    : After your program runs, put it into a window (not full screen) by hitting ALT-Enter, then hit ALT-Print Screen. This will copy the output to the clipboard. You can then go into Paint and hit paste and it will show your output, which you can then save or print.
    :
    : Phat Nat
    :
    : yes i know that method but i want the user to be able to print it from pascal or at least to save the bmp hile running the program. then after saving the user will close the program and print it from paint.

    i need something to print the timetables(graphics mode).

  • Phat NatPhat Nat Member Posts: 757
    : : : : : i have made a project which does the timetables for a school and i want to print the timetables using graphics. how can i do so?
    : : : : : thanks
    : : : : :
    : : : :
    : : : : Do you just want a printout of a table? You could display it graphically, save it into a BMP format and print it out of Paint.
    : : : :
    : : : : Phat Nat
    : : : :
    : : : yes i want a printout! how can i save it as a bmp in pascal?
    : : :
    : :
    : : (Assuming you are using TP7/equivilant DOS based Pascal Compiler)
    : :
    : : After your program runs, put it into a window (not full screen) by hitting ALT-Enter, then hit ALT-Print Screen. This will copy the output to the clipboard. You can then go into Paint and hit paste and it will show your output, which you can then save or print.
    : :
    : : Phat Nat
    : :
    : : yes i know that method but i want the user to be able to print it from pascal or at least to save the bmp hile running the program. then after saving the user will close the program and print it from paint.
    :
    : i need something to print the timetables(graphics mode).

    Okay, well it all depends on your code. Are you currently displaying the tables from a 2D array in text mode? (For the rest of this post I will assume this)

    Okay, so since you are not in graphics mode, there are two ways to do this. Either you can switch to graphics mode and redisplay everything graphically and then save the screen to a BMP or since you are just using text characters, you could decipher the text characters into their bits and output that to a BMP file.

    Also, is there a reason as to why it HAS to be in graphics mode? You could just output the text characters directly to the printer. This would be alot easier and save you writing alot of code (aka graphic representation of characters & code to Save a BMP)

    Respond with detailed information & we can go from there. Include how you are saving/displaying the tables, whethere the printout has to be in text mode and any time limits set apon this assignment.

    Phat Nat

  • yoyo_ryuyoyo_ryu Member Posts: 18
    i am displaying the timetable in graphics mode. the table is made up of lines and text is outputted with the corresponding lesson.

    now i want the user to print the timetable. if possible i want him to print it directly from the program or else to save it as a bmp and print from paint. if a bmp is to be created i want it to be created not by using the print screen.

    the deadline for the project is next week. i have to do only the print
  • Phat NatPhat Nat Member Posts: 757
    [b][red]This message was edited by Phat Nat at 2006-1-27 17:35:9[/red][/b][hr]
    : i am displaying the timetable in graphics mode. the table is made up of lines and text is outputted with the corresponding lesson.
    :
    : now i want the user to print the timetable. if possible i want him to print it directly from the program or else to save it as a bmp and print from paint. if a bmp is to be created i want it to be created not by using the print screen.
    :
    : the deadline for the project is next week. i have to do only the print
    :

    Well then you just need to get a hold of the BMP format. I have worked with it before and it's basically raw data with a header put on it, so it won't be hard. Since you're already in graphics mode, all you need to do is create a BMP the size of the screen and copy the data from the screen to the file.

    Here's one site that lists the BMP header structure:
    http://astronomy.swin.edu.au/~pbourke/dataformats/bmp/

    One thing to remember is that BMPs are stored upside down or bottom-t-top. Once you write the screen/pic width & height to the file, all you need to do is read/write the screen line-by-line starting at the bottom of the screen and work upwards. If you declare the header as being an 8-bit file, you can directly copy one byte per pixel to the file.

    *Note* this assumes that you are using mode 13h (320x200 256 color). If you are using 640x480, it would probably be easier to store it as a 4 or 1-bit BMP file.

    Phat Nat

  • yoyo_ryuyoyo_ryu Member Posts: 18
    thank you so much. i ll try this method out and hope it will work :D

Sign In or Register to comment.