Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Khurram Khan Khan
  Where is Khurram Khan Khan?
 Karachi
 Pakistan
 Khurram Khan Khan
 To: Kulwant Singh
  Where is Kulwant Singh?
 Shimla
 India
 Kulwant Singh
 Tags
Subject: RE: Calendar Control in VFP
Thread ID: 248804 Message ID: 248977 # Views: 1 # Ratings: 0
Version: Visual FoxPro 6 Category: Active X Controls & OLE Automation
Date: Saturday, December 26, 2009 8:34:17 AM         
   


please see image below
I want to show pic on commandbutton if date has single record then its ok but if date have multiple records(lawns)
select * from booking where Date == this.calendardate into cursor temp ORDER BY cncl
*if _tally != 0
IF booked=.t. AND cncl="BOOKED"
	this.backcolor = rgb(0, 128, 0)
scan
DO CASE  && Begins loop

   CASE INLIST(Lawn_no,'A')
    this.Picture="lawnA.jpg"
   
   CASE INLIST(Lawn_no,'B')
    this.Picture="lawnB.jpg"    
         
   CASE INLIST(Lawn_no,'C')
        this.Picture="lawnC.jpg"    
        
      CASE INLIST(Lawn_no,'A','B')
        this.Picture="lawnAB.jpg"    

      CASE INLIST(Lawn_no,'B','C')
       this.Picture="lawnBC.jpg" 
       
     CASE INLIST(Lawn_no,'A','C')
        this.Picture="lawnAC.jpg" 
       
     CASE INLIST(Lawn_no,'A','B','C')
        this.Picture="lawnABC.jpg" 
EndCase  
SKIP 1
endscan

else
	this.backcolor = rgb(236,233,216)
	IF booked=.t. AND cncl="CANCEL"
	this.backcolor = rgb(255,0,0)
	endif
ENDIF


> Hi Khurram,
>
> I am not Sure but.. You can try this and see if it works
>
>
clearcalendar() 
> 
> local i, x
> i = 1
> x = 1
> 
> for n = 0 to 43
>     if i < 7
> 		ExecuteDate = "thisform.nDay" + ALLTRIM(STR(x)) + ALLTRI(STR(i)) + "." + "caption"
> 		&ExecuteDate = ""
> 
> 		&&Add these two lines to the the clearcalendar function 
> 		Resetcolor = "thisform.nDay" + ALLTRIM(STR(x)) + ALLTRI(STR(i)) + "." + "backcolor"
> 		&Resetcolor = rgb(255, 255, 255)
> 	endif
> 	if x = 7
> 		i = i + 1
> 		x = 0
> 	endif
> 	x = x + 1
> endfor

>
>
>
>
> kulwant
> (Help Save the TIGER. Save Wildlife. Live & let Live)






ENTIRE THREAD

Calendar Control in VFP Posted by sunil madhav @ 12/23/2009 1:32:31 PM
RE: Calendar Control in VFP Posted by ho me @ 12/23/2009 2:41:02 PM
RE: Calendar Control in VFP Posted by Yuri Rubinov @ 12/23/2009 2:58:17 PM
RE: Calendar Control in VFP Posted by sunil madhav @ 12/30/2009 12:29:27 PM
RE: Calendar Control in VFP Posted by Yuri Rubinov @ 12/30/2009 2:28:30 PM
RE: Calendar Control in VFP Posted by Jun Tangunan @ 12/23/2009 4:03:43 PM
RE: Calendar Control in VFP Posted by kulwant singh @ 12/23/2009 5:48:39 PM
RE: Calendar Control in VFP Posted by Khurram Khan Khan @ 12/24/2009 9:14:46 AM
RE: Calendar Control in VFP Posted by kulwant singh @ 12/24/2009 6:55:54 PM
RE: Calendar Control in VFP Posted by Khurram Khan Khan @ 12/25/2009 1:50:16 PM
RE: Calendar Control in VFP Posted by Khurram Khan Khan @ 12/26/2009 8:34:17 AM
RE: Calendar Control in VFP Posted by kulwant singh @ 12/26/2009 3:14:43 PM
RE: Calendar Control in VFP Posted by M. Akram Bhatti @ 12/30/2009 1:00:56 PM