Click here to Skip to main content
15,909,325 members
Home / Discussions / C#
   

C#

 
QuestionFlowLayoutPanel just like in .NET 2.0? Pin
Carl Mercier20-Apr-05 9:58
Carl Mercier20-Apr-05 9:58 
AnswerRe: FlowLayoutPanel just like in .NET 2.0? Pin
Carl Mercier20-Apr-05 14:48
Carl Mercier20-Apr-05 14:48 
Generalreading text files Pin
gonzalesman20-Apr-05 8:45
gonzalesman20-Apr-05 8:45 
GeneralRe: reading text files Pin
DavidNohejl20-Apr-05 10:02
DavidNohejl20-Apr-05 10:02 
QuestionHow to move and zoom an image? Pin
jinzhecheng20-Apr-05 6:57
jinzhecheng20-Apr-05 6:57 
AnswerRe: How to move and zoom an image? Pin
leppie20-Apr-05 8:45
leppie20-Apr-05 8:45 
GeneralRe: How to move and zoom an image? Pin
jinzhecheng23-Apr-05 8:52
jinzhecheng23-Apr-05 8:52 
GeneralRe: How to move and zoom an image? Pin
NortonC21-May-05 12:25
NortonC21-May-05 12:25 
Hi,
I'm quite new to C# especially when using GDI+. I saw the solution for zooming an image, but I didn't manage to zoom.
I couldn't quite understand what the parameters in "new Matrix(scale,0,0,scale, xoffest, yoffset);" mean I think Smile | :)
In order to zoom my image by 25% I implemented your code in the following way:

float scale = 25f/100f;
pictureBox.Image.Save("OriginalImage.png",ImageFormat.Png);
Graphics g = Graphics.FromImage(pictureBox.Image);
g.Transform = new Matrix(scale,0,0,scale, 0, 0);
pictureBox.Image.Save("ResizedImage.png", ImageFormat.Png);
pictureBox.Image = Image.FromFile("ResizedImage.png"); //to load the new image

What am I doing wrong please?

Thanks A Lot!
C.N.


Generalconnected to ms sql server Pin
the pink jedi20-Apr-05 6:56
the pink jedi20-Apr-05 6:56 
GeneralRe: connected to ms sql server Pin
Scott Serl20-Apr-05 7:41
Scott Serl20-Apr-05 7:41 
GeneralRe: connected to ms sql server Pin
the pink jedi20-Apr-05 7:56
the pink jedi20-Apr-05 7:56 
GeneralRe: connected to ms sql server Pin
Luis Alonso Ramos20-Apr-05 17:00
Luis Alonso Ramos20-Apr-05 17:00 
GeneralQuestion about properties Pin
xdavidx20-Apr-05 6:55
xdavidx20-Apr-05 6:55 
GeneralRe: Question about properties Pin
Colin Angus Mackay20-Apr-05 10:53
Colin Angus Mackay20-Apr-05 10:53 
GeneralRe: Question about properties Pin
Andy Moore20-Apr-05 10:55
Andy Moore20-Apr-05 10:55 
GeneralRe: Question about properties Pin
S. Senthil Kumar20-Apr-05 18:01
S. Senthil Kumar20-Apr-05 18:01 
GeneralRe: Question about properties Pin
James T. Johnson20-Apr-05 19:41
James T. Johnson20-Apr-05 19:41 
GeneralThreading Question Pin
sameerhanda20-Apr-05 5:55
sameerhanda20-Apr-05 5:55 
GeneralRe: Threading Question Pin
Stefan Troschuetz20-Apr-05 6:25
Stefan Troschuetz20-Apr-05 6:25 
GeneralUpdater Application Block, version 2.0 is not able to download the files with extension .config Pin
NarayanVl20-Apr-05 5:37
NarayanVl20-Apr-05 5:37 
Generalthe way to load the application to web server Pin
Member 137005820-Apr-05 5:10
Member 137005820-Apr-05 5:10 
GeneralCalling a function by it's name which has been stored in a string Pin
Gareth_Hastings20-Apr-05 4:37
Gareth_Hastings20-Apr-05 4:37 
GeneralRe: Calling a function by it's name which has been stored in a string Pin
S. Senthil Kumar20-Apr-05 4:52
S. Senthil Kumar20-Apr-05 4:52 
GeneralRe: Calling a function by it's name which has been stored in a string Pin
Gareth_Hastings20-Apr-05 5:06
Gareth_Hastings20-Apr-05 5:06 
GeneralRe: Calling a function by it's name which has been stored in a string Pin
S. Senthil Kumar20-Apr-05 5:54
S. Senthil Kumar20-Apr-05 5:54 

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.