Click here to Skip to main content
16,006,442 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to control the real dimension on screen? Pin
gshen4-Dec-06 9:28
gshen4-Dec-06 9:28 
GeneralRe: How to control the real dimension on screen? Pin
Luc Pattyn4-Dec-06 10:05
sitebuilderLuc Pattyn4-Dec-06 10:05 
QuestionDatabase Wizard VS Scripting Pin
mfcuser1-Dec-06 7:15
mfcuser1-Dec-06 7:15 
QuestionFont on Disabled Controls Pin
smarttom991-Dec-06 6:28
smarttom991-Dec-06 6:28 
AnswerRe: Font on Disabled Controls Pin
Dan Neely1-Dec-06 7:05
Dan Neely1-Dec-06 7:05 
Questioncrystal reports adding a pic Pin
Rocky#1-Dec-06 6:24
Rocky#1-Dec-06 6:24 
QuestionDeployment problems Pin
ssoffline1-Dec-06 6:14
ssoffline1-Dec-06 6:14 
QuestionC# & Win32 - Resizing Child Window Pin
bs99991-Dec-06 5:20
bs99991-Dec-06 5:20 
I'm starting to fiddle with COM Interop within my C# code. I've managed to get MS Word embedded within my form and am able to remove it's caption and resized it to fit within the child area. The problem Im seeing is if I restore the caption and attempt to maximize the child (MS Word) it doesnt maximize to the max boundaries of the child area as expected but in fact just dissappears from view. I've even hid the caption and used Word's menu item (Window >> Arrange All) and this time the display remains in view but the lower portion and right side are cut off from view (the overall window appears sized beyond the child bounds).

Perhaps my reasoning of parent child relationship is incorrect when it comes to windows. Here is a portion of my code for establishing the relationship and resizing:

// Win32: Use SetParent to set the handle to the Word instance as a child to my form
SetParent(WordHWnd, MyForm.Handle.ToInt32());

// Win32: Readjust the position of the word window -- Seems redundant to MoveWindow though
SetWindowPos(WordHWnd,MyForm.Handle.ToInt32(),0,0,MyForm.Bounds.Width, MyForm.Bounds.Height, SWP_NOZORDER | SWP_NOMOVE | SWP_DRAWFRAME);

// Win32: Move the window into view
MoveWindow(WordHWnd,0,0,MyForm.Bounds.Width, MyForm.Bounds.Height,true);

// My function to remove the caption.
RemoveCaption(WordHWnd, MyForm.Handle.ToInt32());

// Win32: Maximize the Word Window to fit the full area of its container
ShowWindow(WordHWnd, SW_MAXIMIZE);
QuestionControlling the source of a drag/drop Pin
Dan Neely1-Dec-06 4:46
Dan Neely1-Dec-06 4:46 
AnswerRe: Controlling the source of a drag/drop Pin
ednrgc1-Dec-06 5:27
ednrgc1-Dec-06 5:27 
GeneralRe: Controlling the source of a drag/drop Pin
Dan Neely1-Dec-06 5:42
Dan Neely1-Dec-06 5:42 
AnswerRe: Controlling the source of a drag/drop Pin
Dave Kreskowiak1-Dec-06 5:40
mveDave Kreskowiak1-Dec-06 5:40 
GeneralRe: Controlling the source of a drag/drop Pin
Dan Neely1-Dec-06 5:42
Dan Neely1-Dec-06 5:42 
GeneralRe: Controlling the source of a drag/drop Pin
Dan Neely1-Dec-06 8:09
Dan Neely1-Dec-06 8:09 
GeneralRe: Controlling the source of a drag/drop Pin
Dave Kreskowiak1-Dec-06 8:17
mveDave Kreskowiak1-Dec-06 8:17 
GeneralRe: Controlling the source of a drag/drop Pin
Dan Neely1-Dec-06 8:21
Dan Neely1-Dec-06 8:21 
QuestionMaking dates Pin
digsy_1-Dec-06 4:36
digsy_1-Dec-06 4:36 
AnswerRe: Making dates Pin
Guffa1-Dec-06 4:56
Guffa1-Dec-06 4:56 
AnswerRe: Making dates Pin
Pete O'Hanlon1-Dec-06 4:59
mvePete O'Hanlon1-Dec-06 4:59 
Questionwhat is this used for --> @ Pin
karanba1-Dec-06 4:34
karanba1-Dec-06 4:34 
AnswerRe: what is this used for --> @ Pin
eggsovereasy1-Dec-06 4:44
eggsovereasy1-Dec-06 4:44 
GeneralRe: what is this used for --> @ Pin
karanba1-Dec-06 4:57
karanba1-Dec-06 4:57 
AnswerRe: what is this used for --> @ Pin
Guffa1-Dec-06 5:00
Guffa1-Dec-06 5:00 
GeneralRe: what is this used for --> @ Pin
WILLIAM MAIN2-Dec-06 17:22
WILLIAM MAIN2-Dec-06 17:22 
QuestionC# Program in System tray Pin
Mutyala Rao1-Dec-06 4:03
Mutyala Rao1-Dec-06 4:03 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.