473,769 Members | 1,882 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2015
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 IDocHostUIHandl er 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 "Asynchrono us 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
5560
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 would have used a table to do this, using the following code: <table width="100%">
26
448
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 scope, the dtor could be immediately be called (no GC needed). For that, you don't have to declare the whole File class as a struct (which would be not good for performance when File has a lot of data-members). Instead creating a thin wrapper...
4
642
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 code says, if I employ the using directive, I'm ok. /* built with Visual C++ 6, SP 5 */ namespace Traffic { enum Light { red, yellow, green }; }
14
2173
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 too: using std::vector<int>; Both seem to "work" on the compiler I have and I can't find any documentation saying which is correct, or are both correct?
1
6297
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 can't see how a table can close inappropriately. How can I prevent this. Hoping to here from MySQL users who have came across this. I'm using MySQL 4.1.11 on RHEL.
5
5430
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 create duplicate XML representations of the shared object, but instead use IDREFs to refer to the shared object. The XML I'm trying to produce is as follows (where "href" is an IDREF): <?xml version="1.0" encoding="utf-8"?> <MyRootClass...
4
7986
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 or authorized ---> System.Exception: WSE565: The password provided the SecurityTokenManager does not match the one on the incoming token. at Microsoft.Web.Services2.Security.Tokens.UsernameTokenManager.VerifyPlainText
3
2166
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 System.Collections;
3
293
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 using statements are included be default: using System; using System.Data; using System.Configuration; using System.Collections;
4
1502
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 and remove any references that are not being used ? using System; using System.Data; using System.Configuration; using System.Collections; using System.ComponentModel;
0
9579
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10199
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9979
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9849
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8861
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6661
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5433
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3948
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3551
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.