OpenDCL Forums

OpenDCL => Runtime/AutoLISP => Topic started by: JTHWAMAN on August 14, 2008, 05:35:22 AM

Title: "Modeless Forms" this "PictureBox" button, How not show be to "T" in "COMMAND" t
Post by: JTHWAMAN on August 14, 2008, 05:35:22 AM
I define "MouseEntered" and "MouseMovedOff" the event,
and opens "EventInvoke = 1 - Allow (Command...)",
But works as my mouse after "PictureBox" the image button,
actually can again "COMMAND" appear "T" the message.
how are close show "T" the message.
Requests fellow masters to explain, thanks!
Title: Re: "Modeless Forms" this "PictureBox" button, How not show be to "T" in "COMMAND" t
Post by: owenwengerd on August 14, 2008, 07:03:30 AM
What is the 'AutoLISP Function To Call' for the MouseEntered and MouseMovedOff events?
Title: Re: "Modeless Forms" this "PictureBox" button, How not show be to "T" in "COMMAND" t
Post by: JTHWAMAN on August 14, 2008, 08:00:51 AM

(defun C:MSF-ODCL_ONINITIALIZE (/)

(setvar "cmdecho" 0)

(dcl_Form_SetTitleBarText MSF-ODCL
(STRCAT "Function")
)
(dcl_control_setcaption LBE "")
(dcl_control_setpicture PB1 102)
(dcl_control_setpicture PB2 103)
(dcl_control_setpicture PB3 109)
(dcl_control_setpicture PB4 114)
(dcl_control_setpicture PB5 106)

)

;;;==================================================================
(defun c:PB4_OnClicked ( / )
(setvar "cmdecho" 0)
(COMMAND "_.LINE" "10,10" "50,50" "" )
)

;;;==================================================================
(defun c:PB4_OnMouseEntered ( / )
(setvar "cmdecho" 0)
(dcl_control_setpicture PB4 113)
(dcl_Control_SetCaption LBE "Function")
)

;;;==================================================================
(defun c:PB4_OnMouseMovedOff ( / )
(setvar "cmdecho" 0)
(dcl_control_setpicture PB4 114)
(dcl_control_setcaption LBE "")
)
Title: Re: "Modeless Forms" this "PictureBox" button, How not show be to "T" in "COMMAND" t
Post by: BazzaCAD on August 14, 2008, 09:38:36 AM
put a (PRINC) at the end of your events.
Title: Re: "Modeless Forms" this "PictureBox" button, How not show be to "T" in "COMMAND" t
Post by: JTHWAMAN on August 14, 2008, 03:44:37 PM
THANK "BazzaCAD"
How cause it not to be add show "command" ?
Title: Re: "Modeless Forms" this "PictureBox" button, How not show be to "T" in "COMMAND" t
Post by: JTHWAMAN on August 22, 2008, 08:00:57 AM

How closes mouse touch button the null message to command

code:
;;;====================================
(defun SHOW_PB4T_OnClicked ()
(setvar "cmdecho" 0)
(command "undo" "be")
(setq oldlayer (getvar "clayer"))
(setq oldosmode (getvar "osmode"))
(ALERT oldlayer)
)

;;;====================================
(defun c:PB4T_OnClicked ( / )
(SHOW_PB4T_OnClicked)
(PRINC))

;;;====================================
(defun c:PB4T_OnMouseEntered ( / )
(dcl_control_setpicture PB4T 113)
(PRINC))

;;;====================================
(defun c:PB4T_OnMouseMovedOff ( / )
(dcl_control_setpicture PB4T 114)
(PRINC))

;;;====================================
(defun C:MSF-ODCL_042T_ONINITIALIZE (/)
(dcl_control_setpicture PB4T 114)
(PRINC))

;;;====================================
(DEFUN C:ODCL_042T ( / )
(or loadruntime (load "_OpenDclUtils.lsp" ) (exit))
(LoadRunTime)
(dcl_project_load "ODCL_042T.odcl" T)
(dcl_FORM_SHOW MSF-ODCL_042T)
(PRINC))
Title: Re: "Modeless Forms" this "PictureBox" button, How not show be to "T" in "COMMAND" t
Post by: BazzaCAD on August 22, 2008, 08:07:33 AM
I be leave because the DEFUNS are commands C: and they always give a new line.
So there's not much you can do about it, unless someone has anther solution, that I don't know about.
Title: Re: "Modeless Forms" this "PictureBox" button, How not show be to "T" in "COMMAND" t
Post by: owenwengerd on August 22, 2008, 09:43:05 AM
There is no way to prevent the blank line for modeless form events. Instead of using the mouse events for changing the picture, try simply setting the Picture and Mouse-Over Picture properties of the graphic button.
Title: Re: "Modeless Forms" this "PictureBox" button, How not show be to "T" in "COMMAND" t
Post by: JTHWAMAN on August 25, 2008, 03:43:10 PM
HI ~ owenwengerd
please asked how may demonstrate operates?
Thanks!
Title: Re: "Modeless Forms" this "PictureBox" button, How not show be to "T" in "COMMAND" t
Post by: Fred Tomke on August 25, 2008, 11:16:45 PM
Hi JTHWAMAN,
I believe that Owen thought that you only change the pictures while OnMouseEntered and OnMouseMovedOff is running.


But this is only a solution if you change pictures while OnMouse-events.

I hope it is understandable.

Fred
Title: Re: "Modeless Forms" this "PictureBox" button, How not show be to "T" in "COMMAND" t
Post by: Fred Tomke on August 26, 2008, 05:49:28 AM
Hello,

I see, you're online  :) .
Why is it necessary that EventInvoke is set to AllowCommand in this case?

Fred
Title: Re: "Modeless Forms" this "PictureBox" button, How not show be to "T" in "COMMAND" t
Post by: JTHWAMAN on August 26, 2008, 03:46:49 PM
Thank Fred

i no Finds MouseOverPicture property.
How setup MouseOverPicture property ?

Quote from: Fred Tomke on August 26, 2008, 05:49:28 AM
Why is it necessary that EventInvoke is set to AllowCommand in this case?

Fred



How are no setup AllowCommand ,
Also may carry out the "command" function ?

Title: Re: "Modeless Forms" this "PictureBox" button, How not show be to "T" in "COMMAND" t
Post by: Fred Tomke on August 26, 2008, 10:52:28 PM
Ah, ok, we forgot that it is a picturebox control and not an imagebutton. Image buttons have a MouseOverPicture property, pictureboxes have not.

QuoteHow are no setup AllowCommand ,

Have a look at your picture (http://www.opendcl.com/forum/index.php?action=dlattach;topic=407.0;attach=459). Just select the picturebox and change the property's value from 1 (Allow command) to 0 (Keep focus).

QuoteAlso may carry out the "command" function ?

I didn't quite understand what you mean.

Fred