I have a jpg image hight 134 pixel and width 103 pixel.
possible, before, to set into the picturebox , to resize the jpg image in hight 115 pixel and width 103?
Tks.
picturebox resize image before to insert into
-
- PlatinumLounger
- Posts: 4276
- Joined: 26 Apr 2010, 17:36
-
- Administrator
- Posts: 77287
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: picturebox resize image before to insert into
What is the size of the PictureBox control?
Regards,
Hans
Hans
-
- PlatinumLounger
- Posts: 4276
- Joined: 26 Apr 2010, 17:36
-
- Administrator
- Posts: 77287
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: picturebox resize image before to insert into
Can't you use an Image control and set its Stretch property to True?
Regards,
Hans
Hans
-
- PlatinumLounger
- Posts: 4276
- Joined: 26 Apr 2010, 17:36
-
- Administrator
- Posts: 77287
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
-
- PlatinumLounger
- Posts: 4276
- Joined: 26 Apr 2010, 17:36
Re: picturebox resize image before to insert into
TK.
I see tonight.
-
- PlatinumLounger
- Posts: 4276
- Joined: 26 Apr 2010, 17:36
Re: picturebox resize image before to insert into
ops..
my piturebox is called PICCOM
how to modify in:
Code: Select all
Option Explicit
Private Sub Form_Load()
Picture1.Picture = LoadPicture("C:\test\test.gif")
Picture1.ScaleMode = 3
Picture1.AutoRedraw = True
Picture1.PaintPicture Picture1.Picture, _
0, 0, Picture1.ScaleWidth, Picture1.ScaleHeight, _
0, 0, Picture1.Picture.Width / 26.46, _
Picture1.Picture.Height / 26.46
Picture1.Picture = Picture1.Image
End Sub
-
- 4StarLounger
- Posts: 452
- Joined: 27 Jun 2021, 10:46
Re: picturebox resize image before to insert into
Simply replace the word Picture1 with the word PICCOM ...
-
- PlatinumLounger
- Posts: 4276
- Joined: 26 Apr 2010, 17:36