Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

hi every body , its first sharing with you but now i need to your help

i want to draw rectengle as at picture or this photo

http://www.arabmoheet.net/forum/Members_Upload_Pics/21334/12.JPG

i making a graphic program , when i finished it i will be attach at our forums (xtreme)

i am from egypt so my mother language is arabic , so exuseme for any language error .

good bye my friends.

  • *Experts*
Posted

The term you're looking for is "rounded rectangle" - that might help when you go googling for samples.

 

I've attached a sample C# project that should do what you want.

The project contains two main files: Form1 and ExtendedGraphics.

 

ExtendedGraphics was taken directly from CodeProject, found here:

http://www.codeproject.com/cs/media/ExtendedGraphics.asp

 

Form1 shows just one way to draw the rectangles. I chose to override the OnPaint event of the form, which gives you a Graphics object. Some people use timers (for a game possibly) and will create their own Graphics object. There are some samples on these forums on how to get that working. It's an artform, in a way, to get fast graphics to draw and often comes down to just how much drawing you'll be doing.

 

-ner

GUIDrawing.zip

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
  • *Experts*
Posted

Not sure what you mean by "dotnet not c#" - maybe you mean VB.NET?

 

If so, the article I linked to actually mentions this next article, which has the same code in VB.NET:

http://www.dotnet247.com/247reference/msgs/10/51694.aspx

 

Good luck!!

 

-ner

"I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...