I just only forbid contextmenu in mshtml control. The HtmlDocumentClass containt the event of HTMLDocumentEvents2_Event_oncontextmenu,so I write the code below ------------------------------------------ doc.HTMLDocumentEvents2_Event_oncontextmenu+=new mshtml.HTMLDocumentEvents2_oncontextmenuEventHandler(doc_HTMLDocumentEvents2_Event_oncontextmenu); private bool doc_HTMLDocumentEvents2_Event_oncontextmenu(mshtml.IHTMLEventObj pEvtObj) { return false; } // ------------------------------------------------------ But the editor,mshtml control can not edit when the property of designMode is 'On' using keyboard. Can you tell me why? And how to deal with the error? Thank you very! Note:The question has been in the C# subject.
dreamwinter
Posts
-
How to forbid the context menu in mshtml editor? -
How to forbid contextmenu in MSHtml control.:confused:I just only forbid contextmenu in mshtml control. The HtmlDocumentClass containt the event of HTMLDocumentEvents2_Event_oncontextmenu,so I write the code below ------------------------------------------ doc.HTMLDocumentEvents2_Event_oncontextmenu+=new mshtml.HTMLDocumentEvents2_oncontextmenuEventHandler(doc_HTMLDocumentEvents2_Event_oncontextmenu); private bool doc_HTMLDocumentEvents2_Event_oncontextmenu(mshtml.IHTMLEventObj pEvtObj) { return false; } // ------------------------------------------------------ But the editor,mshtml control can not edit when the property of designMode is 'On' using keyboard. Can you tell me why? And how to deal with the error? Thank you very!
-
Is MSHTML support RTF ?Hi,everybody. I need the control that support html and rtf.I have searched it in internet.I found the MSHTML is a good idea.But if the body formatted by RFT,can the control support it? Anyone can answer my question?Thanks!
-
How to use StrongNamePublicKeyBlob classI want to instance StrongNameMembershipCondition class. [C#] public StrongNameMembershipCondition( StrongNamePublicKeyBlob blob, string name, Version version ); the type of parameter blob is StrongNamePublicKeyBlob. I do not know how to get the parameter. Can you help me? give some code.Thanks!
-
How to execute managed code without .net frameworkHello,everyboy. Recently,I'm trying to execute managed code in the system that have no net framework. Can you give me some suggestion?
-
Create a simple COM applicationyou can reference to the book 'C# COM+ programming':->
-
How to wrap the produce of the set xml mapping to excel 2003? A VSTO BeginnerMaybe you know Excel 2003 enables you to set xml maps using menu command.You can select route,data/xml/xml source….,then the xml souce panel window will be displayed in the right screen.And you set xml maps by using click the xml maps button. So the problem is I want to use csharp code instead of this UI produce. I try to find a event or a funcation in the Excel SDK. But I complete loss of hope, however the problem is very necessary and important.Can help me how to coding? Thank you very much!!
-
The problem about Excel automation add-ins.Excel enables the creation of user-defined functions that can be used in Excel formulas. So I use these code to create a COM introp. ------------------------------------------------- using System; using System.Runtime.InteropServices; using Microsoft.Win32; namespace AutomationAddin { [ClassInterface(ClassInterfaceType.AutoDual)] public class MyFunctions { public MyFunctions() { } public double MultiplyNTimes(double number1, double number2, double timesToMultiply) { double result = number1; for (double i = 0; i < timesToMultiply; i++) { result = result * number2; } return result; } [ComRegisterFunctionAttribute] public static void RegisterFunction(Type type) { Registry.ClassesRoot.CreateSubKey( GetSubKeyName(type)); } [ComUnregisterFunctionAttribute] public static void UnregisterFunction(Type type) { Registry.ClassesRoot.DeleteSubKey( GetSubKeyName(type), false); } private static string GetSubKeyName(Type type) { System.Text.StringBuilder s = new System.Text.StringBuilder(); s.Append(@"CLSID\{"); s.Append(type.GUID.ToString().ToUpper()); s.Append(@"}\Programmable"); return s.ToString(); } } } ----------------------------------------------------- And set project build property,checked output item,register COM interop. Building the project,that's success. Launch Excel and choose Add-Ins from the Tools menu to display the Add-Ins dialog. In the Add-Ins dialog, click the Automation button. But I can't find the class I created by looking for AutomationAddin.MyFunctions in the list of automation servers. What's wrong? Please help me !Thanks,by the way,My development tool is VS2005 ,Office 2003 (sp2)simply chinese.
-
The problem about Excel Automation add-ins(C#):doh:Excel enables the creation of user-defined functions that can be used in Excel formulas. So I use these code to create a COM introp. ------------------------------------------------- using System; using System.Runtime.InteropServices; using Microsoft.Win32; namespace AutomationAddin { [ClassInterface(ClassInterfaceType.AutoDual)] public class MyFunctions { public MyFunctions() { } public double MultiplyNTimes(double number1, double number2, double timesToMultiply) { double result = number1; for (double i = 0; i < timesToMultiply; i++) { result = result * number2; } return result; } [ComRegisterFunctionAttribute] public static void RegisterFunction(Type type) { Registry.ClassesRoot.CreateSubKey( GetSubKeyName(type)); } [ComUnregisterFunctionAttribute] public static void UnregisterFunction(Type type) { Registry.ClassesRoot.DeleteSubKey( GetSubKeyName(type), false); } private static string GetSubKeyName(Type type) { System.Text.StringBuilder s = new System.Text.StringBuilder(); s.Append(@"CLSID\{"); s.Append(type.GUID.ToString().ToUpper()); s.Append(@"}\Programmable"); return s.ToString(); } } } ----------------------------------------------------- And set project build property,checked output item,register COM interop. Building the project,that's success. Launch Excel and choose Add-Ins from the Tools menu to display the Add-Ins dialog. In the Add-Ins dialog, click the Automation button. But I can't find the class I created by looking for AutomationAddin.MyFunctions in the list of automation servers. What's wrong? Please help me !Thanks,by the way,My development tool is VS2005 ,Office 2003 (sp2)simply chinese.
-
How to custom funcation in Excel2003 with C#:(Recently I want to design a report forms that base on excel2003.But the primary function in Excel 2003 can not satisfies the business needs.So I have many funcations to get data from SQL Server in c# .I want to transform these function into Excel 2003 custom function. Can you tell me how to do it? Thanks!
-
Draw a UML inherit shape use with GDI+Can you tell me why set cappoints variable like this way.If I changed the array of the points,the line will not anchor the middle point of the bottom line triangle.Because I am a beginner in GDI+,please help me in any case.Thanks a lot!;)
-
Draw a UML inherit shape use with GDI+Hi,brother.Thanks for your help!:->
-
I want to draw a empty triangular arrowI guess that you must understand UML shapes,do you remenber the inher inherit shape? That has a line and a triangular? I want to draw the shape use with GDI+. I have write some code.But there are some error,Can you help me?:^) ----------------------------------- private void Form2_Paint(object sender, PaintEventArgs e) { e.Graphics.SmoothingMode = SmoothingMode.AntiAlias; GraphicsPath capPath = new GraphicsPath(); Point[] cappoints = new Point[] { new Point(0, 0), new Point(10, 0), new Point(0, 10), new Point(0, 0) }; capPath.AddLines(cappoints); CustomLineCap myCap = new CustomLineCap(null, capPath); Pen capPen = new Pen(Brushes.Black, 1); capPen.CustomEndCap = myCap; capPen.CustomStartCap = myCap; myCap.StrokeJoin = LineJoin.Round; myCap.WidthScale = 2; e.Graphics.DrawLine(capPen, new Point(100, 100), new Point(300, 100)); ---------------------------------------------
-
Draw a UML inherit shape use with GDI+The shape have a line and a empty triangle that joined the end of the line. Can you give me some code?Thanks!:doh:
-
I want to draw a empty triangular arrowThe triangular arrow like generalization description of the UML, I have think about it for some days,but I'm still have no any ways and means.Can you tell me how to draw it? If you can give some code to me,I'll be thankful to you for it.
-
Can you tell me how to custom a arrow with GDI+Thank you,I have resolved the problem in your help.:)
-
Can you tell me how to custom a arrow with GDI+I know Pen.CustomLineCap provides the function.But I don't know how to use it. And I tryed to look for some knowledge about this class,but the information is so poor.Can you help me? Thanks!(Please email to me!)
-
GDI+:How to clear the graphic?For example,I draw a line on the surface of graphics with GraphicsPath. Sometime I want to clear the line,how should I do?:^)
-
GDI+ :How to judge a point in the path.:^)use the code list: p1.X = 10; p1.Y = 15; p2.X = 68; p2.Y = 100; path.AddLine(p1, p2); g = this.panel1.CreateGraphics(); g.DrawPath(Pens.Black, path); Then,I draw a line on the graphic.In the event of Mouse_Move,I catch any point and want to know whether the point in the path of the line. So I use the funcation of GraphicsPath.IsVisible(),but whenever the funcation always return false. Can you help me? Thanks!
-
How to override the Text property of Control class?:confused:I create a UserControl and add a TextBox into the control.I want to have a Text property,in order that set or get the TextBox.Text.But I know Control class had the same property,and then I key the code that in list -------------------- public partial class UserControl1 : UserControl { string _t; [Browsable(true)] public override string Text { get { this.textBox1.Text = _t; return _t; } set { _t = value; this.textBox1.Text = _t; } ... } ----------------------------- When I test the control,I modify the Text property in the Properties Designer of the VS.NET 2005,The Control.Text get a value.But I open the method InitializeComponent() ,I can not find the code that initialize control.Text. So,When the test application running,The value that Text property of the TextBox in the control is lost. Can you tell me why? How to deal with it? Thanks a lot!