Click here to Skip to main content
15,886,919 members
Home / Discussions / C#
   

C#

 
AnswerRe: How do I delay Windows shutdown with a Console Project in .NET? Pin
DavidWGriffin5-Oct-05 12:05
DavidWGriffin5-Oct-05 12:05 
QuestionCrystal Reports with Multiple Values Pin
dbetting5-Oct-05 2:45
dbetting5-Oct-05 2:45 
QuestionHow to populate bool array with all true values Pin
jills5-Oct-05 2:39
jills5-Oct-05 2:39 
AnswerRe: How to populate bool array with all true values Pin
Stefan Troschuetz5-Oct-05 4:17
Stefan Troschuetz5-Oct-05 4:17 
GeneralRe: How to populate bool array with all true values Pin
jills5-Oct-05 19:38
jills5-Oct-05 19:38 
GeneralRe: How to populate bool array with all true values Pin
Stefan Troschuetz8-Oct-05 1:42
Stefan Troschuetz8-Oct-05 1:42 
Questionremote information processing Pin
andre.pietsch5-Oct-05 1:46
andre.pietsch5-Oct-05 1:46 
QuestionImage Rotation Pin
PHDENG815-Oct-05 1:39
PHDENG815-Oct-05 1:39 
I have the following code to rotate an image:


Image img=new Bitmap(400,400);

//assigned to pictureBox 4
pictureBox4.Image=img;
Graphics g=Graphics.FromImage(pictureBox4.Image);


//Create a new matrix
Matrix mm=new Matrix();

mm=new Matrix(1,0,0,-1,0,0);

mm.Translate(25,104,MatrixOrder.Append);

g.Transform=mm;

Matrix mm1=new Matrix();

mm1.RotateAt(
trackBar1.Value,
new Point(67,2),
MatrixOrder.Append);

GraphicsPath gp=new GraphicsPath();

Image imgpic=(Image)Rotor_pictureBox.Image;

gp.AddPolygon(new Point[]{new Point(0,Rotor_pictureBox.Height),new Point(Rotor_pictureBox.Width,Rotor_pictureBox.Height),new Point(0,0)});


gp.Transform(mm1);

//get the resulting path points
PointF[] pts=gp.PathPoints;

//draw on the picturebox content of imgpic using the local transformation
//using the resulting parralleogram described by pts
g.DrawImage(imgpic,pts);
pictureBox4.Refresh();

This code works great. However, I can't get the image to BrintToFront. I need it to rest on top of another picturebox. If there is another picture box within the rotating image's area, it covers it up. I tried to put an image WITHIN the picturebox that the rotating image is being drawn on, but it doesn't show up. Any help would be much appreciated. Thanks.



D

-- modified at 7:41 Wednesday 5th October, 2005
Questionmove form without title bar Pin
Rizwan Bashir4-Oct-05 23:59
Rizwan Bashir4-Oct-05 23:59 
AnswerRe: move form without title bar Pin
PHDENG815-Oct-05 1:31
PHDENG815-Oct-05 1:31 
Questionjoining excel sheet to c#(Ado.net) but giving error Pin
Member 23064614-Oct-05 23:23
Member 23064614-Oct-05 23:23 
QuestionHow To Convert IHTMLElement to IHTMLElementRender Pin
prochf4-Oct-05 22:04
prochf4-Oct-05 22:04 
QuestionNeed a recursive logic Pin
Chetan Ranpariya4-Oct-05 21:34
Chetan Ranpariya4-Oct-05 21:34 
QuestionProcess terminating event Pin
Prashant Gadhave4-Oct-05 21:31
Prashant Gadhave4-Oct-05 21:31 
AnswerRe: Process terminating event Pin
Stefan Troschuetz4-Oct-05 21:55
Stefan Troschuetz4-Oct-05 21:55 
QuestionAsynchronous Callback Pin
Member 22045224-Oct-05 20:53
Member 22045224-Oct-05 20:53 
AnswerRe: Asynchronous Callback Pin
Stefan Troschuetz4-Oct-05 22:14
Stefan Troschuetz4-Oct-05 22:14 
AnswerRe: Asynchronous Callback Pin
S. Senthil Kumar5-Oct-05 1:25
S. Senthil Kumar5-Oct-05 1:25 
QuestionSome problem regarding access permission Pin
akshayswaroop4-Oct-05 19:32
akshayswaroop4-Oct-05 19:32 
QuestionPlaying dat files through C# code Pin
Prashant Gadhave4-Oct-05 18:56
Prashant Gadhave4-Oct-05 18:56 
AnswerRe: Playing dat files through C# code Pin
leppie4-Oct-05 20:47
leppie4-Oct-05 20:47 
QuestionCreating a xaml project with visual c# Pin
TssPrasad4-Oct-05 18:53
sussTssPrasad4-Oct-05 18:53 
QuestionRe: Creating a xaml project with visual c# Pin
David Stone4-Oct-05 20:51
sitebuilderDavid Stone4-Oct-05 20:51 
QuestionCellChangedDataEvent Pin
RoboIchi4-Oct-05 18:32
RoboIchi4-Oct-05 18:32 
Question2 server Pin
aarontan4-Oct-05 18:27
aarontan4-Oct-05 18: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.