Questions tagged [winforms-interop]
296 questions
41
votes
4 answers
Exporting to .xlsx using Microsoft.Office.Interop.Excel SaveAs Error
I am in the process of writing a module to export a DataTable to Excel using Microsoft.Office.Interop.Excel but before starting in earnest I want to get the very basics working: open file, save as, and close.
I have succeeded in opening and saving a…

MoonKnight
- 23,214
- 40
- 145
- 277
29
votes
6 answers
The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine while data export to MS ACCESS
I am beginner in using Microsft.ACE.OLEDB 12.0. I create a Winforms application VS 2010.
And create a function for export data grid data to MS Access file. I using Microsoft Oledb
for export the data grid data to MS Access file.But i get this error…

Ragesh P Raju
- 3,879
- 14
- 101
- 136
16
votes
2 answers
WPF repaint issue
I am having an issue with repaint of my WPF control.
The WPF control is added as an ElementHost.Child for a Windows form.
When Windows 7 goes into powersave mode and is brought back to normal (by moving the mouse or key press on keyboard), the rest…

Student_sjce
- 161
- 1
- 3
14
votes
2 answers
WinForms to WPF - How do we get there from here?
Is there a practical way for us to slowly evolve a WinForms application to WPF without creating a support nightmare for ourselves with strange interop scenarios?
Background info:
We have a large battleship gray WinForms application that is heavily…

Paul G
- 2,722
- 4
- 37
- 54
14
votes
1 answer
opening WPF user control winform window shrinks parent winform window
I have a WPF user control like this...
namespace WpfApplication1
{
public partial class MyControl : UserControl
{
......
}
}
I also have a win form to contain this WPF user control...
namespace WindowsFormsApplication4
{
public…

balaji
- 216
- 2
- 7
12
votes
1 answer
Host IDeskBand in a Windows Form
I'm trying to display the Address toolbar from the Windows Taskbar in my own WinForm. I can get the CLSID of the Address toobar ({01E04581-4EEE-11d0-BFE9-00AA005B4383}), and I can get an IDeskBand reference to it. But... then what?
Guid bandCLSID…

deanis
- 485
- 3
- 10
12
votes
6 answers
Setting "AcceptButton" from WPF WindowsFormHost
I have a winforms usercontrol with multiple buttons in a WPF Control.
My usercontrol was previously hosted in a windows form and I was able to so
this.ParentForm.AcceptButton = this.btnSearch;
I'm trying to establish how to do similar on the…

Chris
- 1,241
- 1
- 14
- 33
10
votes
1 answer
Keyboards inputs in a WPF user control are not sent to the WinForms container
We have a WinForms application that we are progressively converting to WPF. At this point the application's main form is a Form (WinForm) that contains a vertical sidebar built in WPF. The sidebar is hosted in an ElementHost control.
In the main…

Sylvain
- 19,099
- 23
- 96
- 145
10
votes
3 answers
Microsoft Office interop performance issue
I am try to exporting datagridview data to excel file in my C# 4.0 Windows application.
we used Microsoft.Office.Interop.Excel dll version 12.0.0.0. It's works well and everything
is fine. But i when i try to export more than 1000 datagridview…

Ragesh P Raju
- 3,879
- 14
- 101
- 136
10
votes
3 answers
Adding a custom context menu item to Windows Form title bar
I found a thread on MSDN that shows how to add an item to the context menu of a Windows Forms title bar.
Unfortunately it does not show how to register an event with the custom menu item and I have been unable to figure out how to do it. Below is a…

Alex Baker
- 1,537
- 2
- 13
- 28
9
votes
2 answers
Send Win API paste cmd from background C# app
Goal: write a C# app that runs in the background, listens for the key combination Win-V, and when that occurs, pastes the clipboard contents into the current active window (some arbitrary app). Essentially I'm trying to mimic PureText, but I'm not…

Elijah W. Gagne
- 2,801
- 4
- 31
- 29
8
votes
1 answer
Setting application-wide hotkey in C#
There is a post to set system-wide global hotkey in C#
here
I want to set application-wide hotkey such that if user presses a hotkey on any child window of an application, a particular window will receive and process it.
Thanks.

Liton
- 1,398
- 2
- 14
- 27
8
votes
2 answers
Override tooltip text for Titlebar buttons (Close, Maximize, Minimize, Help)
I have been trying without luck to change the text of the tooltip that appears for the buttons on the main title bar of a form.
In a nutshell, we have harnessed the 'Help' button for Windows Forms to have some other purpose. This is working fine. …

Tim
- 1,814
- 8
- 29
- 41
8
votes
1 answer
Why is my WPF hosted WinForm blank?
I have used the code from this blog, as below but abridged, and I see the WinForm inside my main window, but the sample text I placed on it in a label is not visible.
[System.Windows.Markup.ContentProperty("Child")]
public class WinFormsHost :…

ProfK
- 49,207
- 121
- 399
- 775
7
votes
4 answers
Unable to load DLL “OraOps10.dll”
I am running into peculiar issue. I am developing a windows based application which connects to Oracle database.
For initial testings, I have created installer and tested on different machines that I have. Each machine has Oracle Client installed…

Sudhakar Chavali
- 809
- 2
- 14
- 32