Click here to Skip to main content
15,885,435 members
Home / Discussions / C#
   

C#

 
QuestionReposition a Control on Scroll Pin
miah alom14-Oct-05 8:02
miah alom14-Oct-05 8:02 
QuestionBusiness layer, Data Layer and entities Pin
tsramkumar14-Oct-05 6:46
tsramkumar14-Oct-05 6:46 
QuestionUse function of VB.NET in C# Pin
rockxuyenmandem14-Oct-05 6:36
rockxuyenmandem14-Oct-05 6:36 
AnswerRe: Use function of VB.NET in C# Pin
Russell Jones14-Oct-05 6:50
Russell Jones14-Oct-05 6:50 
GeneralRe: Use function of VB.NET in C# Pin
miah alom14-Oct-05 7:58
miah alom14-Oct-05 7:58 
GeneralRe: Use function of VB.NET in C# Pin
mav.northwind14-Oct-05 8:51
mav.northwind14-Oct-05 8:51 
QuestionMSMQ Trigger Parameters Pin
Russell Jones14-Oct-05 6:18
Russell Jones14-Oct-05 6:18 
QuestionInternet Explorer Extension (COM) Pin
Milos Stojanovic14-Oct-05 5:44
Milos Stojanovic14-Oct-05 5:44 
Hello,
I need to create a IE Extension in C#. I want to add a button to IE standard toolbar and then make IE call the DLL when button is clicked.
I have started with the following code
<br />
	[StructLayout(LayoutKind.Sequential,CharSet=CharSet.Unicode)]<br />
	public struct OLECMDTEXT<br />
	{<br />
		public uint cmdtextf;<br />
		public uint cwActual;<br />
		public uint cwBuf;<br />
		[MarshalAs(UnmanagedType.ByValTStr,SizeConst=100)]public char rgwz;<br />
	}<br />
	[StructLayout(LayoutKind.Sequential)]<br />
	public struct OLECMD<br />
	{<br />
		public uint cmdID;<br />
		public uint cmdf;<br />
	}<br />
	[ComImport,<br />
	InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]<br />
	public interface IOleCommandTarget<br />
	{<br />
		void QueryStatus(ref Guid pguidCmdGroup, UInt32 cCmds,<br />
			[MarshalAs(UnmanagedType.LPArray, SizeParamIndex=1)] <br />
			OLECMD[] prgCmds, ref OLECMDTEXT CmdText);<br />
		void Exec(ref Guid pguidCmdGroup, uint nCmdId, uint nCmdExecOpt, <br />
			ref object pvaIn, ref object pvaOut);<br />
	}<br />
	[ClassInterface(ClassInterfaceType.None),<br />
	ComSourceInterfaces(typeof(COM_Events))]<br />
	public class COMAddin: IOleCommandTarget<br />
	{<br />
		// ....<br />
		public void QueryStatus(ref Guid pguidCmdGroup, <br />
				UInt32 cCmds, OLECMD[] prgCmds, ref OLECMDTEXT CmdText)<br />
		{<br />
			// ....<br />
		}<br />
		public void Exec(ref Guid pguidCmdGroup, uint nCmdId, <br />
				uint nCmdExecOpt, ref object pvaIn, ref object pvaOut)<br />
		{<br />
			// .... I would add here OnClick actions<br />
		}<br />
	}

But I don't know what to do next.
I know that I have to add a key in HKEY_LOCAL_MACHINE\Software\Microsoft\Internet Explorer\Extensions.

And I have to somehow register the COM DLL (regasm?), and create some GUIDs. I don't know where to put those GUIDs, in which class, should I do it over attributes or over assembly... This is a managed DLL, all articles that I find on the net are related to plain native C++. And I need to get the IE Document data somehow (IHTMLDocument2 or something?), but that is not primary here.
Can anyone point me to a good article for this, or help me directly?

Thank you in advance,
Milos
QuestionScroll Panel control when mouse is dragged near the edge Pin
Gulfraz Khan14-Oct-05 4:28
Gulfraz Khan14-Oct-05 4:28 
AnswerRe: Scroll Panel control when mouse is dragged near the edge Pin
Dan Neely14-Oct-05 5:12
Dan Neely14-Oct-05 5:12 
QuestionFileSystemWatcher problem Pin
Dan Neely14-Oct-05 3:39
Dan Neely14-Oct-05 3:39 
AnswerRe: FileSystemWatcher problem Pin
Dave Kreskowiak14-Oct-05 4:39
mveDave Kreskowiak14-Oct-05 4:39 
GeneralRe: FileSystemWatcher problem Pin
Dan Neely14-Oct-05 5:06
Dan Neely14-Oct-05 5:06 
QuestionMESSAGEBOX TAB Pin
Greeky14-Oct-05 0:32
Greeky14-Oct-05 0:32 
AnswerRe: MESSAGEBOX TAB Pin
Stefan Troschuetz14-Oct-05 1:53
Stefan Troschuetz14-Oct-05 1:53 
AnswerRe: MESSAGEBOX TAB Pin
albCode14-Oct-05 21:00
albCode14-Oct-05 21:00 
QuestionIs it possible to tell when the OS starts and stops a screensaver, from inside a C# service which is running under the SYSTEM account? Pin
DUKEMAN13-Oct-05 23:40
DUKEMAN13-Oct-05 23:40 
QuestionI there any control to dispaly the incomming video from a video capturing device. Pin
sukanyavarma13-Oct-05 22:37
sukanyavarma13-Oct-05 22:37 
AnswerRe: I there any control to dispaly the incomming video from a video capturing device. Pin
snouto14-Oct-05 10:10
snouto14-Oct-05 10:10 
GeneralRe: I there any control to dispaly the incomming video from a video capturing device. Pin
sukanyavarma17-Oct-05 20:40
sukanyavarma17-Oct-05 20:40 
QuestionXML Deserialization of Known Derived Classes Pin
Alexandre G13-Oct-05 21:40
Alexandre G13-Oct-05 21:40 
QuestionRAW DATA PRINTING ON WINDOWS ME CLIENT Pin
Greeky13-Oct-05 21:11
Greeky13-Oct-05 21:11 
AnswerRe: RAW DATA PRINTING ON WINDOWS ME CLIENT Pin
Dave Kreskowiak14-Oct-05 4:35
mveDave Kreskowiak14-Oct-05 4:35 
QuestionTrace Question Pin
occcy13-Oct-05 20:36
occcy13-Oct-05 20:36 
AnswerRe: Trace Question Pin
XRaheemX14-Oct-05 4:03
XRaheemX14-Oct-05 4:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.