A funny sample
Moderator: Rathinagiri
- esgici
- Posts: 4543
- Joined: Wed Jul 30, 2008 9:17 pm
- DBs Used: DBF
- Location: iskenderun / Turkiye
- Contact:
A funny sample
Hi All
I'm not sure, this is funny or not, useful or not; only a little experiment on HMG power.
"Warn Lazy User" is a function (procedure) and is embedded in famous HMG sample Main.Demo.
Why Main Demo? Because I like much this sample, in my opinion this is "father" of all HMG sample; almost everything included in and as possible as simple and intuitive way
"Warn Lazy User" have some missing points; but surely may complete in the future.
Enjoy !
Regards, saludos
--
Esgici
I'm not sure, this is funny or not, useful or not; only a little experiment on HMG power.
"Warn Lazy User" is a function (procedure) and is embedded in famous HMG sample Main.Demo.
Why Main Demo? Because I like much this sample, in my opinion this is "father" of all HMG sample; almost everything included in and as possible as simple and intuitive way
"Warn Lazy User" have some missing points; but surely may complete in the future.
Enjoy !
Regards, saludos
--
Esgici
- Attachments
-
- WarnLUser.rar
- Warn lazy user
- (30.3 KiB) Downloaded 650 times
Viva INTERNATIONAL HMG
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: A funny sample
Very interesting.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
- esgici
- Posts: 4543
- Joined: Wed Jul 30, 2008 9:17 pm
- DBs Used: DBF
- Location: iskenderun / Turkiye
- Contact:
Re: A funny sample
Hi All
Please change line 1276 from
to
Regards, saludos
--
Esgici
Please change line 1276 from
Code: Select all
Form_1.Label_3.Value := SECTOTIME( nElapTime )
Code: Select all
Form_1.Label_3.Value := SECTOTIME( nWaitIddleInterval - nElapTime )
--
Esgici
Viva INTERNATIONAL HMG
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: A funny sample
Also add in Line 724
Code: Select all
if valtype(color[1]) == "U" .or. valtype(color[2]) == "U" .or. valtype(color[3]) == "U"
return nil
endif
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
- Rathinagiri
- Posts: 5471
- Joined: Tue Jul 29, 2008 6:30 pm
- DBs Used: MariaDB, SQLite, SQLCipher and MySQL
- Location: Sivakasi, India
- Contact:
Re: A funny sample
It is really a proud that, HMG can do all these things.
Just 1306 (most of them are empty lines) lines and a FULL FLEDGED DEMO. HMG is just great man.
Unfortunately Misc->ShellAbout() function gives run time error.
Just 1306 (most of them are empty lines) lines and a FULL FLEDGED DEMO. HMG is just great man.
Unfortunately Misc->ShellAbout() function gives run time error.
East or West HMG is the Best.
South or North HMG is worth.
...the possibilities are endless.
South or North HMG is worth.
...the possibilities are endless.
- esgici
- Posts: 4543
- Joined: Wed Jul 30, 2008 9:17 pm
- DBs Used: DBF
- Location: iskenderun / Turkiye
- Contact:
Re: A funny sample
Hi Rathi
IMHO this is a little older function and something been changed out of HMG
By the way, I have slightly modified SetPict() procedure too; did you noticed ?
Viva HMG, viva Roberto Lopez !
Regards, saludos
--
Esgici
My suggestion for GetColor_Click() :Rathi wrote:Also add in Line 724
Code: Select all
PROC GetColor_Click()
*-----------------------------------------------------------------------------*
LOCAL aColor := GetColor()
IF HB_ISNIL( aColor[ 1 ] ) // It's impossible any element is not-nil when one is nil
MsgInfo( "Escaped")
ELSE
MsgInfo( Str(aColor[1]) , "Red Value")
MsgInfo( Str(aColor[2]) , "Green Value")
MsgInfo( Str(aColor[3]) , "Blue Value")
ENDIF
RETU // GetColor_Click()
*-----------------------------------------------------------------------------*
My suggestion for ShelAbout() is :Rathi wrote:Unfortunately Misc->ShellAbout() function gives run time error.
Code: Select all
ITEM 'ShellAbout() Function (Contributed by Manu Exposito' ACTION ;
ShellAbout( "About Main Demo" + "#" + ;
"HMG Main Demo", ;
"GUI Library For Harbour" + CRLF + ;
"HMG Power Ready!" )
By the way, I have slightly modified SetPict() procedure too; did you noticed ?
You are absolutely right; this causing why I like very much this sample and HMG of courseRathi wrote:It is really a proud that, HMG can do all these things.
Just 1306 (most of them are empty lines) lines and a FULL FLEDGED DEMO. HMG is just great man.
Viva HMG, viva Roberto Lopez !
Regards, saludos
--
Esgici
Viva INTERNATIONAL HMG
- Czarny_Pijar
- Posts: 172
- Joined: Thu Mar 18, 2010 11:31 pm
- Location: 19.2341 E 50.2267 N
Re: A funny sample
Unwanted miracles happen ...
In order not to wait too long, please make these changes and see what happens.
In my case, the application crawls off the screen!
In order not to wait too long, please make these changes
Code: Select all
#define nWaitIddleInterval 2 // In seconds, 2= Accelerating. Line 10
* PLAY WAVE 'Alarm.WAV' // Mute not to go crazy. Line 1280
In my case, the application crawls off the screen!
- esgici
- Posts: 4543
- Joined: Wed Jul 30, 2008 9:17 pm
- DBs Used: DBF
- Location: iskenderun / Turkiye
- Contact:
Re: A funny sample
For a purpose like "crawling off the screen" may find countless methodsCzarny_Pijar wrote: In my case, the application crawls off the screen!
Why 2, instead of zero ?
I'm glad by giving you an miraculous toy
Regards
--
Esgici
Viva INTERNATIONAL HMG
- Czarny_Pijar
- Posts: 172
- Joined: Thu Mar 18, 2010 11:31 pm
- Location: 19.2341 E 50.2267 N
Re: A funny sample
Symptoms are funny, but the problem is serious.
Looking at the program, I see the intention : The frame should be shaking in one place.
Certainly should not crawl off somewhere, but it does.
This unwanted(?) behavior can be easily removed:
Looking at the program, I see the intention : The frame should be shaking in one place.
Certainly should not crawl off somewhere, but it does.
This unwanted(?) behavior can be easily removed:
Code: Select all
*-----------------------------------------------------------------------------*
PROC Vibrate()
*-----------------------------------------------------------------------------*
LOCA nElapTime := SECONDS() - nLastActTime,;
nWinRow := Form_1.Row ,;
nWinCol := Form_1.Col
Form_1.Label_3.Value := SECTOTIME( nWaitIddleInterval - nElapTime )
IF nElapTime > nWaitIddleInterval
PLAY WAVE 'Alarm.WAV'
FOR y := 1 TO 5
FOR x := 1 TO 3
Form_1.Row := nWinRow - x
Form_1.Col := nWinCol - x
NEXT x
FOR x := 1 TO 3
Form_1.Row := nWinRow + x * 2
Form_1.Col := nWinCol + x * 2
NEXT x
FOR x := 1 TO 3
Form_1.Row := nWinRow - x
Form_1.Col := nWinCol - x
NEXT x
NEXT y
Form_1.Row := nWinRow //------------ added
Form_1.Col := nWinCol //------------ added
ResetWarnTime()
ENDIF
RETU