Click here to Skip to main content
15,900,906 members
Home / Discussions / C#
   

C#

 
Generalsetup wizard Pin
Boniolopez8-Jan-05 4:49
Boniolopez8-Jan-05 4:49 
GeneralHelp on AlternatingBackColor Pin
monn8-Jan-05 2:13
monn8-Jan-05 2:13 
GeneralRe: Help on AlternatingBackColor Pin
Robert Rohde8-Jan-05 7:02
Robert Rohde8-Jan-05 7:02 
GeneralWEB services Pin
MoustafaS8-Jan-05 1:22
MoustafaS8-Jan-05 1:22 
GeneralRe: WEB services Pin
Rein Hillmann8-Jan-05 6:04
Rein Hillmann8-Jan-05 6:04 
GeneralGet the Stream Pin
Snowjim8-Jan-05 1:16
Snowjim8-Jan-05 1:16 
GeneralRe: Get the Stream Pin
Snowjim8-Jan-05 4:57
Snowjim8-Jan-05 4:57 
GeneralZoom In and Out in PictureBox Windows forms control Pin
AVaka7-Jan-05 23:21
AVaka7-Jan-05 23:21 
I've a windows form, on which a picturebox is placed. I've loaded images into the picturebox. I've implemented the Zoom In and Zoom out functinality. Now my problem is when I zoom in, the picturebox is not spreading equally in the form. I mean the distance between picturebox and the container form should be equal, on four sides, as I zoom in and out ( the picturebox should be exactly centered). How can I achive this? Any help?

Here is the piece of code for Zoom In and Out

For Zooming In :

pictureBox1.Top= (int)(pictureBox1.Top - (pictureBox1.Height * 0.025));
pictureBox1.Left = (int)(pictureBox1.Left - (pictureBox1.Width * 0.025));
pictureBox1.Height = (int)(pictureBox1.Height + (pictureBox1.Height* 0.05));
pictureBox1.Width = (int)(pictureBox1.Width + (pictureBox1.Width * 0.05));

For Zooming Out :

pictureBox1.Top = (int)(pictureBox1.Top + (pictureBox1.Height * 0.025));
pictureBox1.Left = (int)(pictureBox1.Left + (pictureBox1.Width * 0.025));
pictureBox1.Height = (int)(pictureBox1.Height - (pictureBox1.Height* 0.05));
pictureBox1.Width = (int)(pictureBox1.Width - (pictureBox1.Width * 0.05));



Stay cool
GeneralRe: Zoom In and Out in PictureBox Windows forms control Pin
Alex Korchemniy8-Jan-05 5:42
Alex Korchemniy8-Jan-05 5:42 
Generalsystem idle Pin
vyki_c7-Jan-05 23:08
vyki_c7-Jan-05 23:08 
GeneralRe: system idle Pin
Robert Rohde8-Jan-05 0:22
Robert Rohde8-Jan-05 0:22 
Generalscrolling of image Pin
montu33777-Jan-05 22:39
montu33777-Jan-05 22:39 
GeneralRe: scrolling of image Pin
MoustafaS8-Jan-05 1:10
MoustafaS8-Jan-05 1:10 
GeneralRe: scrolling of image Pin
Alex Korchemniy8-Jan-05 5:46
Alex Korchemniy8-Jan-05 5:46 
GeneralRe: scrolling of image Pin
montu33779-Jan-05 19:48
montu33779-Jan-05 19:48 
GeneralDouble click and single click on datagrid Pin
steve_rm7-Jan-05 20:47
steve_rm7-Jan-05 20:47 
GeneralRe: Double click and single click on datagrid Pin
Alex Korchemniy8-Jan-05 5:59
Alex Korchemniy8-Jan-05 5:59 
GeneralAsp .net gantt chart control Pin
amalatsliit7-Jan-05 19:27
amalatsliit7-Jan-05 19:27 
GeneralRe: Asp .net gantt chart control Pin
shruPrasad30-Jan-09 0:07
shruPrasad30-Jan-09 0:07 
GeneralTogle acheckbox Pin
picasso27-Jan-05 18:06
picasso27-Jan-05 18:06 
GeneralRe: Togle acheckbox Pin
Matt Gerrans7-Jan-05 20:53
Matt Gerrans7-Jan-05 20:53 
GeneralRe: Togle acheckbox Pin
Luis Alonso Ramos8-Jan-05 12:34
Luis Alonso Ramos8-Jan-05 12:34 
GeneralAnyone know any good resources (besides codeproject :P) that deal with collections for use in custom controls Pin
FocusedWolf7-Jan-05 17:46
FocusedWolf7-Jan-05 17:46 
GeneralRe: Anyone know any good resources (besides codeproject :P) that deal with collections for use in custom controls Pin
ACorbs8-Jan-05 9:33
ACorbs8-Jan-05 9:33 
GeneralRe: Anyone know any good resources (besides codeproject :P) that deal with collections for use in custom controls Pin
FocusedWolf8-Jan-05 16:48
FocusedWolf8-Jan-05 16:48 

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.