Esto lo habras sacado de acá:http://www.runelocus.com/forums/archive/index.php/t-25306.html
Twisted
21st February 2009, 01:13
Hello, I'm not sure what the rule is on double posting here so I'm sorry if there is one. Just thought id let twisted know something.
This code might interest you, allows you to loads a picture from a url to a picturebox.
Private Type TGUID
Data1 As Long
Data2 As Integer
Data3 As Integer
Data4(0 To 7) As Byte
End Type
Private Declare Function OleLoadPicturePath Lib "oleaut32.dll" (ByVal szURLorPath As Long, ByVal punkCaller As Long, ByVal dwReserved As Long, ByVal clrReserved As OLE_COLOR, ByRef riid As TGUID, ByRef ppvRet As IPicture) As Long
Public Function LoadPicture(ByVal filename As String) As Picture
Dim myTGUID As TGUID
myTGUID.Data1 = &H7BF80980
myTGUID.Data2 = &HBF32
myTGUID.Data3 = &H101A
myTGUID.Data4(0) = &H8B
myTGUID.Data4(1) = &HBB
myTGUID.Data4(2) = &H0
myTGUID.Data4(3) = &HAA
myTGUID.Data4(4) = &H0
myTGUID.Data4(5) = &H30
myTGUID.Data4(6) = &HC
myTGUID.Data4(7) = &HAB
On Error GoTo LblError
OleLoadPicturePath StrPtr(filename), 0, 0, 0, myTGUID, LoadPicture
Exit Function
LblError:
MsgBox Err.Description
Set LoadPicture = VB.LoadPicture(filename)
End Function
Also if you would like me to convert any code from vb.net version to vb6 i am more than willing to.
Nah nah its cool.
But by the looks of things that loads a picture from a image file on your computer, And i tried to do this, It only worked for as i said files already on the computer. I was looking for ones that load of the internet kinda like the code that you just gave me except it work's for links like:
Image1.Picture = VB.LoadPicture("
http://garcya.us/images/car-wallpapers19.jpg")Thats a link to a car, I didn't work with the code it gave me an error.
But once i downloaded it put it in C:/ i just change the code to.
Image1.Picture = VB.LoadPicture("C:/car-wallpapers19.jpg")
And it worked great.
So in other words do you have a code like this, but loads of an image from a URL rather then a location on your Computer?
P.S
I just found out with your code you can adjust the size, color depth, and the X and Y coord's for the picture.
Nice .DLL there lol.