Solved

How to write a shape panel

Posted on 2001-08-08
2
169 Views
Last Modified: 2010-04-06
How to write a shape panel like Office Assistant done?
Any component could be use?

Thanks

Shekou
0
Comment
Question by:shekou
2 Comments
 
LVL 33

Accepted Solution

by:
Slick812 earned 50 total points
Comment Utility
hello shekou, you can set the amount of a control or form that you can see with a "Region". A region tells windows OS what part is allowed to be used (visible and gets mouse clicks). you can set the region in the Forms OnCreate event. This will make Panel1 Elipitcal - - - -


private
    { Private declarations }
    Rgn1 : HRGN;


procedure TForm1.FormCreate(Sender: TObject);
begin
Rgn1 := CreateEllipticRgn(Panel1.BoundsRect.Left-Panel1.Left, Panel1.BoundsRect.Top-Panel1.Top, Panel1.BoundsRect.Right-Panel1.Left, Panel1.BoundsRect.Bottom-Panel1.Top);
  SetWindowRgn(Panel1.Handle, Rgn1, TRUE);
end;


// be sure to Release the Region
procedure FormDestroy(Sender: TObject);
begin
DeleteObject(Rgn1);
end;


you can create Regions of many different shapes
0
 

Author Comment

by:shekou
Comment Utility
tried, but not work.

Thanks

Chiwan
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now