True
Timer8.Enabled=False
EndSub
PrivateSubText1_Change()
txt_Sub
s_Disp
EndSub
PrivateSubText2_Change()
txt_Sub
If(Val(Text3.Text)>UpDown3.Max)Then
Text3.Text=Str(UpDown3.Max)
EndIf
s_Disp
EndSub
PrivateSubText3_Change()
s_Disp
EndSub
PrivateSubTimer1_Timer()
DimtextTimeAsString,hAsInteger,mAsInteger,sAsInteger
DimhhAsString,mmAsString,ssAsString,zIsAsInteger
fhHour=Hour(Now)
fhMin=Minute(Now)
fhSec=Second(Now)
If(fhHourMod2)=1Then
zIs=(fhHour+1)/2
Else
IffhHour=0Then
zIs=12
Else
zIs=fhHour/2
EndIf
EndIf
G_z.Caption=ziShi+Zhi(zIs-1)+"时"
If(fhHour<10)Then
fhHour1=0
fhHour2=fhHour
Else
fhHour1=Int(fhHour/10)
fhHour2=fhHour-fhHour1*10
EndIf
If(fhMin<10)Then
fhMin1=0
fhMin2=fhMin
Else
fhMin1=Int(fhMin/10)
fhMin2=fhMin-fhMin1*10
EndIf
If(fhSec<10)Then
fhSec1=0
fhSec2=fhSec
Else
fhSec1=Int(fhSec/10)
fhSec2=fhSec-fhSec1*10
EndIf
ShowNumwPw1(color_index),C_clock,fhHour1,color1,1
ShowNumwPw1(color_index),C_clock,fhHour2,color1,2
ShowNumwPw1(color_index),C_clock,fhMin1,color1,4
ShowNumwPw1(color_index),C_clock,fhMin2,color1,5
ShowNumSwPw2(color_index),SecP,fhSec1+1,color1,2
ShowNumSwPw2(color_index),SecP,fhSec2+1,color1,3
ShowNumwPw1(color_index),C_clock,10,color1,3
IfflAge=TrueThen
ShowNumSwPw2(color_index),SecP,0,color1,1
flAge=False
Else
ShowNumSwPw2(color_index),SecP,11,color1,1
flAge=True
EndIf
EndSub
PrivateSubTimer2_Timer()
Dimfhsec4,fhsec5
If(fhSec3<10)Then
fhsec4=0
fhsec5=fhSec3
Else
fhsec4=Int(fhSec3/10)
fhsec5=fhSec3-fhsec4*10
EndIf
ShowNumSwPw2(color_index),mSecP,fhsec4+1,color1,1
ShowNumSwPw2(color_index),mSecP,fhsec5+1,color1,2
IffhSec3>99Then
fhSec3=0
Else
fhSec3=fhSec3+1
EndIf
EndSub
PrivateSubTimer8_Timer()
Dimss
L1.X1=234+5*Sin(6*Second(Now)*Pi/180)
L1.Y1=21-5*Cos(6*Second(Now)*Pi/180)
L1.X2=234+18*Sin(6*Second(Now)*Pi/180)
L1.Y2=21-18*Cos(6*Second(Now)*Pi/180)
L2.X1=234-2*Sin(6*Minute(Time)*Pi/180)
L2.Y1=21+2*Cos(6*Minute(Time)*Pi/180)
L2.X2=234+15*Sin(6*Minute(Time)*Pi/180)
L2.Y2=21-15*Cos(6*Minute(Time)*Pi/180)
ss=Hour(Time)
Ifss>12Thenss=ss-12
L3.X1=234-2*Sin(ss*30*Pi/180+Minute(Time)/2*Pi/180)
L3.Y1=21+2*Cos(ss*30*Pi/180+Minute(Time)/2*Pi/180)
L3.X2=234+11*Sin(ss*30*Pi/180+Minute(Time)/2*Pi/180)
L3.Y2=21-11*Cos(ss*30*Pi/180+Minute(Time)/2*Pi/180)
EndSub
PublicSubdisPlay(kDayAsDate)
DimmY1AsInteger,mY2AsInteger,dY1AsInteger,dY2AsInteger,wYAsInteger
DimtemPAsString,temP1AsInteger,temP2AsString,temP3AsString,temP4AsString,temP5AsString
ShowNumwPw1(color_index),G_y,Val(Mid(Trim(Str(Year(kDay))),1,1)),1,1
ShowNumwPw1(color_index),G_y,Val(Mid(Trim(Str(Year(kDay))),2,1)),1,2
ShowNumwPw1(color_index),G_y,Val(Mid(Trim(Str(Year(kDay))),3,1)),1,3
ShowNumwPw1(color_index),G_y,Val(Mid(Trim(Str(Year(kDay))),4,1)),1,4
IfMonth(kDay)<10Then
mY1=0
mY2=Month(kDay)
Else
mY1=Int(Month(kDay)/10)
mY2=Int(Month(kDay)Mod10)
EndIf
ShowNumwPw1(color_index),G_m,mY1,color1,1
ShowNumwPw1(color_index),G_m,mY2,1,2
IfDay(kDay)<10Then
dY1=0
dY2=Day(kDay)
Else
dY1=Int(Day(kDay)/10)
dY2=Int(Day(kDay)Mod10)
EndIf
ShowNumwPw1(color_index),G_d,dY1,1,1
ShowNumwPw1(color_index),G_d,dY2,1,2
Gl_j.Caption="今日是:"+ssFtv(Month(kDay),Day(kDay))
J_q.Caption=seaSonYx(kDay)
'----------------------------------------------------------------------
temP=sdayF(Year(kDay),Month(kDay),Day(kDay))
Ljf.Caption=seaSonYxr(kDay)
temP1=Val(Trim(Mid(temP,1,4)))
temP2=Trim(Mid(temP,10,2))
temP3=Trim(Mid(temP,20,2))
temP4=Trim(Mid(temP,9,1))
temP5=Trim(Mid(temP,17,3))
IftemP5="Big"Then
temP5="大"
Else
temP5="小"
EndIf
IftemP4="Y"Then
ziShi=yTGDZ(temP1)+"年润"+nStr1(Val(temP2))+"月"+temP5+sdayF_gzr(kDay)+"日"
Else
ziShi=yTGDZ(temP1)+"年"+sdayF_gzm(temP1,Val(temP2))+"月"+temP5+sdayF_gzr(kDay)+"日"
EndIf
ShowNumwPw1(color_index),N_y,Val(Mid(Trim(Str(temP1)),1,1)),1,1
ShowNumwPw1(color_index),N_y,Val(Mid(Trim(Str(temP1)),2,1)),1,2
ShowNumwPw1(color_index),N_y,Val(Mid(Trim(Str(temP1)),3,1)),1,3
ShowNumwPw1(color_index),N_y,Val(Mid(Trim(Str(temP1)),4,1)),1,4
ShowNumGzwPw1(6),Gz,((temP1-1900)Mod12),1,1
mY1=Val(Left(temP2,1))
mY2=Val(Right(temP2,1))
ShowNumwPw1(color_index),N_m,mY1,color1,1
ShowNumwPw1(color_index),N_m,mY2,1,2
dY1=Val(Left(temP3,1))
dY2=Val(Right(temP3,1))
ShowNumwPw1(color_index),N_d,dY1,1,1
ShowNumwPw1(color_index),N_d,dY2,1,2
Nl_j.Caption="今日是:"+llFtv(Val(temP2),Val(temP3))
Label2.Caption=Str(Len(Trim(temP)))+""+Str(LenB(Trim(temP)))+""+temP+vbCrLf+Str(temP1)+""+Str(temP2)+""+Str(temP3)
'---------------------------------------------------------------------------
wY=Weekday(kDay)
SelectCasewY
Case2,3,4,5,6,7
ShowNumWwPw1(0),Week_p,wY-1,1,1
ShowNumWswPw1(2),wWeekP,wY-2
Case1
ShowNumWwPw1(0),Week_p,0,1,1
ShowNumWswPw1(2),wWeekP,6
EndSelect
EndSub
PrivateSubRunMain(picScrollAsPictureBox)
'滚动字幕
DimLastFrameTimeAsLong
ConstIntervalTimeAsLong=40
DimrtAsLong
DimDrawingRectAsRECT
DimUpperXAsLong,UpperYAsLong'Upperleftpointofdrawingrect
DimRectHeightAsLong
Form1.Refresh
rt=DrawText(picScroll.hdc,ScrollText,-1,DrawingRect,DT_CALCRECT)
Ifrt=0Then'err
MsgBox"Errorscrollingtext",vbExclamation
EndingFlag=True
Else
DrawingRect.Top=picScroll.ScaleHeight
DrawingRect.Left=0
DrawingRect.Right=picScroll.ScaleWidth
RectHeight=DrawingRect.Bottom
DrawingRect.Bottom=DrawingRect.Bottom+picScroll.ScaleHeight
EndIf
DoWhileNotEndingFlag
IfGetTickCount()-LastFrameTime>IntervalTimeThen
picScroll.Cls
DrawTextpicScroll.hdc,ScrollText,-1,DrawingRect,DT_CENTER'OrDT_WORDBREAKDT_SINGLELINEAnd
DrawingRect.Top=DrawingRect.Top-1
DrawingRect.Bottom=DrawingRect.Bottom-1
IfDrawingRect.Top<-(RectHeight)Then'timetoreset
DrawingRect.Top=picScroll.ScaleHeight
DrawingRect.Bottom=RectHeight+picScroll.ScaleHeight
EndIf
picScroll.Refresh
LastFrameTime=GetTickCount()
EndIf
DoEvents
Loop
EndSub
PrivateSubTimer3_Timer()
DimheiAsInteger
tiAo=False
Form1.Height=Form1.Height-50
hei=ScaleY(Form1.Height,vbTwips,vbPixels)-Picture4.Height',vbTwips,vbPixels)
Picture4.Top=hei-2'Picture4.Top+1
IfForm1.Height<2745Then
Timer3.Enabled=False
Label4.Enabled=True
cmdT.Enabled=True
EndIf
EndSub
PrivateSubTimer4_Timer()
Dimhei,w,h
tiAo=True
IfForm1.Height>5065Then
Timer4.Enabled=False
Else
Form1.Height=Form1.Height+50
hei=ScaleY(Form1.Height,vbTwips,vbPixels)-Picture4.Height',vbTwips,vbPixels)
Picture4.Top=hei'Picture4.Top+1
EndIf
EndSub
PrivateSubTimer5_Timer()
Dimhei,w,h
jiSuan=True
IfForm1.Height>=6225Then
Timer5.Enabled=False
hei=Int(ScaleY(Form1.Height,vbTwips,vbPixels))-Picture5.Height',vbTwips,vbPixels)
Label3.Caption=Str(Picture5.Height)&Str(ScaleY(Form1.Height,vbTwips,vbPixels))&""&Str(hei)
Picture5.Top=hei'-70'Picture4.Top+1
Else
Form1.Height=Form1.Height+50
hei=Int(ScaleY(Form1.Height,vbTwips,vbPixels))-Picture5.Height',vbTwips,vbPixels)
Label3.Caption=Str(Picture5.Height)&Str(ScaleY(Form1.Height,vbTwips,vbPixels))&""&Str(hei)
Picture5.Top=hei'-70'Picture4.Top+1
EndIf
EndSub
PrivateSubTimer6_Timer()
Dimhei
Pt.Visible=False
jiSuan=False
Form1.Height=Form1.Height-50
hei=Int(ScaleY(Form1.Height,vbTwips,vbPixels)-Picture5.Height)',vbTwips,vbPixels))
Label3.Caption=Str(Picture5.Height)&Str(ScaleY(Form1.Height,vbTwips,vbPixels))&""&Str(hei)
Picture5.Top=hei'-70
IfForm1.Height<2745Then
Timer6.Enabled=False
Label4.Enabled=True
cmdT.Enabled=True
EndIf
EndSub
PrivateSubTimer7_Timer()
IfS_mem<>0Then
ShowNumSamwPw2(1),Pt,16,1,-1
Else
ShowNumSamwPw2(1),Pt,17,1,-1
EndIf
Iftip>0Then
tip=tip+1
EndIf
Iftip>2Then
frmTip.Show
tip=-1
EndIf
EndSub
PrivateSubtxtDisp_Change()
DimdeLcAsString,iAsInteger,kLAsInteger
Fori=24To14Step-1
If(i-23+Len(Trim(txtDisp.Text)))>0Then
deLc=Mid(txtDisp.Text,i-23+Len(Trim(txtDisp.Text)),1)
Label3.Caption=Str(Len(Trim(txtDisp.Text)))
Else
deLc=""
EndIf
SelectCasedeLc
Case"1","2","3","4","5","6","7","8","9","0"
kL=Val(deLc)
ShowNumC2wPw1(1),Pt,kL,1,i-9
Case"."
ShowNumC2wPw1(1),Pt,11,1,i-9
Case"E"
ShowNumC2wPw1(1),Pt,13,1,i-9
Case"+"
ShowNumC2wPw1(1),Pt,14,1,i-9
Case"-"
ShowNumC2wPw1(1),Pt,15,1,i-9
CaseElse
ShowNumC2wPw1(1),Pt,12,1,i-9
EndSelect
Nexti
Fori=13To1Step-1
If(i-23+Len(Trim(txtDisp.Text)))>0Then
deLc=Mid(txtDisp.Text,i-23+Len(Trim(txtDisp.Text)),1)
Label3.Caption=Str(Len(Trim(txtDisp.Text)))
Else
deLc=""
EndIf
SelectCasedeLc
Case"1","2","3","4","5","6","7","8","9","0"
kL=Val(deLc)
ShowNumCwPw1(1),Pt,kL,1,i
Case"."
ShowNumCwPw1(1),Pt,11,1,i
Case"E"
ShowNumCwPw1(1),Pt,13,1,i
Case"+"
ShowNumCwPw1(1),Pt,14,1,i
Case"-"
ShowNumCwPw1(1),Pt,15,1,i
CaseElse
ShowNumCwPw1(1),Pt,12,1,i
EndSelect
Nexti
'小字符显示
Fori=24To1Step-1
If(i-23+Len(Trim(txtDisp.Text)))>0Then
deLc=Mid(txtDisp.Text,i-23+Len(Trim(txtDisp.Text)),1)
Label3.Caption=Str(Len(Trim(txtDisp.Text)))
Else
deLc=""
EndIf
SelectCasedeLc
Case"1","2","3","4","5","6","7","8","9","0"
kL=Val(deLc)
ShowNumSamwPw2(1),Pt,kL+1,1,i
Case"."
ShowNumSamwPw2(1),Pt,14,1,i
Case"E"
ShowNumSamwPw2(1),Pt,12,1,i
Case"+"
ShowNumSamwPw2(1),Pt,13,1,i
Case"-"
ShowNumSamwPw2(1),Pt,15,1,i
CaseElse
ShowNumSamwPw2(1),Pt,0,1,i
EndSelect
Nexti
EndSub
PublicSubSetAutoRgn(hFormAsForm,OptionaltransColorAsByte=vbNull)
DimxAsLong,yAsLong
DimRgn1AsLong,Rgn2AsLong
DimSPosAsLong,EPosAsLong
DimbmAsBITMAP
DimhbmAsLong
DimWidAsLong,HgtAsLong
'获取窗体背景图片尺寸
hbm=hForm.Picture
GetObjectAPIhbm,Len(bm),bm
Wid=bm.bmWidth'ScaleX(Picture2.Width,vbTwips,vbPixels)
Hgt=bm.bmHeight'ScaleY(Picture2.Height,vbTwips,vbPixels)
ReDimbmByte(1ToWid,1ToHgt)
GetBitmapBitshForm.Picture,Wid*Hgt,bmByte(1,1)'获取图像数组
IftransColor=vbNullThentransColor=bmByte(1,1)
Rgn1=CreateRectRgn(0,0,0,0)
Fory=1ToHgt'逐行扫描
x=0
Do
x=x+1
While(bmByte(x,y)=transColor)And(x
transColor)And(x=Wid
Nexty
SetWindowRgnhForm.hwnd,Rgn1,True'设定窗体形状区域
DeleteObjectRgn1
EndSub
PublicSubJi_suan()
f=""
txtDisp.Text=e
op=""
chk=1
EndSub
PublicSubtxt_Sub()
SelectCaseVal(Text2.Text)
Case1,3,5,7,8,10,12
UpDown3.Max=31
Case4,6,9,11
UpDown3.Max=30
Case2
If((Val(Text1.Text)Mod4)=0)And((Val(Text1.Text)Mod100)<>0)Or((Val(Text1.Text)Mod400)=0)Then
UpDown3.Max=29
Else
UpDown3.Max=28
EndIf
EndSelect
EndSub
PublicSubs_Disp()
DimkDay1AsDate,skDay1AsString
Text4.Text=sdayF(Val(Text1.Text),Val(Text2.
上一篇:vb公交车查询系统vb+access源代码+可执行程序+论文+开题报告+外文翻译+答辩ppt(论文和程序)
下一篇:法律专业开题报告范文