Jump to content

The form opens but the picture is not drawn


Recommended Posts

Posted (edited)

I try to make a drawing through the form, I made a code using DCL, the form itself opens, but the drawing does not appear. tell me please what i did wrong. 
I attach the code


 

(command "OPENDCL")
(defun c:Main ()
  (dcl_Project_Load "D:\Lb4" T)
  (dcl_Form_Show Lb4_Form1)
  (princ)
  )
 (defun c:Lb4/Form1/TextButton1#OnClicked (/)
    (setq CoordX (atof(dcl-Control-GetText Lb4/Form1/TextBox1)))
    (setq CoordY (atof(dcl-Control-GetText Lb4/Form1/TextBox2)))
    (setq d (atof(dcl-Control-GetText Lb4/Form1/TextBox3)))
    (setq a (atof(dcl-Control-GetText Lb4/Form1/TextBox4)))
    (setq b (atof(dcl-Control-GetText Lb4/Form1/TextBox5)))

(defun Lb4(d a b CoordX CoordY)

 (setq StartPoint (list CoordX CoordY))

 (command "circle" StartPoint (/ d 2))
 
 (setq p1 (list (- 0 (/ a 2)) (- 0 (/ b 2)))
       p2 (list (/ a 2) (/ b 2)))
  (command "rectang" p1 p2)
  (dcl_messagebox (strcat "done"))
  (dcl_Form_Close Lb4_Form1)
)
 )

 

Edited by SLW210
Code Tags!
Posted

Ask someone at OpenDCL site, perhaps Owen W.

Posted
1 hour ago, marko_ribar said:

Ask someone at OpenDCL site, perhaps Owen W.

 

 

Or at least post the code for the DCL as well, and perhaps what the command "openDCL" does.

Posted (edited)

in dcl this would need to be done when click OK not at end of code, (dcl_Form_Close Lb4_Form1) dont use Open_dcl.

 

Use (alert "all done") no need for open_dcl.

Edited by BIGAL

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...