Author Topic: PictureBox Not Showing Picture  (Read 2993 times)

0 Members and 1 Guest are viewing this topic.


  • Newt
  • Posts: 155
PictureBox Not Showing Picture
« on: October 20, 2023, 01:30:18 PM »
I'm just starting out with OpenDCL and am trying to get an image loaded into a form. This should work but it doesn't and I can't figure out why. I posted this over at the AD forum as well and have had a bit of help from the good folks over there, hence the saved string variables and hard coded paths.

The DCL opens with an empty picturebox then I get an error after closing.

What am I missing?

Code: [Select]
(defun c:ODCT ( / fileName imgName)
  (command "_OPENDCL")
  (setq fileName "C:\\PRD\\Apps\\LISP\\ODCT.ODCL")
  (setq imgName "C:\\PRD\\Apps\\LISP\\TestLogo.png")
    ((not (findfile fileName)) (alert (princ "\nProject File not found.")))
    ((not (findfile imgName)) (alert (princ "\nImage File not found.")))
      (dcl_Project_Load fileName T)
      (dcl-Form-Show ODCT/Form1)
      (dcl-PictureBox-LoadPictureFile ODCT/Form1/PictureBox1 imgName T)
  (prompt "\nODCT Complete.")