vb日历程序小程序,对vb时间控件学习很有用PrivateSubpicMonth_Paint() DimiAsInteger,jAsInteger,xAsInteger,yAsInteger DimNumDaysAsInteger,CurrPosAsInteger,bCurrMonthAsBoolean DimMonthStartAsDate,bufferAsString 'Determineifthismonthistoday'smonth IfMonth(m_CurrDate)=Month(Date)AndYear(m_CurrDate)=Year(Date)Then bCurrMonth=True EndIf 'Getfirstdateinthemonth MonthStart=DateSerial(Year(m_CurrDate),Month(m_CurrDate),1) 'Numberofdaysinthemonth NumDays=DateDiff("d",MonthStart,DateAdd("m",1,MonthStart)) 'Getfirstweekdayinthemonth(0-based) j=Weekday(MonthStart)-1 'Tweakfor1-basedFor/Nextindex &n