Win_Msg - A kind of Notification message so easy and friendly Demo
Moderator: Rathinagiri
Re: Win_Msg - A kind of Notification message so easy and friendly Demo
Ευχαριστώ φίλε !
Best Regards,
Nikos.
os: Windows Server 2019 - 64
Nikos.
os: Windows Server 2019 - 64
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
Win_Msg - A kind of Notification message so easy and friendly Demo
ΠΑΡΑΚΑΛΩ
You are welcome Dave.
You are welcome Dave.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
Re: Win_Msg - A kind of Notification message so easy and friendly Demo
Hi Pablo,
I got below error, obviously thread lib needed. How to add it ?
Harbour 3.2.0dev (r1601151502)
Copyright (c) 1999-2015, http://harbour-project.org/
<snip>
hbmk2: Error: Referenced, missing, but unknown function(s):
GETCURRENTTHREADID(), GETCURRENTTHREADHANDLE(), SETTHREADPRIORITY(),
ATTACHTHREADINPUT(), HMG_THREADHBTOWINID()
Regards,
Anand
I got below error, obviously thread lib needed. How to add it ?
Harbour 3.2.0dev (r1601151502)
Copyright (c) 1999-2015, http://harbour-project.org/
<snip>
hbmk2: Error: Referenced, missing, but unknown function(s):
GETCURRENTTHREADID(), GETCURRENTTHREADHANDLE(), SETTHREADPRIORITY(),
ATTACHTHREADINPUT(), HMG_THREADHBTOWINID()
Regards,
Anand
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
Win_Msg - A kind of Notification message so easy and friendly Demo
Hello Anand,
As you can see at source Demo3.prg saying: Compiled with...: HMG 3.4.3 + added patches #1 and #2
I think patch #2 is missing to be added at your HMG. See this: viewtopic.php?p=50091#p50091 and please considere also this: viewtopic.php?p=50218#p50218
Now in HMG Harbour and C functions be added to work with THREADs properlly thanks to Dr. Claudio.
As you can see at source Demo3.prg saying: Compiled with...: HMG 3.4.3 + added patches #1 and #2
I think patch #2 is missing to be added at your HMG. See this: viewtopic.php?p=50091#p50091 and please considere also this: viewtopic.php?p=50218#p50218
Now in HMG Harbour and C functions be added to work with THREADs properlly thanks to Dr. Claudio.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
Re: Win_Msg - A kind of Notification message so easy and friendly Demo
Thanks Pablo,
Patched and done
Regards,
Anand
Patched and done
Regards,
Anand
- serge_girard
- Posts: 3165
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
Re: Win_Msg - A kind of Notification message so easy and friendly Demo
Hi Pablo,
I changed a bit:
For longer text messages. Maybe there is a better way to do it?
Thanks for nice piece of handy messaging, it looks really professional now !
Serge
I changed a bit:
Code: Select all
nHeight := LEN(cMsg) * 1.3
IF nHeight < 82
nHeight := 82
ENDIF
nTop := GetDesktopRealHeight() - nHeight
Thanks for nice piece of handy messaging, it looks really professional now !
Serge
There's nothing you can do that can't be done...
Re: Win_Msg - A kind of Notification message so easy and friendly Demo
Hi Pablo
I am getting following error while compiling Pls advice what is to be done.
Thanks
I am getting following error while compiling Pls advice what is to be done.
Thanks
Re: Win_Msg - A kind of Notification message so easy and friendly Demo
Hi RPC
Patch it. See http://hmgforum.com/viewtopic.php?p=50240#p50217 for Pablo's answer.
Regards,
Anand
Patch it. See http://hmgforum.com/viewtopic.php?p=50240#p50217 for Pablo's answer.
Regards,
Anand
- Pablo César
- Posts: 4059
- Joined: Wed Sep 08, 2010 1:18 pm
- Location: Curitiba - Brasil
Win_Msg - A kind of Notification message so easy and friendly Demo
Nice idea Serge.serge_girard wrote: ↑Fri Mar 24, 2017 12:49 pm Hi Pablo,
I changed a bit:
For longer text messages. Maybe there is a better way to do it?Code: Select all
nHeight := LEN(cMsg) * 1.3 IF nHeight < 82 nHeight := 82 ENDIF nTop := GetDesktopRealHeight() - nHeight
Thanks for nice piece of handy messaging, it looks really professional now !
Serge
I guess there is better way to calculate number of lines, specially when CRLF is introduced in the cMsg.
I tried a bit more with this code... but unsuccessfuly...
Code: Select all
cMsg := "Printing file xxxxx.xxx "+CRLF+"sent to EPSON LX-300"+CRLF+"3rd line"+CRLF+"4th line"+CRLF+"5th line"
FUNCTION Notifier( cMsg, aBcolor, nSeconds, lCenter, nTransparency )
LOCAL cParentWindowName, hWnd, hWndhMain := 0
LOCAL nWidth := 204, nTimeIni
LOCAL nLeft := GetDesktopRealWidth() - nWidth
LOCAL nLines, hFont, nTop, nHeight, nMsgWidth
LOCAL cFontName := "MS Shell Dlg"
LOCAL nFontSize := 10
LOCAL lBold := .T., lItalic := .F., lUnderline := .F., lStrikeOut := .F.
DEFAULT cMsg := ""
DEFAULT nSeconds := 2
DEFAULT lCenter := .F.
DEFAULT nTransparency := 255
If Empty(cMsg)
Return Nil
Endif
*nHeight := HMG_Len(cMsg) * 1.3
nLines := hb_TokenCount(cMsg, .T. /*lEOL*/)
hFont := HMG_CreateFont ( , cFontName, nFontSize, lBold, lItalic, lUnderline, lStrikeOut )
nMsgWidth := GetTextWidth( , cMsg, hFont)
nMsgWidth := nMsgWidth / (nWidth - 20)
If !( Int(nMsgWidth/(nWidth - 20)) == nMsgWidth )
nMsgWidth := Int( nMsgWidth ) + 1
Endif
nLines := nLines + nMsgWidth
nHeight := XGetTextHeight( , cMsg, hFont) * nLines
Hi Rajeev,
Probably you did not applied yet the two patches of 3.4.3 version as it said already Anand. (By the way: thank you Anand).
It's incomplete info in your screen captured.
As a result of this lack of visibility, let me know something:
have you already tested the ViewError - HMG building utility ? For me it's useful, if not for you may you tell me what did you dislike about it ?
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
- serge_girard
- Posts: 3165
- Joined: Sun Nov 25, 2012 2:44 pm
- DBs Used: 1 MySQL - MariaDB
2 DBF - Location: Belgium
- Contact:
Re: Win_Msg - A kind of Notification message so easy and friendly Demo
Yes, Pablo I used a quick and dirty method. Perhaps CRLF should be count as a complete line.
Also yesterday I added an image (kind of company logo) so I'm testing it with your new code from above.
Serge
Also yesterday I added an image (kind of company logo) so I'm testing it with your new code from above.
Serge
There's nothing you can do that can't be done...