<div dir="ltr"><div dir="ltr"><div>Hi Fabien,</div><div>I attach the RandomRotaPic little project based on your algorithm.<br>What do you think about it?</div><div><br></div><div>Regards</div><div>Gianluigi<br></div></div></div><br><div class="gmail_quote"><div dir="ltr">Il giorno mer 5 dic 2018 alle ore 11:07 Gianluigi <<a href="mailto:bagonergi@gmail.com">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">Hi Fabien,<br>excellent :-D<br>That's exactly what I was looking for.<br>Thank you very much.<br>(Google had inserted your email into spam, Google is really smart GRRR!)<br><br>Regards<br>Gianluigi<br></div></div><br><div class="gmail_quote"><div dir="ltr">Il giorno mar 4 dic 2018 alle ore 23:08 Fabien Bodard <<a href="mailto:gambas.fr@gmail.com" target="_blank">gambas.fr@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">ouch not Draw.Image ... but Paint.DrawImage... Draw is Obsolete<br></div><br><div class="gmail_quote"><div dir="ltr">Le mar. 4 déc. 2018 à 22:59, Fabien Bodard <<a href="mailto:gambas.fr@gmail.com" target="_blank">gambas.fr@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>This is a new version ... i have forget to reinit the initial position when the first image reach the view top.</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr">Le mar. 4 déc. 2018 à 22:38, Fabien Bodard <<a href="mailto:gambas.fr@gmail.com" target="_blank">gambas.fr@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>Sorry for the late :-)</div><div><br></div><div>I think this is what you are looking for :-)... and there is not picture box any more.<br></div></div><br><div class="gmail_quote"><div dir="ltr">Le sam. 1 déc. 2018 à 22:19, Fabien Bodard <<a href="mailto:gambas.fr@gmail.com" target="_blank">gambas.fr@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">no<div>I will try to show you an example tomorow</div></div><br><div class="gmail_quote"><div dir="ltr">Le sam. 1 déc. 2018 à 19:43, 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">do you mean: Using two pictureboxes, moving and loading them to make a smooth movement appear?<br>Ok, I'll try but not today</div><div dir="ltr"><br></div><div>Regards<br></div></div><br><div class="gmail_quote"><div dir="ltr">Il giorno sab 1 dic 2018 alle ore 18:57 Fabien Bodard <<a href="mailto:gambas.fr@gmail.com" target="_blank">gambas.fr@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">you must not load images in one image... in fact you must load each image in a image variable.<div><br></div><div>then you manage the layout during the drawing event. </div><div><br></div><div>a timer trigger call the drawing area event when needed ... during the move.</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr">Le sam. 1 déc. 2018 à 18:28, 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"><div>Hi Fabien,</div><div>the idea of loading images into one image was silly and I should have understood it right away.<br>Too heavy.<br>Aborted project.</div><div><br></div><div>Regards</div><div>Gianluigi<br></div></div></div><br><div class="gmail_quote"><div dir="ltr">Il giorno sab 1 dic 2018 alle ore 15:21 Fabien Bodard <<a href="mailto:gambas.fr@gmail.com" target="_blank">gambas.fr@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">Ok I seen the idea ...<div><br></div><div>For the movement you can take a look in the FAbout of the ide code</div></div><br><div class="gmail_quote"><div dir="ltr">Le sam. 1 déc. 2018 à 14:05, 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">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" target="_blank">gambas.fr@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">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="gmail-m_6283900440992186591m_-4946885880401936870gmail-m_-3451944015644814164gmail-m_1164076545240565930gmail-m_7850098805903839706gmail-m_7371377761759670966m_-1726766403711918942gmail-m_-4764406677813806509m_8418154266433698496gmail-m_8167090191798709524m_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>
<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="gmail-m_6283900440992186591m_-4946885880401936870gmail-m_-3451944015644814164gmail-m_1164076545240565930gmail-m_7850098805903839706gmail-m_7371377761759670966m_-1726766403711918942gmail-m_-4764406677813806509m_8418154266433698496gmail_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>
<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="gmail-m_6283900440992186591m_-4946885880401936870gmail-m_-3451944015644814164gmail-m_1164076545240565930gmail-m_7850098805903839706gmail-m_7371377761759670966m_-1726766403711918942gmail_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>
<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="gmail-m_6283900440992186591m_-4946885880401936870gmail-m_-3451944015644814164gmail-m_1164076545240565930gmail-m_7850098805903839706gmail_signature">Fabien Bodard </div>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail-m_6283900440992186591m_-4946885880401936870gmail-m_-3451944015644814164gmail-m_1164076545240565930gmail_signature">Fabien Bodard </div>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail-m_6283900440992186591m_-4946885880401936870gmail-m_-3451944015644814164gmail_signature">Fabien Bodard </div>
</blockquote></div><br clear="all"><br>-- <br><div dir="ltr" class="gmail-m_6283900440992186591m_-4946885880401936870gmail_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>
</blockquote></div>