Click here to Skip to main content
15,890,973 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
I am working with the Excel application using interop c#. I have to hide the entire title bar or only the close button.

What I have tried:

I have tried everything from the below link.

Is it possible to hide the Excel Title Bar?[^]
Posted
Updated 10-May-16 6:29am
v2
Comments
Philippe Mori 10-May-16 12:18pm    
Very bad idea. If the application crash, how the user will close it. Don't assume that he know how to use Task Manager.
Sergey Alexandrovich Kryukov 10-May-16 12:47pm    
This is the whole syndrome. Please see my link in my comment to Solution 1.
—SA
CHill60 10-May-16 12:21pm    
I agree it's not entirely a good idea but have you seen these potential solutions too
winforms - Removing the Title bar of external application using c# - Stack Overflow[^]
.net - Remove Ribbon from Excel - Stack Overflow[^]
Sergey Alexandrovich Kryukov 10-May-16 12:47pm    
This is the whole syndrome. Please see my link in my comment to Solution 1.
—SA
Strikerzz Arut 10-May-16 12:31pm    
I am hosting an excel application inside the windows form host of WPF. I can see my application is closing, if we close the excel which is hosted inside it. However, user can even close it using many ways, I just want to hide this option.

@CHill60 I tried the above link.

1 solution

Let's say you can hide the close button, I can still ctrl+f4, chose Exit from the file menu, use task manager, and probably 100 other ways to close the app.

You can't launch apps that the clients can't close, it would be an incredibly irritating and spammy thing to do.
 
Share this answer
 
Comments
Strikerzz Arut 10-May-16 12:32pm    
You're right. But I just want to hide the title bar/close button. Is there any solution for that?
Sergey Alexandrovich Kryukov 10-May-16 12:45pm    
Then please read carefully my blog post: http://www.codeproject.com/Members/SAKryukov?msg=5069181#xx5069181xx.
Can you recognize yourself? :-)
—SA
Sergey Alexandrovich Kryukov 10-May-16 12:46pm    
Agree, my 5, and please see my link reference in my comment above.
—SA
Strikerzz Arut 10-May-16 14:19pm    
Unfortunately you don't have any solution with you. Its just about free advice. Thanks for that. I would agree with your points. But my clients will not agree to that. At least, I should give a try to bring out the best solution to this.
Sergey Alexandrovich Kryukov 10-May-16 15:02pm    
It's really good that you don't have any solution. I did not try to publish any. I already explained that solving some problems could be much worse than not solving. Clients? Well, they requirements can always be a problem. But that problem needs ongoing solutions every time. If developers tried to satisfy each and every user's requirement, now software would even work. This is no how software is developed. People create compromises, and usually developers lead, not the clients. This is just the fact of life.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900