Questions tagged [winforms-interop]

284 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,430
  • 34
  • 134
  • 249
30
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 S
  • 3,691
  • 12
  • 92
  • 128
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,672
  • 4
  • 35
  • 54
13
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
  • 196
  • 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
  • 465
  • 3
  • 9
12
votes
2 answers

How to connect to outlook 2010 while its running in c#?

What I am trying to do is add an "Email To..." button to a winform client that opens a new outlook mail window and attaches a file so the user can forward it. I can get the outlook integration working just fine if outlook is not already running.…
11
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,201
  • 1
  • 12
  • 31
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
  • 18,671
  • 22
  • 89
  • 141
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 S
  • 3,691
  • 12
  • 92
  • 128
9
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 winform 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 sample…
Alex Baker
  • 1,178
  • 1
  • 10
  • 25
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,706
  • 8
  • 28
  • 40
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
  • 44,292
  • 106
  • 358
  • 713
8
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,581
  • 4
  • 29
  • 28
7
votes
3 answers

Assembly generation failed -- Referenced assembly 'Interop.Office' does not have a strong name

I have a WPF 4 project to interact with word documents made in VS2010 and a win form User Control project to host word application into it. And other com dlls. All com dlls are referred into my main wpf application. I want to publish my project so…
JSJ
  • 5,391
  • 3
  • 22
  • 30
1
2 3
18 19