From: K on
i got code below which works fine but i cant see image which is in
My.Resources in webbrowser. Please can any friend help

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
Dim imge
imge = My.Resources.Smile
Me.WebBrowser1.Navigate("about:<html><marquee scrolldelay=130>
Hello World<body leftmargin='0' rightmargin='0' topmargin='5'
bottommargin='0'><img src ='imge' height=20 width=20></img></body></
marquee></html>")
End Sub
From: Family Tree Mike on
On 3/19/2010 7:42 AM, K wrote:
> i got code below which works fine but i cant see image which is in
> My.Resources in webbrowser. Please can any friend help
>
> Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles MyBase.Load
> Dim imge
> imge = My.Resources.Smile
> Me.WebBrowser1.Navigate("about:<html><marquee scrolldelay=130>
> Hello World<body leftmargin='0' rightmargin='0' topmargin='5'
> bottommargin='0'><img src ='imge' height=20 width=20></img></body></
> marquee></html>")
> End Sub

There is probably a way to include an imbedded image into your html.
That is what you would need to do, as the img tag tells the browser to
fetch the image from a file, defaulting to the same server as the html.
Your application has no way of accepting requests from this html to
send the image to the browser.

--
Mike
From: Herfried K. Wagner [MVP] on
Am 19.03.2010 22:02, schrieb Family Tree Mike:
> On 3/19/2010 7:42 AM, K wrote:
>> i got code below which works fine but i cant see image which is in
>> My.Resources in webbrowser. Please can any friend help
>>
>> Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
>> System.EventArgs) Handles MyBase.Load
>> Dim imge
>> imge = My.Resources.Smile
>> Me.WebBrowser1.Navigate("about:<html><marquee scrolldelay=130>
>> Hello World<body leftmargin='0' rightmargin='0' topmargin='5'
>> bottommargin='0'><img src ='imge' height=20 width=20></img></body></
>> marquee></html>")
>> End Sub
>
> There is probably a way to include an imbedded image into your html.

'data' URIs (however, these are not supported by all versions of IE).

> That is what you would need to do, as the img tag tells the browser to
> fetch the image from a file, defaulting to the same server as the html.
> Your application has no way of accepting requests from this html to send
> the image to the browser.

You could also embed the images as Win32 resources and reference them
using the 'res' URI scheme.

The 'SelectWin32Resource' macro might be useful when taking this
approach. Win32 resources can be created using Visual Studio, for example.

<URL:http://dotnet.mvps.org/dotnet/code/application/#Win32Resource>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
 | 
Pages: 1
Prev: inherits class.
Next: Deploying sql server app