Thanks Allen

Paul

Allen wrote:
> First I have a container class with a time picker ocx or two on it. In the
> ocx mousedown I have the following
>  
> *** ActiveX Control Event ***
> LPARAMETERS button, shift, x, y
> this.Parent.isright = (button = 2)
> this.Parent.mouseleft = x
>
> In the click event
>
> *** ActiveX Control Event ***
> IF this.Parent.isright then
>       NODEFAULT
>       IF this.Parent.mouseleft <=12
>               DIMENSION lamenu(24)
>               lamenu(1) = "0"
>               lamenu(2) = "1"
>               lamenu(3) = "2"
>               lamenu(4) = "3"
>               lamenu(5) = "4"
>               lamenu(6) = "5"
>               lamenu(7) = "6"
>               lamenu(8) = "7"
>               lamenu(9) = "8"
>               lamenu(10) = "9"
>               lamenu(11) = "10"
>               lamenu(12) = "11"
>               lamenu(13) = "12"
>               lamenu(14) = "13"
>               lamenu(15) = "14"
>               lamenu(16) = "15"
>               lamenu(17) = "16"
>               lamenu(18) = "17"
>               lamenu(19) = "18"
>               lamenu(20) = "19"
>               lamenu(21) = "20"
>               lamenu(22) = "21"
>               lamenu(23) = "22"
>               lamenu(24) = "23"
>               coord.smenu.showmenu(@lamenu)
>               IF BAR() > 0
>                       this.Parent.timefrom.oBJECT.Hour=BAR()-1
>               endif
>       else
>               DIMENSION lamenu(12)
>               lamenu(1) = "0"
>               lamenu(2) = "5"
>               lamenu(3) = "10"
>               lamenu(4) = "15"
>               lamenu(5) = "20"
>               lamenu(6) = "25"
>               lamenu(7) = "30"
>               lamenu(8) = "35"
>               lamenu(9) = "40"
>               lamenu(10) = "45"
>               lamenu(11) = "50"
>               lamenu(12) = "55"
>               coord.smenu.showmenu(@lamenu)
>               IF BAR() > 0
>                       this.Parent.timefrom.oBJECT.Minute = (BAR()-1)*5
>               endif
>       endif
>       this.parent.starttime = this.hour * 100 + this.minute
> ENDIF
>
> Note that starttime is in the container class and a second one in my case
> has an endtime. You can play with the result to do what you need.
> Smenu is an adaption of the shortcut menu class that comes with VFP. A
> shortcut menu. Mouseleft is also a property of the container class to keep
> an eye on the position of the mouse during the mousedown.
> Simple really
> Allen
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
> Behalf Of Paul Newton
> Sent: 25 September 2007 20:30
> To: [EMAIL PROTECTED]
> Subject: Re: Date and time control
>
> Allen wrote:
>   
>> I used the MS date time picker control but added some right click 
>> menus to allow easy picking of the hour and minute.
>>   
>>     
> Would you care to share that, Allen ?
>
> No virus found in this outgoing message.
> Checked by AVG Free Edition. 
> Version: 7.5.488 / Virus Database: 269.13.30/1029 - Release Date: 24/09/2007
> 19:09
>  
>
>
>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to