How to minimize Excel while my application is running?

How can I minimize Excel and a new open excel while my application is running?

I wrote the following code, but the code does not work.

If you are wondering why I want to minimize Excel, because my application fails if the user clicks on any excel cell!

Imports System.Management Imports Microsoft.Office.Interop Imports System.Runtime.InteropServices Public Class Form1 Private Sub Timer1_Tick(sender As System.Object, e As System.EventArgs) Handles Timer1.Tick Timer1.Enabled = True Timer1.Interval = 100 Timer1.Start() End Sub End Class 
+5
source share
1 answer

I did a similar thing for my Word application to hide it when I use a Word object to spell check. I am very sure that you can do this too;

 Excel._Application excel = new Excel.Application(); excel.Visible = false; excel.ShowWindowsInTaskbar = false; 

NOTE. The code is in C # .Net

+1
source

Source: https://habr.com/ru/post/1237055/


All Articles