home *** CD-ROM | disk | FTP | other *** search
/ Corel Draw 6 / corel-draw-6-cd1.iso / photopnt / filenew.csc < prev    next >
Text File  |  1995-08-18  |  2KB  |  70 lines

  1. REM Simulates the filenew box in photopaint
  2. REM Filenew.csc 24 MAY, 1995
  3.  
  4. REM Once all of the options are selected, the new file is generated
  5.  
  6. DIM types(6) AS STRING, papertypes(6) AS INTEGER
  7.  
  8. REM all the types of images
  9. types(1) = "24-bit"
  10. types(2) = "Grayscale"
  11. types(3) = "Black and White"
  12. types(4) = "256 color"
  13. types(5) = "32 bit"
  14. types(6) = "16 color"
  15.  
  16. REM These are used to convert the types into what paint wants
  17. papertypes(1) = 5
  18. papertypes(2) = 9
  19. papertypes(3) = 8
  20. papertypes(4) = 5
  21. papertypes(5) = 3
  22. papertypes(6) = 5
  23.  
  24. REM Defaults
  25. width = "860"
  26. height = "504"
  27. hres = "72"
  28. vres = "72"
  29. red = "255"
  30. green = "255"
  31. blue = "255"
  32. k = "0"
  33. index% = 1
  34.  
  35.  
  36.  
  37. BEGIN DIALOG Dialog1 56, 10, 110, 212, "My FileNew Dialog"
  38.     TEXT           16, 7, 40, 8, "Width"
  39.     TEXTBOX        58, 7, 40, 13, width$
  40.     TEXT           16, 25, 40, 8, "Height"
  41.     TEXTBOX        58, 25, 40, 13, height$
  42.     TEXT           16, 153, 40, 8, "Type"
  43.     DDLISTBOX      48, 151, 55, 72, types, index%
  44.     TEXT           16, 43, 40, 8, "HRes"
  45.     TEXTBOX        58, 43, 40, 13, hres$
  46.     TEXT           16, 62, 40, 8, "VRes"
  47.     TEXTBOX        58, 61, 40, 13, vres$
  48.     TEXT           16, 81, 40, 8, "Paper Red"
  49.     TEXTBOX        58, 79, 40, 13, red$
  50.     TEXT           16, 99, 40, 8, "Paper Green"
  51.     TEXTBOX        58, 97, 40, 13, green$
  52.     TEXT           16, 118, 40, 8, "Paper Blue"
  53.     TEXTBOX        58, 115, 40, 13, blue$
  54.     TEXT           16, 134, 40, 8, "Paper K"
  55.     TEXTBOX        58, 133, 40, 13, k$
  56.     OKBUTTON       30, 175, 50, 20    
  57. END DIALOG
  58.  
  59. ret = DIALOG(dialog1)
  60.  
  61. IF ret = 2 THEN STOP
  62. typepaper = index
  63. papertype = papertypes(index)
  64.  
  65. REM Simply pass the Dialog box results with the .FileNew command.
  66. WITHOBJECT PAINT
  67.     .FileNew VAL(width), VAL(height), typepaper, VAL(hres), VAL(vres), 0,0,0, -1, -1, -1, -1, VAL(red), VAL(green), VAL(blue), VAL(k)
  68. END WITHOBJECT
  69. STOP
  70.