It depends. Deriving from Control is good when you want to encapsulate a native control or create a custom control that is a single entity (probably not the best choice of words, but let me explain...). A Button, for example, is just a button (encapsulating a Button common contorl). A ListView encapsulates a List-View common control. While the ListView has a column header, a scroll bar, etc., it still is a single control.
UserControls, however, encapsulate functionality provided by many controls. It also derivces from ContainerControl which derives from ScrollableControl. Thus, it is a container of other controls that can, if configured, scroll when the controls it contains are hidden due to the size of their container (i.e., the UserControl-derivative).
1- If we use InternetExplorer object instead of AxWebBrowser object, does it fetch pages any faster because it's not required to fetch the images on the HTML pages too?
2- Is there a way to set the properties of the AxWebBrowser used in the project without affecting the global settings? For example: I don't want the browser in my project to display images, or for instance, I want it to be offline, but not the other IEs in Windows. Possible?
"A good friend, is like a good book: the inside is better than the cover..."
Internet Explorer uses the WebBrowser object, so there really is no difference. The InternetExplorer automation server is just an out-of-process container for the WebBrowser control (which hosts and provides services to MSHTML). So no, it won't fetch pages any faster.
Settings for the WebBrowser control (and many affect MSHTML in general) are global. Only a few things like printer settings can you override on a per-instance basis. You can use the hosting interfaces, however, to control a few aspects of the WebBrowser control, such as the context menus, URL resolution when a link is clicked, and several other things. See Using MSHTML Advanced Hosting Interfaces[^] for more information.
I am working on a project in which we have to provide a UI to user in which all frames belonging to a selected mpeg2 video file are displayed. User then assign some attribute to each frame and then we have to store that video with those attributes added to each frame. Can any one give some idea about libraries or API's or controls which can help us.
You can use the Microsoft Speech SDK[^], although it's still in beta stages. You can use older versions but they rely on COM components for the most part that you can use from your .NET applications through a COM interop assembly (which you can generate through VS.NET or using tlbimp.exe for typelibs and aximp.exe for ActiveX controls. There are several ActiveX controls included, but you will need to redistribute the Speech runtime in order for users to use this (there are Merge Modules for Windows Installer projects available).
I had written a windows servcie which creates a message queue .I write some data into the queue & read it back when the receive _completed event is fired.
I have 2 issues:
1) I can write a single msg into the Queue & read it back from my service .If I view under in Computer Management - Service & Applications - Message queuing -private queues , I get the msg " Access Denied".
2) How do I write approximately 100 msgs into the queue continuously & read it back one by one.
Can Anybody help me with these issue?
Thanks in advance
It depends on what kind of queue you created. If you've created a private queue, then the queue runs under the permissions configured for the Windows Service. If you're running the service as the LocalSystem account, you won't be able to access it. Same goes if you're running it as another user, unless you impersonate that user access will be denied. Create a public queue instead.
As far as writing messages continuously while reading them, you should create a separate thread or threads for writing to the queue or use asynchronous calls to send messages while you continue reading them one by one (which is all you can do since they are queued).
The Panel (or any control deriving from ScrollableControl and most other controls with scroll bars) already supports the scroll wheel. Check your mouse settings in the Mouse control panel applets in your Control Panel folder. Make sure it recognizes the mouse and is using the correct driver, and make sure the scroll wheel settings are correct.
I am new to office development so I have a question. I have a database where rtf files are stored in image filed. From my application I need to show this rtf document in word application. I think I have to use office application PIA's.
One solution would be to save this image filed (rtf document) in some temp directory but then I would not be able to delete this file becouse I would not know when the user would stop using it.
So is there a way I can open this image field (rtf file as System.Byte) in word application not saving it before on physical drive?
If this is only RTF, you could use System.Text.Encoding.ASCII or System.Text.Encoding.Unicode (depending on how the RTF is stored) to convert to byte array to text and assign it to the RichTextBox.Rtf property.
If you need to use Word instead, you'll have to save this to a temporary file. The only way to load a stream is with a structured storage document, which RTF isn't (only compound documents like Word Documents are). Since you would be using the Office PIAs, however, you'll have to create an instance of Word.Application. Since you have that reference, you can attach events to know when the application is closed, or even if a document is closed. In this event handler, you can delete the temporary file.