

You can change this by modifying the control in the designer.ĭifferences in Windows Forms controls on Office documents

You add a Windows Forms control to a Word document at design time. You programmatically add a control to a Word document and use a method that specifies a range for the location. Windows Forms controls are added in line with text in the following cases: You also cannot set the xref.Left or xref.Top property of Windows Forms controls that are in line with text on a Word document. Unsupported methods and properties of Word controls: Unsupported properties of Excel controls: The following is a list of unsupported methods and properties of Windows Forms controls for Word and Excel: For example, setting properties such as xref.Dock and xref.Anchor only affects the position of the control with respect to the container ActiveX control, rather than the document. There are a number of methods and properties of Windows Forms controls that do not work the same way on a document as they would on a Windows Form and, therefore, it is recommended that they not be used. Limitations of methods and properties of Windows Forms controls The Windows Forms control is not embedded directly in the document. When a Windows Forms control is added to a document, the embeds an ActiveX control that then hosts the Windows Forms control in the document. Many of these differences are caused by the way that Windows Forms controls are hosted on documents. For example, when you add a xref.Controls.Button control to a document, properties such as xref.Dock, xref.Anchor, and xref.TabIndex do not behave as you might expect. There are some differences between Windows Forms controls that are added to Microsoft Office Word documents or Microsoft Office Excel worksheets, and Windows Forms controls that are added to Windows Forms.

Limitations of Windows Forms controls on Office documents
