Page loading

Share your opinion
What do you think about gambaslinux.fr?
 
Interesting
It miss some informations
Excellent website
Results
WIDGETS GAMBAS
GAMBAS 3 SOFTWARES
TUTORIALS
Library
_gb3.pngPICTUREBOX - Pste picture from internet

Paste picture from internet webpage to your gambas software



Hi,
In this tutorial, we'll learn how to copy one internet image on web page, and paste inside our gambas application, and save on our computer.

Info : I have done one stock management software for shop, and they needed pictures on every articles. It's one of a lot of using.
Let begin now.

3 actions to do :

1) Copy photo from internet page
 go on internet webpage of your choice, right click on one picture and 'copy picture'

2) Paste photo
 On your gambas software put one button 'named 'bpaste' and one picturebox named 'pphoto.

Code to paste will be :


Public Sub bcoller_Click()
Dim myimg As Image
myimg = Clipboard.Paste("image/png")
If myimg <> Null Then
pphoto.Picture = myimg.Picture
Else
Message.Info("Veuillez d'abord copier une image dans le presse papier!")
Endif
End

3) Save photo

Picture could be save on your computer with this code :

dim maphoto as new picture
maphoto = pphoto.Picture
maphoto.Save("myphoto.png", 500)
You can resize photo following this tuto here.

Thx for your attention!
 ;)

Creation date : 03/02/2019 @ 20:42
Last update : 30/03/2022 @ 11:55
Category : PICTUREBOX
Page read 2859 times


Print the article Print the article


react.gifReactions to this article

Nobody gave a comment yet.
Be the first one to do it!


QUICK MENU
SEARCH




LANGUAGE
COMPONENTS
Other
LANGUAGE
Where, who?
VISITS

   visitors

   visitors online

ARCHIVES GAMBAS 1/2
^ Top ^