效果类似迅雷主界面上的菜单栏
=====================================下面的方法是网上搜到的,不过我试验了两次都达不到上面说的效果.步骤一:把Win32面板上把CoolBar组件加到窗体上 步骤二:把Additional面板上的ActionMainMenuBar组件加到CoolBar组件上.(注意一定要放在CooBar   组件上) 步骤三:把Win32面板上的PageScroller组件同样加到CoolBar组件上. 步骤四:把Additional面板上的ActionToolBar组件加到PageScrooler组件上(注意放在PageScroolerh   上) 步骤五:把Additional面板上的ActionManager组件加到窗体上 步骤六:把CoolBar组件的AutoSize属性设为True 步骤七:选择ActionManager组件,双击它的的ActionBars属性,在弹出的Editing   ActionManager1.ActionBars框中增加两个TActionBarItem,选择第一个TActionBarItem,双击它的Items属性,在弹出的框中增加两个ActionClientItem,把两个ActionClientItem的Caption属性分别设成 "文件 "   , "编辑 ",   再在ActionClientItem中的Items属性增加ActionClientItem,   并把它们的Caption属设成 "新建 ", "打开 "之类的.如果你想在新建里面再出现子菜单,那么就在它的Items属性再增加ActionClientItem,设好Caption内容.   选择第二个TActionBarItem,按照上面所讲的方法同样增加ActionClientItem,并设好Caption属性. 步骤八:选择第一个TActionBarItem,   设它的ActionBar属性为ActionMainMenuBar,选第二个TActionBarItem,设它的ActionBar属性为ActionToolBar. http://topic.csdn.net/u/20070603/17/9c666add-0491-47e6-b77f-b899f083c778.html

解决方案 »

  1.   

    把窗口的BorderStyle  属性设为bsNone 
    自己拖控件上去,那种样式的窗口很多显示的标题 都不是真正原FORM的标题,都是拖个LABEL上去显示的
    另外关闭按纽这些都差不多 
      

  2.   

    谢谢楼上各位的回复.网上搜到一个可以在标题栏显示按钮的代码,我调试了可以通过的.
    privateTitleButton : TRect;procedure DrawTitleButton;{Paint-related messages}procedure WMSetText(var Msg : TWMSetText); message WM_SETTEXT;procedure WMNCPaint(var Msg : TWMNCPaint); message WM_NCPAINT;procedure WMNCActivate(var Msg : TWMNCActivate); message WM_NCACTIVATE;{Mouse down-related messages}procedure WMNCHitTest(var Msg : TWMNCHitTest); message WM_NCHITTEST;procedure WMNCLButtonDown(var Msg : TWMNCLButtonDown); message WM_NCLBUTTONDOWN;function GetVerInfo : DWORD;end;varTitleBtnForm: TTitleBtnForm;consthtTitleBtn = htSizeLast + 1;implementation{$R *.DFM}procedure TTitleBtnForm.DrawTitleButton;varbmap : TBitmap; {Bitmap to be drawn - 16 X 16 : 16 Colors}XFrame, {X and Y size of Sizeable area of Frame}YFrame,XTtlBit, {X and Y size of Bitmaps in caption}YTtlBit : Integer;begin{Get size of form frame and bitmaps in title bar}XFrame := GetSystemMetrics(SM_CXFRAME);YFrame := GetSystemMetrics(SM_CYFRAME);XTtlBit := GetSystemMetrics(SM_CXSIZE);YTtlBit := GetSystemMetrics(SM_CYSIZE);{$IFNDEF WIN32}TitleButton := Bounds(Width - (3 * XTtlBit) - ((XTtlBit div 2) - 2),YFrame - 1,XTtlBit + 2,YTtlBit + 2);{$ELSE} {Delphi 2.0 positioning}if (GetVerInfo = VER_PLATFORM_WIN32_NT) thenTitleButton := Bounds(Width - (3 * XTtlBit) - ((XTtlBit div 2) - 2),YFrame - 1,XTtlBit + 2,YTtlBit + 2)elseTitleButton := Bounds(Width - XFrame - 4*XTtlBit + 2,XFrame + 2,XTtlBit + 2,YTtlBit + 2);{$ENDIF}
    Canvas.Handle := GetWindowDC(Self.Handle); {Get Device context for drawing}try{Draw a button face on the TRect}DrawButtonFace(Canvas, TitleButton, 1, bsAutoDetect, False, False, False);bmap := TBitmap.Create;//bmap.LoadFromFile('c:\windows\desktop\aaa.bmp');
      bmap.LoadFromFile('e:\24.bmp');
    with TitleButton do{$IFNDEF WIN32}Canvas.Draw(Left + 2, Top + 2, bmap);{$ELSE}if (GetVerInfo = VER_PLATFORM_WIN32_NT) thenCanvas.Draw(Left + 2, Top + 2, bmap)elseCanvas.StretchDraw(TitleButton, bmap);{$ENDIF}finallyReleaseDC(Self.Handle, Canvas.Handle);bmap.Free;Canvas.Handle := 0;end;end;{Paint triggering events}procedure TTitleBtnForm.WMNCActivate(var Msg : TWMNCActivate);beginInherited;DrawTitleButton;end;procedure TTitleBtnForm.FormResize(Sender: TObject);beginPerform(WM_NCACTIVATE, Word(Active), 0);end;{Painting events}procedure TTitleBtnForm.WMNCPaint(var Msg : TWMNCPaint);beginInherited;DrawTitleButton;end;procedure TTitleBtnForm.WMSetText(var Msg : TWMSetText);beginInherited;DrawTitleButton;end;{Mouse-related procedures}procedure TTitleBtnForm.WMNCHitTest(var Msg : TWMNCHitTest);beginInherited;{Check to see if the mouse was clicked in the area of the button}with Msg doif PtInRect(TitleButton, Point(XPos - Left, YPos - Top)) thenResult := htTitleBtn;end;procedure TTitleBtnForm.WMNCLButtonDown(var Msg : TWMNCLButtonDown);begininherited;if (Msg.HitTest = htTitleBtn) thenShowMessage('You pressed the new button');
    end;function TTitleBtnForm.GetVerInfo : DWORD;varverInfo : TOSVERSIONINFO;beginresult:=0;verInfo.dwOSVersionInfoSize := SizeOf(TOSVersionInfo);if GetVersionEx(verInfo) thenResult := verInfo.dwPlatformID;{Returns:VER_PLATFORM_WIN32s Win32s on Windows 3.1VER_PLATFORM_WIN32_WINDOWS Win32 on Windows 95VER_PLATFORM_WIN32_NT Windows NT }end;如果按钮的效果可以实现,那菜单的效果应该也是可以实现的.
      

  3.   

    把窗口的BorderStyle 属性设为bsNone; 放一个TOOLBAR就行就可以把菜单用上去了,然后放几个按钮就是关闭最大最小化了,呵呵
     
      

  4.   

    最简单的办法bsnone 然后 利用 panel 自己来。 比如可以利用raPabel之类的可以做出不错的效果来。。