Resize Control
-
Hello. I have started a process using
Process.Start
. Now when I resize my panel, I also resize this control. But the problem is, it stops resizing after I drag its border just a little bit. It does, though, resize for that little bit drag of form border. So question is why can not I resize my external program along with panel, just like I resize my panel along with form? Thanks for any pointer. UPDATE I have a process that I have started usingProcess.Start()
and placed it on the panel, on my form. Now in order to resize it, I put this codeprivate void Form1_SizeChanged(object sender, EventArgs e)
{
// "panel1" is docked to TOP
SetWindowPos(m_hHandle, 0, 0, 0, panel1.Width, panel1.Height, SWP_SHOWWINDOW);
}I put a breakpoint on this function and noticed that as soon as I resize my form, this breakpoint gets hit. How do I resize this control on my form using
Resize or SizeChanged
events?This world is going to explode due to international politics, SOON.
-
Hello. I have started a process using
Process.Start
. Now when I resize my panel, I also resize this control. But the problem is, it stops resizing after I drag its border just a little bit. It does, though, resize for that little bit drag of form border. So question is why can not I resize my external program along with panel, just like I resize my panel along with form? Thanks for any pointer. UPDATE I have a process that I have started usingProcess.Start()
and placed it on the panel, on my form. Now in order to resize it, I put this codeprivate void Form1_SizeChanged(object sender, EventArgs e)
{
// "panel1" is docked to TOP
SetWindowPos(m_hHandle, 0, 0, 0, panel1.Width, panel1.Height, SWP_SHOWWINDOW);
}I put a breakpoint on this function and noticed that as soon as I resize my form, this breakpoint gets hit. How do I resize this control on my form using
Resize or SizeChanged
events?This world is going to explode due to international politics, SOON.
I note you use the word 'Control to describe what you are working with, but using Process.Start runs an Application that then puts up a window(s). 1. what is the Application you start using Process.Start ? 2. what are you doing to make that Application's Window(s) a child Control of the Panel (added to the Panel's ControlCollection) ? or, is it (more likely), that the application window is not a child of the Panel ? 3. is it possible that whatever application you start's window has a fixed window size maximum ? 4. if you make the Panel size smaller: what happens to the hosted whatever ? More specific details, please.
« I had therefore to remove knowledge, in order to make room for belief » Immanuel Kant
-
Hello. I have started a process using
Process.Start
. Now when I resize my panel, I also resize this control. But the problem is, it stops resizing after I drag its border just a little bit. It does, though, resize for that little bit drag of form border. So question is why can not I resize my external program along with panel, just like I resize my panel along with form? Thanks for any pointer. UPDATE I have a process that I have started usingProcess.Start()
and placed it on the panel, on my form. Now in order to resize it, I put this codeprivate void Form1_SizeChanged(object sender, EventArgs e)
{
// "panel1" is docked to TOP
SetWindowPos(m_hHandle, 0, 0, 0, panel1.Width, panel1.Height, SWP_SHOWWINDOW);
}I put a breakpoint on this function and noticed that as soon as I resize my form, this breakpoint gets hit. How do I resize this control on my form using
Resize or SizeChanged
events?This world is going to explode due to international politics, SOON.
This is not a good question - we cannot work out from that little what you are trying to do. Remember that we can't see your screen, access your HDD, or read your mind. Edit your question and provide better information.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
-
This is not a good question - we cannot work out from that little what you are trying to do. Remember that we can't see your screen, access your HDD, or read your mind. Edit your question and provide better information.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
I have a process that I have started using
Process.Start()
and placed it on the panel, on my form. Now in order to resize it, I put this codeprivate void Form1_SizeChanged(object sender, EventArgs e)
{
// "panel1" is docked to TOP
SetWindowPos(m_hHandle, 0, 0, 0, panel1.Width, panel1.Height, SWP_SHOWWINDOW);
}I put a breakpoint on this function and noticed that as soon as I resize my form, this breakpoint gets hit. How do I resize this control on my form using
Resize or SizeChanged
events?This world is going to explode due to international politics, SOON.
-
I note you use the word 'Control to describe what you are working with, but using Process.Start runs an Application that then puts up a window(s). 1. what is the Application you start using Process.Start ? 2. what are you doing to make that Application's Window(s) a child Control of the Panel (added to the Panel's ControlCollection) ? or, is it (more likely), that the application window is not a child of the Panel ? 3. is it possible that whatever application you start's window has a fixed window size maximum ? 4. if you make the Panel size smaller: what happens to the hosted whatever ? More specific details, please.
« I had therefore to remove knowledge, in order to make room for belief » Immanuel Kant
1 - I am hosting media player classic. I start this application using Process.Start. 2 - Don't know what to say. 3 - NO 4 - nothing
This world is going to explode due to international politics, SOON.
-
I note you use the word 'Control to describe what you are working with, but using Process.Start runs an Application that then puts up a window(s). 1. what is the Application you start using Process.Start ? 2. what are you doing to make that Application's Window(s) a child Control of the Panel (added to the Panel's ControlCollection) ? or, is it (more likely), that the application window is not a child of the Panel ? 3. is it possible that whatever application you start's window has a fixed window size maximum ? 4. if you make the Panel size smaller: what happens to the hosted whatever ? More specific details, please.
« I had therefore to remove knowledge, in order to make room for belief » Immanuel Kant
I'd be interested in the answer to 2. Dark magic, perhaps.
Regards, Rob Philpott.
-
Hello. I have started a process using
Process.Start
. Now when I resize my panel, I also resize this control. But the problem is, it stops resizing after I drag its border just a little bit. It does, though, resize for that little bit drag of form border. So question is why can not I resize my external program along with panel, just like I resize my panel along with form? Thanks for any pointer. UPDATE I have a process that I have started usingProcess.Start()
and placed it on the panel, on my form. Now in order to resize it, I put this codeprivate void Form1_SizeChanged(object sender, EventArgs e)
{
// "panel1" is docked to TOP
SetWindowPos(m_hHandle, 0, 0, 0, panel1.Width, panel1.Height, SWP_SHOWWINDOW);
}I put a breakpoint on this function and noticed that as soon as I resize my form, this breakpoint gets hit. How do I resize this control on my form using
Resize or SizeChanged
events?This world is going to explode due to international politics, SOON.
AmbiguousName wrote:
But the problem is, it stops resizing after I drag its border just a little bit. It does, though, resize for that little bit drag of form border.
That is a bit confusing, does it resize or does it not? Is this window a child of your panel (i.e. how are you hosting it) or are you just positioning it above your panel?
-
I'd be interested in the answer to 2. Dark magic, perhaps.
Regards, Rob Philpott.
Rob Philpott wrote:
I'd be interested in the answer to 2.
[^] ? [^] ? Hi Rob, My understanding is that some applications are designed to be "embeddable" ... like Mozilla, IE. In this case we don't know what app the OP wants to launch, or even if he needs it to be "embedded." cheers, Bill
« I had therefore to remove knowledge, in order to make room for belief » Immanuel Kant
-
AmbiguousName wrote:
But the problem is, it stops resizing after I drag its border just a little bit. It does, though, resize for that little bit drag of form border.
That is a bit confusing, does it resize or does it not? Is this window a child of your panel (i.e. how are you hosting it) or are you just positioning it above your panel?
Please read my updated question. As I said there, breakpoint gets hit which means that I can not go on and continue resizing my form.
This world is going to explode due to international politics, SOON.
-
Rob Philpott wrote:
I'd be interested in the answer to 2.
[^] ? [^] ? Hi Rob, My understanding is that some applications are designed to be "embeddable" ... like Mozilla, IE. In this case we don't know what app the OP wants to launch, or even if he needs it to be "embedded." cheers, Bill
« I had therefore to remove knowledge, in order to make room for belief » Immanuel Kant
Interesting. I'll have a look at that later on. My thinking is its a protected operating system so the idea of borrowing a windows handle from one process and incorporating into the hierarchy in another would be strictly unavailable. But, as one other comment points out, what about OLE?. More thought/research required. [Edit] - even if possible somehow, it sounds like a dreadful idea.
Regards, Rob Philpott.
-
Hello. I have started a process using
Process.Start
. Now when I resize my panel, I also resize this control. But the problem is, it stops resizing after I drag its border just a little bit. It does, though, resize for that little bit drag of form border. So question is why can not I resize my external program along with panel, just like I resize my panel along with form? Thanks for any pointer. UPDATE I have a process that I have started usingProcess.Start()
and placed it on the panel, on my form. Now in order to resize it, I put this codeprivate void Form1_SizeChanged(object sender, EventArgs e)
{
// "panel1" is docked to TOP
SetWindowPos(m_hHandle, 0, 0, 0, panel1.Width, panel1.Height, SWP_SHOWWINDOW);
}I put a breakpoint on this function and noticed that as soon as I resize my form, this breakpoint gets hit. How do I resize this control on my form using
Resize or SizeChanged
events?This world is going to explode due to international politics, SOON.
First, that other process is not a "control". It's a foreign process "window". You cannot use the two terms interchangeably as this will confuse people. Second, I already told you what you're doing is very difficult to control and you will not have complete control over the foreign process window. Users CAN and WILL manipulate that window just like it was sitting on the Desktop outside of your application. For example, they WILL be able to grab the window title bar and window edges and move them around. They can even minimize and maximize the window without your application knowing anything about it! What you're doing is possible to do, but not in a production application. It's more of a novelty than anything else.
A guide to posting questions on CodeProject
Click this: Asking questions is a skill. Seriously, do it.
Dave Kreskowiak -
Please read my updated question. As I said there, breakpoint gets hit which means that I can not go on and continue resizing my form.
This world is going to explode due to international politics, SOON.
-
Hello. I have started a process using
Process.Start
. Now when I resize my panel, I also resize this control. But the problem is, it stops resizing after I drag its border just a little bit. It does, though, resize for that little bit drag of form border. So question is why can not I resize my external program along with panel, just like I resize my panel along with form? Thanks for any pointer. UPDATE I have a process that I have started usingProcess.Start()
and placed it on the panel, on my form. Now in order to resize it, I put this codeprivate void Form1_SizeChanged(object sender, EventArgs e)
{
// "panel1" is docked to TOP
SetWindowPos(m_hHandle, 0, 0, 0, panel1.Width, panel1.Height, SWP_SHOWWINDOW);
}I put a breakpoint on this function and noticed that as soon as I resize my form, this breakpoint gets hit. How do I resize this control on my form using
Resize or SizeChanged
events?This world is going to explode due to international politics, SOON.
Now that we finally know you are using the Win Media Player ... check out: [^]. cheers, Bill
« I had therefore to remove knowledge, in order to make room for belief » Immanuel Kant