Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Rounded  rectangular panel

Posted on 2000-04-14
8
Medium Priority
?
292 Views
Last Modified: 2010-04-04
Is there any available component to implement rounded rectangular panel?
0
Comment
Question by:Yuli
  • 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 60 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
Industry Leaders: 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

Industry Leaders: 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!

Question has a verified solution.

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

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Screencast - Getting to Know the Pipeline
Suggested Courses

926 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