![]() |
|
[.NET] [VB.NET]Resize image to fit in picturebox - Printable Version +- Hack Forums (https://hackforums.net) +-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444) +--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151) +---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118) +---- Thread: [.NET] [VB.NET]Resize image to fit in picturebox (/showthread.php?tid=397063) |
[VB.NET]Resize image to fit in picturebox - codepoet - May 1, 2010 originally posted on dotnet-snippets.com Description: Automatically resize an image so it shows ok in the picturebox on your form. It doesn't change the actual image. Code Public Sub AutosizeImage(ByVal ImagePath As String, ByVal picBox As PictureBox, Optional ByVal pSizeMode As PictureBoxSizeMode = PictureBoxSizeMode.CenterImage)If You Like this tutorial, please check out my other tutorials by clicking ==> H3R3 * - Zer0Fact0r - May 1, 2010 Lol or you could set the PictureBox's SizeMode to Zoom. * - codepoet - May 1, 2010 (May 1, 2010 09:03 PM)Zer0Fact0r Wrote: Lol or you could set the PictureBox's SizeMode to Zoom. no comment...considering your post count. * - DeadCode - May 1, 2010 (May 1, 2010 09:03 PM)Zer0Fact0r Wrote: Lol or you could set the PictureBox's SizeMode to Zoom. This is correct. * - Dragon Hawk - May 2, 2010 (May 1, 2010 09:03 PM)Zer0Fact0r Wrote: Lol or you could set the PictureBox's SizeMode to Zoom. but some time it doesnt works it has happened to me thanks crow * - ๖ۣۜBlueAce™ - May 2, 2010 (May 1, 2010 09:06 PM)crow407 Wrote: no comment...considering your post count. why.. what he said is absolutely right .. i believe... 😉 * - HaXZX0r - May 2, 2010 Or you can set the picturebox´s sizemode to STRETCHIMAGE * - codepoet - May 2, 2010 (May 2, 2010 12:07 AM)BlueAce_Pragy Wrote: why.. what he said is absolutely right .. i believe... 😉 he is right but the point of this tutorial is to give you an option...and he made it seem like this code is useless...but i don't want to flame so just for get it. * - Deathader - May 2, 2010 (May 2, 2010 02:12 AM)HaXZX0r Wrote: Or you can set the picturebox´s sizemode to STRETCHIMAGE /thread |