• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 136
  • Last Modified:

madshi, about appbar14 ...

... I wanna ask you: The appbar is too flat.
When I put there a Tpanel object (allclient), to get it's look 3D, then the drag-function is ower :-( ( - i clic on the clientarea an drag ... and the form is not moving). How to solve that? I want have on appbar some buttons and a place, where user can start draging and drag the appbar on the screen. How to call by starting draging the function, that moves the window with the mousepointer?

Now i hawen't more points, later I send to you more ... :-)
0
pistacer
Asked:
pistacer
  • 6
  • 4
1 Solution
 
MadshiCommented:
Try to use a TBevel instead of a TPanel.
0
 
pistacerAuthor Commented:
with bevel it does not work ... I have simply modified the DemoApp by putting the bevel as allclient on it. Draging is unsuccesfull. Only when i drag by a Titlebar.
0
 
MadshiCommented:
Then override the WM_ERASEBKGND message. In wParam of the message you get a canvas handle.

Something like this:

  private
    procedure WMEraseBkgnd(var Message: TWMEraseBkgnd); message WM_ERASEBKGND;

procedure TAppbarFormOrHoweverItWasCalled.WMEraseBkgnd(var Message: TWMEraseBkgnd);
var canvas : TCanvas;
begin
  canvas := TCanvas.Create;
  try
    canvas.handle := Message.dc;
    try
      // here you can paint on canvas
      // e.g. draw a 3d frame
      // or a background image
    finally canvas.handle:=0 end;
  finally canvas.Free end;
end;
0
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
pistacerAuthor Commented:
may be, here is an misanderstundnis. i must say, my english is bad, :-).

The point is not paint to form. I need only catch mouse event on bevel and act it like the bevel would not be there - call apropriate form method.

when mouse is over form with bevel as allclient, ower clientarea, I press LmouseButton and drag the mouse. If form is floating, it moves, if it is docked, it can undock and move. Just like a form without bevel ...

i tried use the windowproc, but that was not good.
0
 
MadshiCommented:
Well, as far as I understood you, you want to use a TPanel (or TBevel), because you don't like the frame of the appbar window. Okay, you could solve that by using a TPanel, but you can also solve that by overriding WM_ERASEBKGND and draw a nice frame yourself.

If you want to use a TPanel, you probably have to override the WM_NCHITTEST message and give back HTCAPTION.

Look at
  procedure TAppBar.OnNcHitTest (var Msg: TWMNCHitTest);

I think you need to do the same with your panel.
0
 
pistacerAuthor Commented:
that is huge! I am not so advancet in delphi or win programming!
0
 
pistacerAuthor Commented:
Adjusted points to 25
0
 
pistacerAuthor Commented:
ok, i mean, appbar is satisfactory. informations you have send was helpfull.
thank you for help, next points i'll send to you later ...
0
 
MadshiCommented:
:-)   You don't need to send me more points...
0
 
pistacerAuthor Commented:
ok, it is not the last time, i have you something asked, do not it?

.... and thank you again!
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 6
  • 4
Tackle projects and never again get stuck behind a technical roadblock.
Join Now