Alert Message Function

Alert Message Function

Postby Rick Lipkin » Wed May 02, 2012 4:00 pm

To All

Is there a way to clean up the message text of the Alert function .. As you can see the text of the message is very light and difficult to read.

Any way to make the text more viewable ?

Thanks
Rick Lipkin

Image
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Alert Message Function

Postby Otto » Wed May 02, 2012 6:19 pm

Rick, I would suggest Metro style.
Best regards,
Otto

Code: Select all  Expand view
function MetroMsgInfo( cTitel, cAnzeige1 )
//MetroMsgInfo( "Infobox",
   local lVar           := .f.
    local oDlg, oBTNNaviWeiter, obtnAbbruch
   local nWidth         := GetSysMetrics( 0 )
    local nLine       := 0
    local nRowSpace   := 20
    local nRowOffset  := 20

   *----------------------------------------------------------
     
      nLine := 16
        DEFINE DIALOG oDlg ;
           TITLE "Auswahl" ;
            FROM 0, 5 ;
              TO nRowSpace * nLine, nWidth + 6 ;
           PIXEL ;
           STYLE nOr( DS_MODALFRAME, WS_POPUP ) ;
           COLOR CLR_WHITE, SetUp():nRibbonTopClr ;
            FONT Setup():oFntDialog
    oDlg:SetFont( Setup():oFntMetroNormal2 )


       nLine := 0.5
  @ nRowOffset * nLine , nWidth/5/2.05 ;
         SAY cTitel ;
          OF oDlg ;
       PIXEL ;
         FONT Setup():oFntMetroMedium ;
       COLOR CLR_WHITE, SetUp():nRibbonTopClr
   
 
          nLine := 1
    @ nRowOffset + nRowSpace * nLine , nWidth/5/2.05 ;
         SAY  cAnzeige1  ;
          OF oDlg ;
       PIXEL ;
       FONT Setup():oLbxFont ;
       COLOR CLR_WHITE, SetUp():nRibbonTopClr
 
 
   *----------------------------------------------------------
        nLine := 4
    @ nRowOffset + nRowSpace * nLine,nWidth/5/2.05  ;
     FLATBTN oBTNNaviWeiter ;
      PROMPT "OK" ;
        FONT Setup():oFntMetroFLATBTN ;
        SIZE 76/2.05, ( FONT4HOEHE + 4 ) /2.05 ;
          OF oDlg ;
      ACTION ( lVar := .t., oDlg:End() ) ;
       COLOR CLR_GREEN, RGB( 210, 210, 210 )

    

   ACTIVATE DIALOG oDlg CENTERED

   
RETURN NIL
//----------------------------------------------------------------------------//


Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org
https://www.facebook.com/groups/modharbour.club
********************************************************************
User avatar
Otto
 
Posts: 6332
Joined: Fri Oct 07, 2005 7:07 pm

Re: Alert Message Function

Postby ukoenig » Wed May 02, 2012 6:20 pm

Rick,

maybe have a look at :

viewtopic.php?f=3&t=23025&p=123453#p123453

Best Regards
Uwe :?:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany

Re: Alert Message Function

Postby Rick Lipkin » Wed May 02, 2012 7:08 pm

Uwe

I modified the Alert.prg like this .. I did not need the scroll bars and the OtherWise case will always work for me .. the mods are not perfect but work for me.

You do have to be careful with SetDlgGradient().. I did not have time to set up a background brush and make the background look like a regular windows message ...

Rick Lipkin

ps .. Antonio.. with all the changes you have made with transparencies .. it would be nice to update and re-work Alert()

Code: Select all  Expand view

DO CASE
CASE lHScroll .and. lVScroll
      @ 25, 70 GET oGet VAR cSay OF oDlg READONLY MEMO;
         SIZE nWidth, nHeight PIXEL FONT oFont ;
         COLOR NIL, GetSysColor( COLOR_BTNFACE ) ;
         NOBORDER HSCROLL WHEN .f.
CASE lHScroll .and. !lVScroll
      @ 25, 70 GET oGet VAR cSay OF oDlg READONLY MEMO;
         SIZE nWidth, nHeight PIXEL FONT oFont ;
         COLOR NIL, GetSysColor( COLOR_BTNFACE ) ;
         NOBORDER HSCROLL NO VSCROLL WHEN .f.
CASE !lHScroll .and. lVScroll
      @ 25, 70 GET oGet VAR cSay OF oDlg READONLY MEMO;
         SIZE nWidth, nHeight PIXEL FONT oFont ;
         COLOR NIL, GetSysColor( COLOR_BTNFACE ) ;
         NOBORDER WHEN .f.
OTHERWISE

  *    @ 25, 70 GET oGet VAR cSay OF oDlg READONLY MEMO;
  *       SIZE nWidth, nHeight PIXEL FONT oFont ;
  *       COLOR NIL, GetSysColor( COLOR_BTNFACE ) ;
  *       NOBORDER NO VSCROLL WHEN .f.

       // made changes here Rick Lipkin

       @ 25, 70 SAY oGet VAR cSay OF oDlg ;
         SIZE nWidth, nHeight PIXEL FONT oFont TRANSPARENT UPDATE


END CASE

 


Image
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Alert Message Function

Postby Antonio Linares » Wed May 02, 2012 7:47 pm

Rick,

It seems as you are not using themes in your app.

Simply copy FWH\samples\tutor01.rc and rename it as yourapp.rc (your app name)m and your dialogs will look much nicer :-)

Please notice that FWH\samples\tutor01.rc uses some files stored in FWH\samples\winxp folder
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42089
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Alert Message Function

Postby Rick Lipkin » Wed May 02, 2012 9:27 pm

Antonio

Never used the Windows Manifest .. I just added it to my .rc compile .. it does add some nice features.

Thanks
Rick
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 75 guests