Problem with windows in my program.

Ok, so basically what I'm doing is I have a program that has 2 frames, one on top, one on bottom. In these frames go 2 programs. The one on the bottom is Microsoft Excel.

What I do is I open an instance of Excel using an Excel object, get the window handle, and set the window handle's parent to the frame (so that it now appears in the little frame).

The problem occurs now when I try to Open... or Save As... in Excel. When I click on either of those, Excel begins to go in and out of focus (blinking), as if I haven't focused on an overlaying dialog somewhere, BUT the Open... or Save As... dialogs do not appear on my screen. It's as if the dialog opened somewhere in the frame out of sight.

Also, I have little buttons that can "release" the Excel instance from the frame (i.e. set the parent of the window handle to 0) and Excel will pop right out of there. The problem is that even in this state, with no parent, it will not pop up with either of those dialogs.

Has anybody else experienced this problem? Does anybody know how to fix it? It may not be solely the Open... or Save As... dialog boxes either.

The main program, the one that captures both Excel and the other program in there, has an Open and Save dialog of its own, if that matters. But it shouldn't because the other program can function just fine.

I'd appreciate any help. Thanks =D.

~Landale

[1384 byte] By [Landale] at [2007-12-17]
# 1
Would you consider perhaps using something like the Common Dialog Box opened by your own application to load the excel spreadsheet instead of allowing the full application to appear in the frame?
plenderj at 2007-9-8 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 2
Well the idea is to have all 3 programs (Excel, My program, and the other program) all open at once where the user can see it. If I clutter up the screen with dialogs, then it will be frustrating for the user. Now if I were to simply open a spreadsheet rather than the whole program, that might work, but I wanted Excel to have full functionality for the user so that they could open, save, new, do formulas and all that good stuff.

Now, were you talking about embedding the Excel instance in a dialog box instead of the frame (which is a Panel object in the Toolbox)?

Landale at 2007-9-8 > top of Msdn Tech,Visual Basic,Visual Basic General...
# 3
Is there anybody that can help me with this?
Landale at 2007-9-8 > top of Msdn Tech,Visual Basic,Visual Basic General...