<div dir="ltr"><div dir="ltr">Hi Fabien,<br>very interesting, excellent result and little work :-D<br><br>My problem is to adapt a sequence of images of different format and type in a single film-like image (to be clear).<br>I thought about doing so, this is just the first part of the code (now I use the mouse wheel just to try), I do not think I can adapt your code here.<br><br>The idea (idiot) came to me from a question on our forum and so I would like to build an image viewer that shows a random image like a slot machine, now I start to study how to give it the movement (I do not know if two images series are enough).<br>You can lose a lot of money by betting us over ;-D</div><div dir="ltr"><br></div><div>Regards</div><div>Gianluigi<br></div></div><br><div class="gmail_quote"><div dir="ltr">Il giorno sab 1 dic 2018 alle ore 08:44 Fabien Bodard <<a href="mailto:gambas.fr@gmail.com">gambas.fr@gmail.com</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi dear friend<div><br></div><div>This is the same with less work ;-)</div><div><br></div><div>Regards</div><div><br></div><div>Fabien Bodard</div></div><br><div class="gmail_quote"><div dir="ltr">Le ven. 30 nov. 2018 à 16:30, Gianluigi <<a href="mailto:bagonergi@gmail.com" target="_blank">bagonergi@gmail.com</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">Finally it works<br>See attached file</div><div dir="ltr"><br></div><div>Reagards</div><div>Gianluigi<br></div></div><br><div class="gmail_quote"><div dir="ltr">Il giorno ven 30 nov 2018 alle ore 15:39 Gianluigi <<a href="mailto:bagonergi@gmail.com" target="_blank">bagonergi@gmail.com</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">This is the correct code (?):<br><br>[code]Private Sub Scale(img As Image)<br><br>  Dim w, h As Integer<br><br>  w = img.W<br>  h = img.H<br>  If h > w Then<br>    $H = PictureBox1.H<br>    $W = (PictureBox1.H * w) \ h<br>    If $W > PictureBox1.W Then<br>      $W = PictureBox1.W<br>      $H = (PictureBox1.W * $H) \ $W<br>      $X = PictureBox1.X<br>      $Y = PictureBox1.Y + ((PictureBox1.H - $H) \ 2)<br>      Return<br>    Endif<br>    $Y = PictureBox1.Y<br>    $X = PictureBox1.X + ((PictureBox1.W - $W) \ 2)<br>  Else<br>    $W = PictureBox1.W<br>    $H = (PictureBox1.W * h) \ w<br>    If $H > PictureBox1.H Then<br>      $H = PictureBox1.H<br>      $W = (PictureBox1.H * $W) \ $H<br>      $Y = PictureBox1.Y<br>      $X = PictureBox1.X + ((PictureBox1.W - $W) \ 2)<br>      Return<br>    Endif<br>    $X = PictureBox1.X<br>    $Y = PictureBox1.Y + ((PictureBox1.H - $H) \ 2)<br>  Endif<br><br>End [/code]<br><br>Although I would love to be able to create a code capable of scaling images on the Form_Resize event<br>A task too burdensome for my tired brain.<br><br>Regards<br>Gianluigi<br></div></div><br><div class="gmail_quote"><div dir="ltr">Il giorno ven 30 nov 2018 alle ore 13:10 Gianluigi <<a href="mailto:bagonergi@gmail.com" target="_blank">bagonergi@gmail.com</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">I need to paint an image in a new image and then show it in a picturebox.<br>The thing seems to work correctly only if the picturebox is the only component on the window.<br>If the hbox is present, the image is deformed (stretching) and the lower part of the image is positioned under the hbox.<br>Am I wrong?<br>I attach a project and two explanatory images (with magnifying glass).</div><div dir="ltr"><br></div><div>Regards</div><div>Gianluigi<br></div></div>
</blockquote></div>
</blockquote></div>
<br>
----[ Gambas mailing-list is hosted by <a href="https://www.hostsharing.net" rel="noreferrer" target="_blank">https://www.hostsharing.net</a> ]----<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="m_6798383027496582623gmail_signature">Fabien Bodard </div>
<br>
----[ Gambas mailing-list is hosted by <a href="https://www.hostsharing.net" rel="noreferrer" target="_blank">https://www.hostsharing.net</a> ]----<br>
</blockquote></div>