Window Without Edge
Posted: Wed Jan 04, 2023 12:58 pm
Hi To all , Happy new year 2023
Is there anyone needing a Window Without Edge , i Will show you How.
[image] [/image]
in Windows.C , Insert the Following code before CreateWindow. (Function initWindow)
if ( hb_parl (18) ) // Border
{
Style = BS_OWNERDRAW | WS_CHILD ;
ExStyle = 0;
}
IN i_Window.Ch
#xcommand DEFINE WINDOW <w> ;
[ <dummy1: OF, PARENT> <parent> ] ;
[ AT <row>,<col> ] ;
[ ROW <row> ] ;
[ COL <col> ] ;
[ WIDTH <wi> ];
[ HEIGHT <h> ];
[ VIRTUALWIDTH <vWidth> ] ;
[ VIRTUALHEIGHT <vHeight> ] ;
[ TITLE <title> ] ;
[ ICON <icon> ] ;
WINDOWTYPE ;
[ <main: MAIN> ] ;
[ <child: CHILD> ] ;
[ <panel: PANEL> ] ;
[ <noshow: NOSHOW> ] ;
[ TOPMOST <topmost> ] ;
[ <noborder : NOBORDER> ] ;
.
.
.
[ <noautorelease: NOAUTORELEASE> ] ;
[ <nominimize: NOMINIMIZE> ] ;
[ TITLEBAR <titlebar> ] ;
[ FONTNAME <FontName> FONTSIZE <FontSize> ] ;
=>;
DECLARE WINDOW <w> ;;
DECLARE CUSTOM COMPONENTS <w> ;;
_DefineWindow ( <"w">, <title>, <col>, <row>, <wi>, <h>, <.nominimize.>, <.nomaximize.>, <.nosize.>, <.nosysmenu.>, <.nocaption.>,.F., '',<{InitProcedure}>, <{ReleaseProcedure}> , <{MouseDragProcedure}>, <{SizeProcedure}> , <{ClickProcedure}> , <{MouseMoveProcedure}>, <backcolor> , <{PaintProcedure}> , <.noshow.> , <.topmost.> , <.main.> , <icon> , <.child.> , <FontName> , <FontSize>, <NotifyIcon> , <NotifyIconTooltip> , <{NotifyLeftClick}> , <{GotFocusProcedure}>, <{LostFocusProcedure}> , <vHeight> , <vWidth> , <{scrollleft}> , <{scrollright}> , <{scrollup}> , <{scrolldown}> , <{hScrollBox}> , <{vScrollBox}> , <.helpbutton.> , <{MaximizeProcedure}> , <{MinimizeProcedure}> , <cursor> , <.noautorelease.> , <{interactivecloseprocedure}> , <visible> , <autorelease> , <minbutton> , <maxbutton> , <sizable> , <sysmenu> , <titlebar> , <"parent"> , <.panel.> , <.noborder.> )
In h_Windows.Prg
Function _DefineWindow ( FormName, Caption, x, y, w, h ,nominimize ,....., noBorder)
//Add This
if valtype(noborder) == "U"
noborder := .f.
endif
Formhandle = InitWindow( Caption , x, y, w, h, nominimize,.....,noBorder)
In Your App:
DEFINE WINDOW &cWin1 AT nTop, nLeft+1 WIDTH ::nColTamMenu HEIGHT Iif( Len(::aOpz11) <= XMAXITEM , nHeight , 302 ) TITLE 'Men1'+cWin1 ;
NOBORDER NOMAXIMIZE NOMINIMIZE NOSIZE NOSYSMENU NOCAPTION CHILD PANEL PARENT &cParent BACKCOLOR ::aCorSub1 VIRTUAL HEIGHT Nil VISIBLE .T. // Iif( Len(::aOpz11) <= XMAXITEM , nHeight+1 , (Len(aOp1) * ::nItemSubHeight)+10 ) VISIBLE .t.
END WINDOW
Don´t forget to Rebuild The Lib Windows( Windows.C) .
Any Doubts , its jusk ask .
Greetings To all
Is there anyone needing a Window Without Edge , i Will show you How.
[image] [/image]
in Windows.C , Insert the Following code before CreateWindow. (Function initWindow)
if ( hb_parl (18) ) // Border
{
Style = BS_OWNERDRAW | WS_CHILD ;
ExStyle = 0;
}
IN i_Window.Ch
#xcommand DEFINE WINDOW <w> ;
[ <dummy1: OF, PARENT> <parent> ] ;
[ AT <row>,<col> ] ;
[ ROW <row> ] ;
[ COL <col> ] ;
[ WIDTH <wi> ];
[ HEIGHT <h> ];
[ VIRTUALWIDTH <vWidth> ] ;
[ VIRTUALHEIGHT <vHeight> ] ;
[ TITLE <title> ] ;
[ ICON <icon> ] ;
WINDOWTYPE ;
[ <main: MAIN> ] ;
[ <child: CHILD> ] ;
[ <panel: PANEL> ] ;
[ <noshow: NOSHOW> ] ;
[ TOPMOST <topmost> ] ;
[ <noborder : NOBORDER> ] ;
.
.
.
[ <noautorelease: NOAUTORELEASE> ] ;
[ <nominimize: NOMINIMIZE> ] ;
[ TITLEBAR <titlebar> ] ;
[ FONTNAME <FontName> FONTSIZE <FontSize> ] ;
=>;
DECLARE WINDOW <w> ;;
DECLARE CUSTOM COMPONENTS <w> ;;
_DefineWindow ( <"w">, <title>, <col>, <row>, <wi>, <h>, <.nominimize.>, <.nomaximize.>, <.nosize.>, <.nosysmenu.>, <.nocaption.>,.F., '',<{InitProcedure}>, <{ReleaseProcedure}> , <{MouseDragProcedure}>, <{SizeProcedure}> , <{ClickProcedure}> , <{MouseMoveProcedure}>, <backcolor> , <{PaintProcedure}> , <.noshow.> , <.topmost.> , <.main.> , <icon> , <.child.> , <FontName> , <FontSize>, <NotifyIcon> , <NotifyIconTooltip> , <{NotifyLeftClick}> , <{GotFocusProcedure}>, <{LostFocusProcedure}> , <vHeight> , <vWidth> , <{scrollleft}> , <{scrollright}> , <{scrollup}> , <{scrolldown}> , <{hScrollBox}> , <{vScrollBox}> , <.helpbutton.> , <{MaximizeProcedure}> , <{MinimizeProcedure}> , <cursor> , <.noautorelease.> , <{interactivecloseprocedure}> , <visible> , <autorelease> , <minbutton> , <maxbutton> , <sizable> , <sysmenu> , <titlebar> , <"parent"> , <.panel.> , <.noborder.> )
In h_Windows.Prg
Function _DefineWindow ( FormName, Caption, x, y, w, h ,nominimize ,....., noBorder)
//Add This
if valtype(noborder) == "U"
noborder := .f.
endif
Formhandle = InitWindow( Caption , x, y, w, h, nominimize,.....,noBorder)
In Your App:
DEFINE WINDOW &cWin1 AT nTop, nLeft+1 WIDTH ::nColTamMenu HEIGHT Iif( Len(::aOpz11) <= XMAXITEM , nHeight , 302 ) TITLE 'Men1'+cWin1 ;
NOBORDER NOMAXIMIZE NOMINIMIZE NOSIZE NOSYSMENU NOCAPTION CHILD PANEL PARENT &cParent BACKCOLOR ::aCorSub1 VIRTUAL HEIGHT Nil VISIBLE .T. // Iif( Len(::aOpz11) <= XMAXITEM , nHeight+1 , (Len(aOp1) * ::nItemSubHeight)+10 ) VISIBLE .t.
END WINDOW
Don´t forget to Rebuild The Lib Windows( Windows.C) .
Any Doubts , its jusk ask .
Greetings To all