473,404 Members | 2,137 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

Using in-memory interfaces for images in Browser Control?

Hello all,

Suppose I am using the browser control in my application to display my
own HTML code. Now, suppose I want to show images on the page that I
currently have in memory.

One way to do this is to write the image to the file system...
presumably the temp space... and then grab the IHtmlImgElement object,
and set the source to the file location. This works really well.

BUT, lets now assume that I do not have access to write to the file
system. I have the image data in a memroy buffer... how do I hand that
to the DOM or browser control, and bypass the act of having the control
use the src attribute?

Are there any callbacks that I am missing, where I can override the
default download behavior? Something where the browser control says
"Hey! I need image blahblablah!" and I say "Here! Use this buffer as
your image!"

Anything? Any ideas? Thanks,
Brian

P.S. Although it shouldnt matter, I am using C# with .NET 2.0

May 23 '06 #1
5 1996
Brian,

I don't think you 'll be able to tamper with the DOM of the document in
such a way in order to achieve the thing you want.

You could try to implement IDocHostUIHandler and TranslateUrl to point
to Isolated Storage (where I think you can write ...) for a given image
URL request.

hmmm... nothing better than that.

Regards,
Tasos

May 23 '06 #2
Well, I am really looking for any solution... through the DOM or not.

I have come across the concept of "Asynchronous Pluggable Protocols".
It seems as if I can register a protocol type (ex. MyProt) and register
my handlers for the protocol to return data through a memory interface.
Then, through the DOM, I think I can set the image source (ex.
img.source = "MyProt://ImageID=3344";) and my handler will return the
proper image.

Has anyone done this in C#? I think I will need to hook into some COM
interop... but I havent looked into it enough yet.

May 23 '06 #4
Hi All,

OLECMD_Paste ?

1. Copy image to clipboard memory
2. Navigate to insertion point in document
3. run WB.Exec OLECMD_Paste
".neter" <gw*****@poczta.onet.pl> wrote in message
news:e4**********@news.onet.pl...
Asynchronous Pluggable Protocols
http://msdn.microsoft.com/workshop/n...w/overview.asp
http://www.devx.com/webdev/Article/17120

May 23 '06 #5
That is a very interesting backup plan! I already have a working
mockup of Asynchronous Pluggable Protocols to load an image, and it
works really well. If I run into any snags, I will look into that
option, though I am not sure how reliable the method will be... since I
need to make sure the cursor is placed in exactly the correct place.

Thanks,
Brian

May 24 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

28
by: Anthony Williams | last post by:
Good morning, I'm currently designing a site, using CSS, and wish to create a variable width two-column layout, with header and footer, and one fixed-width column on the left. Previously, I...
26
by: codymanix | last post by:
Last night I had several thought about RAII and want to discuss a bit. Why doesn't CSharp support destructors in structs? Wouldn't that make RAII possible like in C++? When the struct goes out of...
4
by: Marshall Mills | last post by:
As I understand it, loaded statement, a using declaration should be all I need to see an enum from within a namespace. The below code works fine with class, struct, and union. What gives? As the...
14
by: john.burton.email | last post by:
I've done some extensive searching and can't seem to find an answer to this - Is it correct to using "using" with templates, for example: using std::vector; Or do I need to specify the type...
1
by: Matt | last post by:
Hi everyone, I'm using the command mysqlcheck --all-databases --auto-repair --silent and I see these warnings (listed below) on a daily occurrence. Is mysqlcheck causing these warnings? I...
5
by: Stuart Robertson | last post by:
I am trying to find a solution that will allow me to use XmlSerializer to serialize/deserialize a collection of objects where a given object is shared between two or more other objects, and not...
4
by: Ashish | last post by:
Hi Guys I am getting the following error while implementing authentication using WS-security. "Microsoft.Web.Services2.Security.SecurityFault: The security token could not be authenticated...
3
by: Mike L | last post by:
Should the command call "using" be before or after my namespace? **AFTER** namespace DataGridBrowser { using System; using System.Drawing; using System.Drawing.Drawing2D; using...
3
by: INeedADip | last post by:
Are the using statements at the top of each .cs file mainly for UI and type compatibility, or do they actually create dependencies for each page. When I create a new aspx page the following...
4
by: TheLostLeaf | last post by:
Heres a noob question. Does it waste system resources if you include using statements at the top of the code page, but your code never uses them ? For example should you go through every .cs file...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.