Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Happy Diwali to All

Status
Not open for further replies.

ramani

Programmer
Mar 15, 2001
4,336
0
0
AE
Today we have an Indian Festival called Diwali.
Diwali is a festival of lights.
A large number of people also have Lakshmi Pooja.
Lakshmi is Goddess of 'money' and 'wealth'.
Those who do this and have business, start their new book-keeping records this day.

I wish all those Indians who visit here a Happy Diwali and share the festive mood with all members here.

You can copy and run the following code for fun.
A VFP way of greeting (part of these code credit shared with Monikai, a member of out forum.)

The greetings card's first three lines can be changed to fit with the occassion. (tCaption1,tCaption2,tGif values).

This can be incoprporated in applications and used for flashing NewYear or Christmas messages based on Date value and passing the string values as parameters.
Suitably Star-out in the below code..

If you have a small gif file to go with the occassion, you can use it as well. The absence of gif will not create any error.

**********************************************
tCaption1 = "Dear Tek-Tips members & visitors"
tCaption2 = " ..... Happy Diwali - Ramani"
tGif = "diwali.gif" && dont worry about its absence
**********************************************
** Greeting.PRG
** How to run ..
** =Greeting("Happy Diwali",".......... from Ramani")
**********************************************
** Greetings Card form
** PARAMETERS tCaption1, tCaption2, tGif

PUBLIC oform1
oform1=NEWOBJECT("gForm",'','',tCaption1,tCaption2, tGif)
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(255,192,128)
Name = "Greetings"
cSnow = "'"
nSnow = 0
nSnowFont = 20

Add object Text1 as label with ;
AutoSize = .T., ;
BackStyle = 0, ;
FontBold = .T., ;
FontItalic = .T., ;
FontSize = 28, ;
Name = "Text1"

Add object Text2 as label with ;
AutoSize = .T., ;
BackStyle = 0, ;
FontBold = .T., ;
FontItalic = .T., ;
FontSize = 28, ;
Left = 96, ;
Top = 216, ;
Name = "Text2"

PROCEDURE init
PARAMETERS tCaption1, tCaption2, tGif

IF EMPTY(tCaption2)
tCaption2 = "from Subramanian.G."
ENDIF
IF EMPTY(tCaption1)
tCaption1 = "Greetings !!!"
ENDIF
**
WITH ThisForm
.Text1.Caption = tCaption1
.Text2.Caption = tCaption2
.ADDOBJECT("Image1","Image")
WITH .Image1
.Picture = tGif
.Stretch = 2
.Width = ThisForm.Width/4
.Height = ThisForm.Height/4
.Top = ThisForm.Height/1.4
.Left = ThisForm.Width/8
.Zorder(1)
IF ! FILE(.Picture)
.Visible = .f.
ELSE
.Visible = .t.
ENDIF
ENDWITH
**
.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..FontBold = .T.
.greet&cI..FontSize = ThisForm.nSnowFont
.greet&cI..Caption = ThisForm.cSnow
** Diwali Special
DO CASE
CASE x = 1
.greet&cI..Caption = CHR(36)
CASE x = 2
.greet&cI..Caption = CHR(162)
CASE x = 3
.greet&cI..Caption = CHR(163)
CASE x = 4
.greet&cI..Caption = CHR(165)
CASE x = 5
.greet&cI..Caption = "€"
x = 0
ENDCASE
x = x+1
**
.greet&cI..Left = (i*50) + (10*rand())
.greet&cI..Top = (t*90) + (10*rand())
.greet&cI..Name = "greet&cI"
** .greet&cI..ForeColor = RGB(192,192,192)
.greet&cI..ForeColor = RGB(0,0,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
**********************************************


May be some day I will create an FAQ with this.
-Ramani


ramani :)
(Subramanian.G)
 
Ramani

Happy &quot;Diwali&quot; [bdaycandle]

Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Hi,

I am not from India, I live in another hemisphere but I am insterested in your culture and I am aware of some of your festivities, like recent Raksha Bandhan and Navarathri.

But Diwali I thought was going to be celebrated next month, so good thing I read your post. Thanks! And happy Diwali to you too.

I read about the diyas, candles, neon lights and fireworks. They represent the triumph of light over darkness or the victory of good over evil.

There's so much to learn from you all, besides VFP...


 
Mike
Thanks.

mlv1055
I appreciate your interest. I am also away from India. I miss those childhood days of festivity. Now it has become 'tradition' and less of festivity. It is more of thinking back those days, the days holding mom or dad's fingers, visiting friends and relatives, firing the crackers or running after those fantacies. Dreaming the 'green green grass of home'...
Sweet memories bringing tears of joy!

I am afraid, this thread should not take us away from VFP. (against the norms for the site).

So I made the greetings form to linger VFP with the festival and share it with every one.

:)

ramani :)
(Subramanian.G)
 
fireworks.gif

HAPPY DIWALI RAMANI!

Slighthaze = NULL
[sub]craig1442@mchsi.com[/sub][sup]
&quot;Whom computers would destroy, they must first drive mad.&quot; - Anon​
[/sup]
 
Happy (late) Diwali Ramani.

Cheers

Ali Koumaiha
TeknoSoft Inc
Farmington Hills, Michigan
 
Happy belated DIWALI RAMANI,,, but In Malaysia we pronouce as &quot;DeePaVaLi&quot;.In our country DiWaLi is a public holiday... so since last 3 day i am in Holiday....
 
Hi Ramani!
I'm lating, but i think that you spent your holiday with happiness.
Is your code like to Christmas Card ?


Regards from Monika (Warszawa - Poland)
(monikai@yahoo.com)
 
The new year also starts with Padva.

Wish all experts and visiters to this site a very happy and prosperous new year !!!

Purushottam Awade
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top