Solved

Rounded  rectangular panel

Posted on 2000-04-14
8
285 Views
Last Modified: 2010-04-04
Is there any available component to implement rounded rectangular panel?
0
Comment
Question by:Yuli
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 4
8 Comments
 
LVL 2

Expert Comment

by:craig_capel
ID: 2717962
var
  R: THandle;
 begin
  panel1.color:=clgreen;
  panel1.caption:='';
   R := CreateEllipticRgn(0, 0, 100, 100);
   SetWindowRgn(panel1.Handle, R, True);
end;

ok, if this helps, u may not need a component......


Craig C.

0
 
LVL 1

Accepted Solution

by:
l8knight earned 20 total points
ID: 2756507
or along similar lines

var rgn: HRGN;
begin
  rgn := CreateRoundRectRgn(1,1,Form1.Width,Form1.Height,50,50);
  SetWindowRgn(Handle, Rgn, True);
end;

l8knight
0
 
LVL 2

Expert Comment

by:craig_capel
ID: 2758905
Yuli, Could you be any more ignorant?....

l8knight, thanks for copying the code and posting it as an answer, dont expect help from me if your in need....

Craig C.
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Expert Comment

by:l8knight
ID: 2759265
I beg your pardon,

your code says

CreateEllipticRgn(0, 0, 100, 100);

that's not what he asked for, he didn't want an elipse, he wanted an rounded rectangle...

CreateRoundRectRgn(1,1,Form1.Width,Form1.Height,50,50);

your apology will be accepted,

regards

l8knight
0
 
LVL 2

Expert Comment

by:craig_capel
ID: 2759753
l8, surely by seening the command.....  R := CreateEllipticRgn(0, 0, 100, 100);  he could have looked in the help files....

and as you put it "I beg your pardon" he asked for a GREEN rounded (oval is rounded) rectangle....


 panel1.color:=clgreen;
 panel1.caption:='';

So then, not only this but i posted the code on the "Date: Friday, April 14 2000 - 03:36PM PDT " you posted the code on "Date: Thursday, April 27 2000 - 11:37AM PDT "...

That is telling me that Yuli is ignorant, he never even asked me what the code does, no follow up question no nothin, then u stick a cooment as an answer and take the points, theres really nothing between the code i posted over 13 DAYS ago..... i got no reply no nothing!!!
0
 
LVL 1

Expert Comment

by:l8knight
ID: 2760380
c'mon this is getting ridiculous...

for a start I see no mention of the word GREEN in his question.

Is there any available component to implement rounded rectangular panel?

is all I see.

and to end (i hope) if you actually run your code you get a big fat "GREEN" CIRCLE which is not even close to a rounded rectangle.

l8knight.
0
 
LVL 2

Expert Comment

by:craig_capel
ID: 2760753
well yes its the end.... but theres not such thing as a rounded rectangle.....

ok i had a bad day, and i have had around 8 questions where i have answered with the correct answer but no notice to me since i never made the comment as an answer (yes no green i see now)... god knows where i got that from??....

Craig C.
0
 
LVL 1

Expert Comment

by:l8knight
ID: 2760844
no hard feelings..i hope

I look forward to our next 'discussion' :)

regards

l8knight

p.s. I've been joined with e.e. for only 2 days, it has been an interesting 2 days to say the least :) amazing the amount u can learn from other peoples questions and the answers. l8r
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

739 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