Transparent frame for MDI WinChild ?

Transparent frame for MDI WinChild ?

Postby Rick Lipkin » Mon Jun 01, 2009 10:09 pm

To All

In Vista and Windows 7 .. I want to maximize the Aero Glass and be able to show an Mdi Child frame as Transparent.. I realize this may be a Windows OS issue .. but the MDI frame has a transparent top frame .. just curious if there is an option to let the Child inherit the transparent Frame ??

You can test this with \samples\testmdi and you will notice under Aero Glass . .the WinChild does NOT have a transparent frame.

Dialogs will have the transparent frame but I do not want a Dialog nowait because if the user minimizes the MDI .. the nonmodal dialog will still be visable ..

I do realize this may be an OS restriction .. but it sure would be nice to see a transparent frame on a Mdi Child ..

Any thoughts ?

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

Re: Transparent frame for MDI WinChild ?

Postby ukoenig » Tue Jun 02, 2009 12:24 am

Hello Rick,

I think, it works only with a embedded Dialog inside the MDIchild.
Some calculation is needed, to place the dialog inside the MDIChild.
It is just a test and some finetuning is still needed.

A modified Testmdi.prg

Image

Code: Select all  Expand view  RUN

DEFINE WINDOW oWnd FROM 1, 1 TO 20, 70 TITLE "I am the MDI Frame" ;
MDI ;
MENU BuildMenu() ; // COLOR "GR+*/RB"
ICON oIcon

SET MESSAGE OF oWnd TO "Main Window"

DEFINE WINDOW oWndEdit MDICHILD OF oWnd FROM 2, 2 TO 20, 50 ;
TITLE "I am a MDI Child" COLOR "W+/R"

oWndEdit:bGotFocus  = { || oDlg:SetFocus() }

nStyle = nOR( WS_OVERLAPPED | WS_VISIBLE )
DEFINE DIALOG oDlg FROM 0, 0 TO  ;
oWndEdit:nHeight() - 65, oWndEdit:nWidth()-20 OF oWndEdit ;
COLOR "W+/R"  STYLE nSTYLE PIXEL TRANSPARENT

@ 4, 2 SAY oName VAR cName OF oDlg SIZE 170, 25 COLOR "BG+/B"
oName:lTransparent := .T.

@ 3, 4 BTNBMP oBtn1 OF oDlg ;
SIZE 100, 50 ;
NOBORDER ;
FILENAME "Sound.bmp" ;
ACTION MsgAlert( "Button-Click", "Button 1" ) ;
PROMPT "Button" ;
LEFT
oBtn1:lTransparent = .t.  
oBtn1:cTooltip := "Button1"

ACTIVATE DIALOG oDlg NOWAIT ;
ON INIT ( oDlg:Move( oWndEdit:nTop + 70, oWndEdit:nLeft + 8 ) ) ;
VALID  ( oWndEdit:End(), .t. )
   
SET MESSAGE OF oWndEdit TO "Child Window"

ACTIVATE WINDOW oWndEdit
   
ACTIVATE WINDOW oWnd MAXIMIZED ;
VALID MsgYesNo( "Want to End ?" )
 


Best Regards
Uwe :lol:
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: Transparent frame for MDI WinChild ?

Postby Rick Lipkin » Tue Jun 02, 2009 1:08 am

Uwe

I compiled your changes .. I got the same result .. what I was looking for is the transparent 'frame' where the title "I am a MDI Child" has the Aero Glass theme applied..

Hope that made sense.

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

Re: Transparent frame for MDI WinChild ?

Postby ukoenig » Tue Jun 02, 2009 11:43 pm

Hello Rick,

I nearly finished the new Title-bar for MDI-childs.
There will be still some nice system-buttons.
You can change the title-font, height, color, text-position, gradient....
I don't know, if You like this solution.
A first preview, what You can do. It is not possible with a normal MDI :

Image

A test : move and resize window
Image

Best Regards
Uwe :lol:
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: Transparent frame for MDI WinChild ?

Postby Rick Lipkin » Tue Jun 02, 2009 11:51 pm

Uwe

I would be most interested in your winchild variant .. if transparent is not possible .. perhaps a nice gradient for the title frame will work ..

I appreciate your suggestions and solutions !

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

Re: Transparent frame for MDI WinChild ?

Postby ukoenig » Fri Jun 05, 2009 2:56 pm

Hello Rick,

slowly it comes to a end.
It is possible now, to create the system-buttons as well.
You can paint nicer buttons. The screenshot shows only, how it works.
It all works perfect together with resizing, minimize and maximize.
The buttons are connected to the window.
Maybe I can still find out, why the MDI-Child-background does'nt work with transparent.

Image

Best Regards
Uwe :lol:
Last edited by ukoenig on Fri Jun 05, 2009 7:54 pm, edited 2 times in total.
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: Transparent frame for MDI WinChild ?

Postby Rick Lipkin » Fri Jun 05, 2009 4:08 pm

Uwe

Awsome .. fantastic, wonderful, excellant, super !!!!!!!!!!!!!!!

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

Re: Transparent frame for MDI WinChild ?

Postby ukoenig » Fri Jun 05, 2009 7:58 pm

Hello Rick,

some more functions :
Optional a box with any color and weight around the title or complete Header.
Tooltip on title
There will be one more system-button on the lefthand side with a popup-menue
It is funny : the area of the system-buttons is transparent but not the SAY.

Image

A title :
Code: Select all  Expand view  RUN

// Windows-Title Height = 30
// -----------------------------------
oBMP:bPainted := { |hDC| ;
DRAW_TITLE( oWndEdit, ;
   oBMP, ;          // BMP
   hDC, ;           // hDC
   .T., ;           // Horiz. or Vert.
   15779475, ;      // 1. Grad-Color
   16777215, ;      // 2. Grad-Color
   0.50, ;          // Color-Pos.
   50, ;            // Text-Pos from left ( 0 = centered )
   oTitleFont, ;   // Font
   128, ;           // Font-Color
   "MDI-Child Title", ;  // Text, ;
   8, ;                 // Box-Line-Weight ( 0 = Nobox )
   8388608 ) }        // Line-Color
 


Best Regards
Uwe :lol:
Last edited by ukoenig on Fri Jun 05, 2009 10:43 pm, edited 1 time in total.
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: Transparent frame for MDI WinChild ?

Postby Rick Lipkin » Fri Jun 05, 2009 10:16 pm

Uwe

I admire your determination .. you have certainly done more than anyone could have asked !!

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

Re: Transparent frame for MDI WinChild ?

Postby ukoenig » Fri Jun 05, 2009 11:47 pm

Hello Rick,

all paintings and button-actions are tested and working fine.
I still added a Title-action with DblClick on the title.
I think, it looks better, not to use a complete frame, just a top- and bottom-line.
All systembuttons can include Your own actions.
I noticed, zooming a window with a vertical gradient, the background shows the gradient tiled.
With a horizontal gradient or brush, You cannot see this effect. I will still test, where it comes from.
I think it is better to zip the complete working-directory for testing.
This afternoon ( German-time ) I put it in the forum for download.

Image

Best Regards
Uwe :lol:
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: Transparent frame for MDI WinChild ?

Postby ukoenig » Sat Jun 06, 2009 10:05 pm

Hello Rick,

the complete working-directory for testing.

By mistake, the fontmanager opens at startup.
Please change the font in the prg-file, because < lFromUser > was defined.
( cFaceName, nWidth, nHeight, lFromUser, lBold, nEscapement, nOrientation, nWeight, lItalic )
oTitleFont := TFont():New("Arial", ,-14, ,.T., , , ,.T.)

I don't know, where it comes from, because I don't call him.
We still need a window-move solution : On title-caption the cursor must change to hand
and we can move the window.

Download : http://www.pflegeplus.com/fw_downlads/mditest.zip

Any ideas about more extensions are welcome.

Best Regards
Uwe :lol:
Last edited by ukoenig on Mon Jun 08, 2009 8:59 pm, edited 1 time in total.
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: Transparent frame for MDI WinChild ?

Postby hag » Sun Jun 07, 2009 4:22 pm

As you know windows is now providing 64bits on new computers. I recently purchased a 64bit computer to see how my 32bit FWH app would run. It worked like a dream. Very fast and all frames were automatically transparent even though my programing is not transparent. The only problem I had was running 16 bit PKZip (old) within my app. Apparently MS doing away with 16bit apps. I moved to 7-zip a free 32bit compression app with command line features. Worked great in 64bits.
Thank you
Harvey
hag
 
Posts: 598
Joined: Tue Apr 15, 2008 4:51 pm
Location: LOs Angeles, California


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 14 guests