با کسب اجازه از حامد عزیزم من هم کدهایی که دارم را در این تاپیک که ایده قشنگ ایشان بود می زارم
این کد یک فرم با عکس که از روی هارد می دهیم می سازد و با کارکترها طوری کار می کند که انگار روی عکس برف در حال باریدن است
************************************************** ********
** Author : Ramani (Subramanian.G)
** FoxAcc Software / Winners Software
** Type : Freeware with reservation to Copyrights
** Warranty : Nothing implied or explicit
************************************************** ********
tCaption1 = "Seasons Greetings .. "
tCaption2 = ".. & Happy New Year - Ramani"
tImage = "G:\picture\new pic\ XP Wallpapers\0002.jpg"
=gsGreet(tCaption1,tCaption2,tImage)
**********************************************
**********************************************
** gsGreet.PRG
** How to run ..
** =gsGreet(tCaption1,tCaption2,tImage)
** You can use your own Bmp or Gif file
** You can also save the picture above as xmas.jpg
** by right click mouse over it and save that
** in the same place as you save this prg.
**********************************************
* Greetings Card form
PROCEDURE gsGreet
PARAMETERS tCaption1, tCaption2, tImage
PUBLIC oform1
oform1=NEWOBJECT("gForm",'','',tCaption1,tCaption2 , tImage)
oForm1.TitleBar = 0 && if you wish to have no titlebar
oform1.Show
RETURN
**********************************************
**********************************************
DEFINE CLASS gForm AS form
Height = 454
Width = 633
DoCreate = .T.
BackColor = RGB(0,0,128)
Name = "Greetings"
cSnow = "'"
nSnow = 0
nSnowFont = 20
Add object Text1 as label with ;
AutoSize = .T., ;
BackStyle = 0, ;
FontBold = .T., ;
FontItalic = .T., ;
FontSize = 24, ;
Left = 24, ;
Name = "Text1"
Add object Text2 as label with ;
AutoSize = .T., ;
BackStyle = 0, ;
FontBold = .T., ;
FontItalic = .T., ;
FontSize = 24, ;
Left = 96, ;
Name = "Text2"
PROCEDURE init
LPARAMETERS tCaption1, tCaption2, tGif
IF EMPTY(tCaption2)
tCaption2 = "from Ramani (Subramanian.G)"
ENDIF
IF EMPTY(tCaption1)
tCaption1 = "Greetings !!!"
ENDIF
WITH ThisForm
.Text1.Caption = tCaption1
.Text2.Caption = tCaption2
.Text1.Top = .Height - 72
.Text2.Top = .Height -36
IF !FILE(tGif)
.cSnow = "*"
.nSnowFont = 36
ELSE
.BackColor = RGB(253,254,249)
.ADDOBJECT("Image1","Image")
WITH .Image1
.Picture = tGif
.Stretch = 2
.Width = ThisForm.Width
.Height = ThisForm.Height - 72
.Top = 0
.Left = 0
.Zorder(1)
.Visible = .t.
ENDWITH
ENDIF
**
.nSNow = 50 && Max of t*i
x = 1
FOR t=0 TO 5
FOR I=1 TO 10
cI = ALLTRIM(STR((t*10)+I))
.ADDOBJECT("greet&cI","LABEL")
.greet&cI..AutoSize = .T.
.greet&cI..BackStyle = 0
.greet&cI..FontSize = ThisForm.nSnowFont
.greet&cI..Caption = ThisForm.cSnow
.greet&cI..Left = (i*50) + (10*rand())
.greet&cI..Top = (t*90) + (10*rand())
.greet&cI..Name = "greet&cI"
.greet&cI..ForeColor = RGB(255,255,255)
.greet&cI..Visible = .t.
ENDFOR
ENDFOR
.ADDOBJECT("Timer1","Timer1")
ENDWITH
ENDPROC
PROCEDURE KeyPress
LPARAMETERS nKeyCode, nShiftAltCtrl
IF nKeyCode = 27
ThisForm.Release()
ENDIF
ENDPROC
ENDDEFINE
**********************************************
DEFINE CLASS timer1 AS Timer
Interval = 100
Name = "Timer1"
PROCEDURE Timer
WITH ThisForm
.Text2.forecolor = .Text1.ForeColor
DO CASE
CASE .Text1.forecolor=16711680
.Text1.forecolor=255
CASE .Text1.forecolor=255
.Text1.forecolor=8421376
CASE .Text1.forecolor=8421376
.Text1.forecolor=8388863
OTHERWISE
.Text1.forecolor=16711680
ENDCASE
ENDWITH
**
FOR i= 1 TO ThisForm.nSnow
zm_g='thisform.greet'+alltrim(str(i))
zm_gl=zm_g+'.left'
IF &zm_gl<572
&zm_gl=&zm_gl+10*rand()
ELSE
&zm_gl=1
ENDIF
zm_gl=zm_g+'.top'
IF &zm_gl<392
&zm_gl=&zm_gl+10*rand()
ELSE
&zm_gl=1
ENDIF
ENDFOR
ENDPROC
ENDDEFINE
**********************************************
** EOF
**********************************************