Click here to Skip to main content
15,897,704 members
Home / Discussions / C#
   

C#

 
QuestionFile Icon Pin
Mr Marchepane8-Mar-06 4:52
Mr Marchepane8-Mar-06 4:52 
AnswerRe: File Icon Pin
redfish348-Mar-06 6:31
redfish348-Mar-06 6:31 
QuestionWebservices (RPC+SOAP) Pin
mpuerto8-Mar-06 4:20
mpuerto8-Mar-06 4:20 
QuestionTableLayoutPanel question Pin
Drew McGhie8-Mar-06 4:10
Drew McGhie8-Mar-06 4:10 
QuestionGraphics in C# Pin
Jeea20068-Mar-06 3:42
Jeea20068-Mar-06 3:42 
AnswerRe: Graphics in C# Pin
Judah Gabriel Himango8-Mar-06 3:55
sponsorJudah Gabriel Himango8-Mar-06 3:55 
GeneralRe: Graphics in C# Pin
Jeea200618-Mar-06 22:49
Jeea200618-Mar-06 22:49 
AnswerRe: Graphics in C# Pin
_awatts8-Mar-06 9:05
_awatts8-Mar-06 9:05 
You culd alwys try the Matrix clss.... sorry, only messing about with the spelling. Big Grin | :-D

Try the Matrix class. Create an instance of it, call the Rotate() method passing the new angle, then pass the matrix instance to the graphics object's Transform property, then call the graphics object's Draw routines as if you were drawing as normal. The Matrix class should convert your calls to DrawRectangle. Simply change the angle everytime the keyboard is pressed, then redraw.

For example
<br />
Graphics g = e.Graphics;<br />
Matrix matrix = new Matrix();<br />
matrix.Rotate( 45 );<br />
g.Transform = matrix;<br />
g.DrawRectangle( Pens.Black, x, y, width, height );<br />


By the way I've not tried this just yet, but I know it works when drawing lines.

Andy
GeneralRe: Graphics in C# Pin
Jeea200618-Mar-06 23:01
Jeea200618-Mar-06 23:01 
AnswerRe: Graphics in C# Pin
_awatts20-Mar-06 9:53
_awatts20-Mar-06 9:53 
QuestionAlternatives to DataTable Searches? Pin
Paul Gates8-Mar-06 2:30
Paul Gates8-Mar-06 2:30 
AnswerRe: Alternatives to DataTable Searches? Pin
Wjousts8-Mar-06 3:30
Wjousts8-Mar-06 3:30 
GeneralRe: Alternatives to DataTable Searches? Pin
Paul Gates8-Mar-06 5:07
Paul Gates8-Mar-06 5:07 
QuestionAbout mainFrame communicate with thread Pin
breakhearts8-Mar-06 2:18
breakhearts8-Mar-06 2:18 
AnswerRe: About mainFrame communicate with thread Pin
mav.northwind8-Mar-06 2:54
mav.northwind8-Mar-06 2:54 
QuestionDeclaring a arrays of objects dynamically Pin
winpoorni8-Mar-06 1:12
winpoorni8-Mar-06 1:12 
AnswerRe: Declaring a arrays of objects dynamically Pin
Stefan Troschuetz8-Mar-06 1:32
Stefan Troschuetz8-Mar-06 1:32 
AnswerRe: Declaring a arrays of objects dynamically Pin
Divyang Mithaiwala8-Mar-06 1:51
Divyang Mithaiwala8-Mar-06 1:51 
QuestionRe: Declaring a arrays of objects dynamically Pin
winpoorni8-Mar-06 17:32
winpoorni8-Mar-06 17:32 
AnswerRe: Declaring a arrays of objects dynamically Pin
Divyang Mithaiwala8-Mar-06 17:42
Divyang Mithaiwala8-Mar-06 17:42 
JokeDeclaring a arrays of objects dynamically Pin
winpoorni8-Mar-06 18:25
winpoorni8-Mar-06 18:25 
AnswerRe: Declaring a arrays of objects dynamically Pin
Wjousts8-Mar-06 3:33
Wjousts8-Mar-06 3:33 
AnswerRe: Declaring a arrays of objects dynamically Pin
Judah Gabriel Himango8-Mar-06 4:01
sponsorJudah Gabriel Himango8-Mar-06 4:01 
JokeThanks Pin
winpoorni8-Mar-06 17:41
winpoorni8-Mar-06 17:41 
Questionmanually running class library in cmd Pin
sasire188-Mar-06 0:27
sasire188-Mar-06 0:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.