Topic: can any one help make button switch like ON-OFF...with even

can any one help make button switch like ON-OFF...with even .

Re: can any one help make button switch like ON-OFF...with even

Not sure what you mean by "...with even", But you can place the following code in you button click script to simulate an On / Off switch. Obviously you would need to add other code to do something when it's ON and when it's OFF.

If Form1.Button1.Caption = 'On' then
        Form1.Button1.Caption := 'Off'
      else
        Form1.Button1.Caption := 'On';

Re: can any one help make button switch like ON-OFF...with even

yes thanks for this replay Mr.ehwagner..
i mean like make soft for hotel booking wich room is booking and wich is empty. i  thinking like that make button on-off
when i click button to be on is booking now if it is off is it empty the room. that i mean if you have more info to help i like

thanks

Re: can any one help make button switch like ON-OFF...with even

when i click  button to be off working good but when i close the software try againe open the software it to be on auto..i want when i click button to be off manually change to be on .after close the software.

5 (edited by tcoton 2016-04-16 08:31:36)

Re: can any one help make button switch like ON-OFF...with even

I would add a "status" column with a boolean value and a script to check the status on close and show, so if your room is booked, your status is '1' or 'booked' and your button becomes "Red" or "Booked" and its opposite; '0' for empty and button becomes "Green" or "Free".

Re: can any one help make button switch like ON-OFF...with even

Hello Megood

Does this zip meet your expectation ?

JB

Post's attachments

Attachment icon ROOMS.zip 336.08 kb, 478 downloads since 2016-04-16 

Re: can any one help make button switch like ON-OFF...with even

thanks Mr.jean.brezhonek for your support but i cant open this sample software sent me i get error whene open software ROOMS..look the image you see the error...

Post's attachments

Attachment icon errorr.png 17.23 kb, 336 downloads since 2016-04-16 

Re: can any one help make button switch like ON-OFF...with even

Which version are you using then?

Re: can any one help make button switch like ON-OFF...with even

Hi Megood70,
Try editing the .vdb file (use Notepad or something like that).
Change the line
Version=N
and replace N with the version of MVD you are using.
Derek.

Re: can any one help make button switch like ON-OFF...with even

i try but not work with add Version=N

Re: can any one help make button switch like ON-OFF...with even

now its working im install MVDB 2.4 THANKS FOR ALL