Questions tagged [winforms-interop]

The tag has no usage guidance.

winforms-interop
Filter by
Sorted by
Tagged with
0 votes
0 answers
49 views

Using a custom controls DLL in a Windows Forms C# application

We are migrating a VBA application to a Windows Forms C# application. The old VBA application used a custom controls DLL provided by vendor. How do we use such controls (I guess MSForms) with Windows ...
Azamat Tastemirov's user avatar
-1 votes
1 answer
111 views

Could not load file/assembly 'office, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'. The system cannot find the file specified

I am using VS 2022 to develop windows application. In which I want to write some data into Excel. I have installed NuGet package Microsoft.Office.Interop.Excel Version 15.0.4795.1001 and I have ...
Shruti P's user avatar
0 votes
1 answer
46 views

C# Excel Change Char Color

I want to change all red characters to blue characters in the Excel file and then save it. I kept trying, but the method seemed to be wrong and didn't work.. Please advise. color = xlRange.Cells[i, j]....
배은정's user avatar
0 votes
0 answers
16 views

Button not visible when opening Form as Child in Panel (WinForms C#)

I'm working on a WinForms application in C# and facing an issue with a button's visibility. My application has a main form MainForm which opens other forms as child forms inside a panel. One of these ...
asansor090's user avatar
0 votes
0 answers
99 views

Endpoint Not Found Exception

Does anyone have any idea about the error shown here? Local IIS is working fine, but after hosting on the production server, I am getting this error: EndpointNotFoundException: There was no endpoint ...
Anandu G Nath's user avatar
2 votes
0 answers
99 views

Strange interaction between Visual Basic controls and .NET controls

I have a VB6 form like this: The form is composed of a classic ActiveX CommandButton and a .NET UserControl (specifically, a WinForm) containing 2 WinForm Buttons. The UserControl is, of course, COM ...
FilippoNikos's user avatar
0 votes
0 answers
22 views

I have a problem with winform stock management program

So i am making a winform stock management program but i am a beginner it is almost complete i just need to add the necessary textboxes and buttons. But I have a Problem, Just to make sure that ...
Emmanuel James's user avatar
0 votes
0 answers
85 views

Converting a VBA Macro to C#

I need some help, I'm trying to convert my existing VBA macros into C# and using them with a WinForm app. I've gotten most of this macro converted, but I'm running into a wall when I try to convert ...
asmcrae1997's user avatar
-2 votes
1 answer
63 views

C# - natively create a form window as a child to an existing window

I have a C# (4.72) library that creates a window using native API’s (pinvoke). I inserted this window into an existing application successfully. So, I have a child window inserted into the existing ...
Tom Lee's user avatar
  • 11
1 vote
0 answers
431 views

could not find xlsx file path during running of program

So, originally my program used a static spreadsheet named test, but to further enhance my program, I wanted it to make it to where the name within the textbox is the name of the file to use for the ...
Ryan Ellis's user avatar
0 votes
0 answers
246 views

Using COM objects in a Winforms C# application

I have an SDK provided by a biometric device manufacturer. That SDK contains a lot of DLL's whose main DLL, the one that is added as a reference to the project, is called zkemkeeper.dll. The ...
jstuardo's user avatar
  • 4,299
1 vote
1 answer
883 views

App build using .NET Core 6 Winforms application need .NET Core Desktop runtime [duplicate]

We are building an app using .NET Core 6 Winforms. This app would be hosted on a network file share. If users need to access this app, they would need at least .NET desktop runtime to be installed on ...
Sunny Sharma's user avatar
0 votes
0 answers
532 views

WPF airspace issue and WinForms IDesignHost

I'm trying to migrate portions of an app to WPF. One of the near-impossible parts is an IDesignerHost (i.e., a Windows Forms Designer). So for that, I want to use a WPF window with a WindowsFormsHost ...
Sören Kuklau's user avatar
2 votes
2 answers
975 views

progress bar on taskbar icon using winforms .net 6 vb.net

I am having a hard time finding a solution to display the status of a progressbar on the taskbar icon on Windows 10/11. Do you have suggestions. I use Winforms with VB.Net .Net 6.
volante089's user avatar
0 votes
2 answers
200 views

Microsoft Office Professional Plus 2019 Spellchecker dialog in a windows form application, the "Not in Dictionary" text area is empty and disabled?

I have Microsoft Office Professional Plus 2019 installed in Windows 10 Enterprise. I used "CheckSpelling" method in calling a spellchecker dialog in a c# windows form application, however, ...
qme's user avatar
  • 265
1 vote
0 answers
82 views

Can I write a Winforms UI that is callable from both .net6 and vb6?

Currently I can call a framework 4.7.2 library from VB6 via Com Interop. Is it possible to write a UI that can be called from both .net6 and VB6 so as to have only one UI Code base. That is without ...
Kirsten's user avatar
  • 17k
1 vote
1 answer
603 views

Microsoft .Net Win Form Webview2 interop

I'm trying to interoperate with a page loaded in webview2. Basically what I'm trying to do is calling a win form method from the webview but the method showMessageFromWebview2 is never fired. The web ...
Kingxlayer's user avatar
1 vote
0 answers
142 views

VARIANT to VariantWrapper C#

this is the C++ code bool wait=false; int temp1=0; int temp=0; VARIANT temper= { 0 }; temper.boolVal = wait? VARIANT_TRUE : VARIANT_FALSE; server.ExecuteCommand(temp1, temp, nullptr, &...
Ajai Antony Kolarikal's user avatar
0 votes
1 answer
73 views

Custom caret in datagridview

I am working on c# datagridview project where I have to change the default caret to dos like caret. I have search the internet buy unable to find any solution . Any suggestions from the respective ...
Shaifali Goel's user avatar
0 votes
1 answer
1k views

How to get the clicked element using webview2 in windows forms

I have a query in windows. forms I am new to this. I have developed a form where users can open any website from it and upon right click of any element I am displaying the element name, id, and few ...
Vemula Dheeraj's user avatar
0 votes
1 answer
387 views

How can I pass images from a dynamically generated image to a specific MS WORD table?

There is a form in which there are text lines, and a flowLayotpanel for accepting dynamically created pictureboxes, please tell me the code for implementing the transfer of images (in this case, from ...
user17143191's user avatar
-1 votes
1 answer
82 views

WPF Telerik Controls disappear while hosting application in WinForms

The main application is developed in .NET Framework 4.8 and WinForms. The sub application that I try to host is an .NET Framework 4.8 WPF App, too. Every view is an User Control, so that the host can ...
Robin Kaltenbach's user avatar
-1 votes
2 answers
512 views

problem of opening a webPage in webBrowser c# control in place of IE control

For my project I used webBrowser control and when I launch an html site which has got an input(type) button with onclick javascript function which process ending on window.open target="_blank&...
marc-antoine yonga's user avatar
0 votes
0 answers
639 views

Office word editor control for WinForms Applications

I know that this question may be very old and classic but, I am trying to find a free and good word editor control to be embedded into my application for educational purpose, so I googled and tried a ...
Myogeo's user avatar
  • 53
2 votes
2 answers
570 views

C# WPF & WinForms Interop - CenterOwner not effective

I'm working on a legacy application that uses WPF and WinForms for its UI. WPF makes up for the vast majority but the application main dialog is still in WinForms. So far I've been able to have them ...
Norbert Hüthmayr's user avatar
0 votes
1 answer
83 views

Producing Word document with windows form doesn't work for all PCs: System.Runtime.InteropServices.COMException (0x800A16CA)

I developed a windows form app to produce Word reports. At the beginning it worked fine on all the PCs producing well done documents, after I added the following chunk of code it stopped to produce ...
MarcoHHH's user avatar
0 votes
1 answer
109 views

How to extract specific data from docx document [duplicate]

I had a Word document that contains data for several products. Each product contains a specification table, and I want to create a windows application to search for product name and extract its table ...
seif's user avatar
  • 11
-1 votes
1 answer
865 views

C# Winforms Accept keyboard input when minimized on focus

I'm writing C# desktop application, which would allow me to mute my mic on hotkey, when I'm playing smtng with discord/skype/teamspeak etc. So, I need my app to accept my hotkey (ex: ctrl + B) without ...
AndyPearce's user avatar
3 votes
1 answer
160 views

Access VB6 parent form's AmbientProperties.UserMode property from interop UserControl

Is there a way by which a WinForms interop UserControl hosted on a VB6 form can retrieve the parent form's AmbientProperties.UserMode value? The UserControl's DesignMode property is false, which makes ...
R.J. Dunnill's user avatar
  • 2,069
-1 votes
1 answer
113 views

Slow writes to Excel cell using Excel Interop in Winforms application

I'm looking some help with my code for writing data to an Excel worksheet. I'm currently writing data to a single cell at a time which is taking around three seconds per cell. As you can imagine, this ...
Paul Alexander's user avatar
1 vote
0 answers
89 views

Winforms ActiveX control hangs TSTCON32.EXE on exit

I have a simple Windows Forms UserControl with a COM-callable ActiveX wrapper. When I run the control in TSTCON32 (the ActiveX Control Test Container), the TSTCON32.EXE process hangs on exit and must ...
R.J. Dunnill's user avatar
  • 2,069
0 votes
2 answers
453 views

Call of a method from C++ dll opens console window in C# app, how do I suppress the console?

I have written a C++ dll with one published method which simply starts another program with a defined parameter. This method is called from a C# WinForms application. The published method is triggered ...
Airbus's user avatar
  • 1
0 votes
1 answer
53 views

MS Word runs on background and requests documents to be saved even though it is already saved

I have a procedure that creates a PDF file according to an ms word template and its data is retrieved from a database. It works fine, creates a PDF file perfectly , no run time errors. The problem is ...
user avatar
-2 votes
1 answer
172 views

Dynamically calling different C DLLs in C#

I'm currently creating a Windows Form application in C#, where different .dll files written in C with their own structs and functions need to be called in the application at runtime through a file ...
tenfoldpaper's user avatar
0 votes
1 answer
632 views

Assembly manifest mismatch package-install doesn't resolve

The manifest error is not resovled, i try my best (even link Roslyn source code to my project ). Below is the portion of code, which generate error. The project is WINFORM and in Element Host load the ...
Adil Bangush's user avatar
2 votes
1 answer
288 views

Selected text is not displayed in windows forms RichTextBox control in a WPF window

For some reason I have to use a Windows.Forms.RichTextBox control within my WPF Window: <Window x:Class="TestSelectionRTBDansWPF.MainWindow" xmlns="http://schemas.microsoft.com/winfx/2006/...
Raphaël's user avatar
  • 190
0 votes
1 answer
75 views

Accessing a Winform from a WPF user control

I'm trying to access a winform from the wpf usercontrol that is sitting on it. I realize that there is an ElemetHost that is automatically created when you drop a WPF usercontrol onto a winform but I'...
Cynon's user avatar
  • 117
0 votes
0 answers
51 views

How to Access, Control Datagridview of external winform app?

I have a .net winform app with 1 form and 1 dgv control. Can someone kindly suggest or share some starting points so that i can move ahead? Im badly stuck with this requirement for days.... What i ...
Programmer's user avatar
0 votes
1 answer
274 views

Programmatic Creation of Chart and setting of its legends

I am creating Charts pie, bar and line and want to set their Legends along with valuea,Title of legend and point the values on Charts. how could i do so?
Muhammad Bilal's user avatar
0 votes
1 answer
151 views

Winform control spills outside of the WPF tab

If a WPF TabItem is not large enough to host a Winform control, then the Winform control will spill out of the TabItem, resulted in some other spaces in the TabControl being hidden, as shown below, ...
Graviton's user avatar
  • 82.7k
3 votes
2 answers
2k views

OPOS library v1.14 is not working as expected with x64 build of .net

We are using the OPOS drivers v 1.11 in our Desktop application and now migrating it to v 1.14. The application is working fine with the newer version on x86 architecture but when compiled to x64 , it ...
Ajeet Yadav's user avatar
0 votes
1 answer
253 views

Access embedded resources in a .NET program by ID using Windows API functions

I have added an .ICO icon image to a .NET WinForms program using the Resources page in the projects options. Is it possible to access this resource using Windows API functions like LoadImage, ideally ...
Olaf Hess's user avatar
  • 1,473
5 votes
1 answer
712 views

Is it possible to use Windows Forms controls directly on a VB6 form?

Is it possible to use a .NET Windows Forms control directly in a VB6 form? The goal here would be to use the more up to date .NET controls in a legacy VB6 application. We already have a mixed .NET / ...
StayOnTarget's user avatar
  • 12.4k
0 votes
1 answer
1k views

Excel VBA to Windows Form Application Process Communication

I have been tasked to deal with an application where an excel spreadsheet needs to retrieve / access values directly from the windows form application running on a client side by side. I have been ...
user906573's user avatar
0 votes
1 answer
252 views

default class for an outlook item(specificaly a calendar)

Hi have been reading about form regions for the last week.I finally managed to create a new interacting form using windows controls (i deprecated forms with vbscript).In the end though i have to ...
Kefalas Savvas's user avatar
1 vote
1 answer
170 views

Why is the Date in Row being transformed automatically?

I'm using Miscrosoft Office Interop Excel to sort and manage a ".csv" file and create an excel file. When I copy one cell that contains a date for example : "04/05/2018 18:55" I substring that ...
josemartindev's user avatar
0 votes
1 answer
526 views

Winforms and VSTO Excel ShowDialog() partly modal

The strangest thing ever! I'm working on an Excel add-in, the ribbon has some buttons that pop some modal dialogs. all of those dialogs are initiated in the same way from the button click event in ...
yossico's user avatar
  • 3,431
2 votes
2 answers
780 views

Winforms/WPF interop - resizing nested usercontrol

I have a winforms usercontrol which contains an element host which itself contains a wpf usercontrol which contains a textbox. It seems that I've not got the resizing of the innermost textbox working ...
Simon Woods's user avatar
3 votes
2 answers
3k views

c# copy from text file to word document

I want to copy data from text file to word file. I already have tried it with different alternatives like string array, StringBuilder and StreamReader using Interop which works good, but it takes too ...
StackUseR's user avatar
  • 938
0 votes
1 answer
571 views

Form that was hidden on creation does not receive broadcast messages

I created a program intended to run a single instance, with a form that is hidden until a broadcast message is received. The bug is that the message is not received unless the form is shown on ...
Adrian Savage's user avatar

1
2 3 4 5 6