"Modeless Forms" this "PictureBox" button, How not show be to "T" in "COMMAND" t

Started by JTHWAMAN, August 14, 2008, 05:35:22 AM

Previous topic - Next topic

JTHWAMAN

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!

owenwengerd

What is the 'AutoLISP Function To Call' for the MouseEntered and MouseMovedOff events?
Owen Wengerd (Outside The Box) / ManuSoft

JTHWAMAN


(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 "")
)

BazzaCAD

a.k.a.
Barry Ralphs
barryDOTralphsATgmailDOTcom

JTHWAMAN


JTHWAMAN


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))

BazzaCAD

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.
a.k.a.
Barry Ralphs
barryDOTralphsATgmailDOTcom

owenwengerd

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.
Owen Wengerd (Outside The Box) / ManuSoft

JTHWAMAN


Fred Tomke

Hi JTHWAMAN,
I believe that Owen thought that you only change the pictures while OnMouseEntered and OnMouseMovedOff is running.


  • Open the project file in the OpenDCL Studio.
  • Select the PB4T control.
  • Select the event tab.
  • Deactivate OnMouseEntered event.
  • Deactivate OnMouseMovedOff event.
  • Select the properties tab.
  • Set Picture property to 114.
  • Set MouseOverPicture property to 113.
  • Save the project.
  • Use (dcl_project_load "ODCL_042T.odcl" T) to reload the project explicitly.
  • Then it will work.

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

I hope it is understandable.

Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

Fred Tomke

Hello,

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

Fred
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]

JTHWAMAN

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 ?


Fred Tomke

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. 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
Fred Tomke
Dipl.-Ing. (FH) Landespflege

[ landscaper - landscape developer - digital landscape and urban design]