473,386 Members | 1,753 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

How to show/hide an MS Office MDI application ?

Flo
Hello

I want to be able to show/hide an application that is running. When i am
getting the handles corresponding to an MS Office application (Excel for
example), it appears that i get a handle for the Excel MDI application which
got MDI children corresponding to the document(s) opened. Therefore, i am
able to hide the Excel window and the documents it contains. But there also
is a handle corresponding to the button which appears in the taskbar. Excel
doesnt seem to be a regular MDI application, as you can see an icon in the
taskbar for each opened documents, instead of seeing only one for the Excel
MDI application.

First i thought, this was working as the "Owner/Owned windows" model (Visual
Studio .net for example), which behavior is the following :
- when the owner is reduced, the owned windows are hidden.
- when the owner is restored, the owned windows are shown.
For this kind of applications i can call the GetWindow with OWNER
parameter, and find the owner this way.

But for the case of Excel application, the Excel MDI application does not
have any parent or owner. And the taskbar handle do not have any children. So
i dont know how to establish the relation between them.

Was hoping someone has maybe already had solved this problem. Help would be
more than appreciated :)

Thanks.

Flo
Nov 17 '05 #1
2 2288
>Excel
doesnt seem to be a regular MDI application, as you can see an icon in the
taskbar for each opened documents, instead of seeing only one for the Excel
MDI application.
In Excel navigate to Tools -> Options -> Tab View -> Section Show -> Uncheck
"Windows in Taskbar" or you should be able to do this programmaticaly. Hope
this solves a part of the problem.

Gabriel Lozano-Morán
"Flo" <Fl*@discussions.microsoft.com> wrote in message
news:1A**********************************@microsof t.com... Hello

I want to be able to show/hide an application that is running. When i am
getting the handles corresponding to an MS Office application (Excel for
example), it appears that i get a handle for the Excel MDI application
which
got MDI children corresponding to the document(s) opened. Therefore, i am
able to hide the Excel window and the documents it contains. But there
also
is a handle corresponding to the button which appears in the taskbar.
Excel
doesnt seem to be a regular MDI application, as you can see an icon in the
taskbar for each opened documents, instead of seeing only one for the
Excel
MDI application.

First i thought, this was working as the "Owner/Owned windows" model
(Visual
Studio .net for example), which behavior is the following :
- when the owner is reduced, the owned windows are hidden.
- when the owner is restored, the owned windows are shown.
For this kind of applications i can call the GetWindow with OWNER
parameter, and find the owner this way.

But for the case of Excel application, the Excel MDI application does not
have any parent or owner. And the taskbar handle do not have any children.
So
i dont know how to establish the relation between them.

Was hoping someone has maybe already had solved this problem. Help would
be
more than appreciated :)

Thanks.

Flo

Nov 17 '05 #2
Flo
Found the answer for this problem if anyone encounter the same questions
about windows behaviours :

In fact, Excel application got a top level window that is the MDI owner,
which got children windows that are the xls documents opened (whatever the
number). And the button in the taskbar for these xls documents are top level
windows as well. The relationship for these top level windows is that they
got the same thread process id (id of the thread that created the windows).
Thanks for your answer gabriel.

"Gabriel Lozano-Morán" wrote:
Excel
doesnt seem to be a regular MDI application, as you can see an icon in the
taskbar for each opened documents, instead of seeing only one for the Excel
MDI application.


In Excel navigate to Tools -> Options -> Tab View -> Section Show -> Uncheck
"Windows in Taskbar" or you should be able to do this programmaticaly. Hope
this solves a part of the problem.

Gabriel Lozano-Morán
"Flo" <Fl*@discussions.microsoft.com> wrote in message
news:1A**********************************@microsof t.com...
Hello

I want to be able to show/hide an application that is running. When i am
getting the handles corresponding to an MS Office application (Excel for
example), it appears that i get a handle for the Excel MDI application
which
got MDI children corresponding to the document(s) opened. Therefore, i am
able to hide the Excel window and the documents it contains. But there
also
is a handle corresponding to the button which appears in the taskbar.
Excel
doesnt seem to be a regular MDI application, as you can see an icon in the
taskbar for each opened documents, instead of seeing only one for the
Excel
MDI application.

First i thought, this was working as the "Owner/Owned windows" model
(Visual
Studio .net for example), which behavior is the following :
- when the owner is reduced, the owned windows are hidden.
- when the owner is restored, the owned windows are shown.
For this kind of applications i can call the GetWindow with OWNER
parameter, and find the owner this way.

But for the case of Excel application, the Excel MDI application does not
have any parent or owner. And the taskbar handle do not have any children.
So
i dont know how to establish the relation between them.

Was hoping someone has maybe already had solved this problem. Help would
be
more than appreciated :)

Thanks.

Flo


Nov 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: genetic.error | last post by:
I'm moving from Vb6 to VB.Net. I have a feeling this has come up before... The VS.Net MSDN file seems to state that the following should work: Form1.Show Form1.Visible = True Form1.Hide...
5
by: Steve | last post by:
Visual Studio 2003 C# Windows: I have a tree view control as my main menu control down the left side of my application. This has 2 Parent Nodes on it (Jobs and Employees). beneath these 2 main...
4
by: MLH | last post by:
Is there a simple way to hide built-in toolbars in A97?
0
by: Efkas | last post by:
I have a full custom application with some widged extending Controls like Label and PictureBox. I build a menu with these widgets. When I click on one of them, it calls a function to display...
12
by: Jerad Rose | last post by:
I searched for a while trying to find the answer to this, but to no avail. I am trying to find the best way (or any way) to dynamically show and hide groups of TR's. For example, I have a...
13
by: Tim Smallwood | last post by:
Hi, This is probably a stupid question, but I can't seem to get a form to show / load? In the older versions of VB I'd use frmMyform.show / load myForm, etc? I looked at the help file and it...
4
by: scubasteve | last post by:
Hi, I'm having issues with AC2007 custom ribbons. I'm building an AC2007 runtime app which has a custom ribbon (called CommandsDisabledHideRibbon) set as the default db ribbon name (see XML at...
9
by: PomonaGrange | last post by:
HI All, I've been trying to make a membership management type script. This script would have a database with the members contact info and which office they hold, if any. The problem I am having is I...
1
oranoos3000
by: oranoos3000 | last post by:
hi would you please help me i have a online shopping center that i show pictures of the my product in home page. in the InterExplorer pictures is shown correctly but in Firefox browser is shown...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.