473,398 Members | 2,404 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,398 software developers and data experts.

call program windows in my application like a child

Hi all,
i have an application and i wan to call another program into it, like
notepad, so when i minimize the notepad, or maximize, it must rest in
my application.
thank you

Dec 21 '06 #1
7 5803
Hello Sheikko,

What does it mean? MDI style or what?
What's wrong with Process.Start method?

Sit must rest in
Smy application.
---
WBR,
Michael Nemtseva [C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
Dec 21 '06 #2
Yes,
I have a parent child and want to call in it not a form, but an entire
application, like notepad, word..ecc.

I have solved the problem of process...I have used the HardwareButtons
(solution found in the visual help), at this scope I have included the
WindowsCe.Forms.dll to my project even if it for pocket PC.
I think is a bug of visual developper that filter this dll and it don't
let you to use it.

Thank you if you can help me.

On 21 Dic, 15:15, Michael Nemtsev <nemt...@msn.comwrote:
Hello Sheikko,

What does it mean? MDI style or what?
What's wrong with Process.Start method?

Sit must rest in
Smy application.
---
WBR,
Michael Nemtseva [C# MVP] :: blog:http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
Dec 21 '06 #3
Hello Sheikko,

SYes,
SI have a parent child and want to call in it not a form, but an
Sentire
Sapplication, like notepad, word..ecc.

So call the app in the bounds of form?! Don't think it's even possible. What
are u going to do? Maybe there is another alternative solution for it, if
u describe what u wanna do

SI have solved the problem of process...I have used the
SHardwareButtons
S(solution found in the visual help), at this scope I have included
Sthe
SWindowsCe.Forms.dll to my project even if it for pocket PC.

All CE questions are more appropriate for the compactframework group, not
this one
>>
What does it mean? MDI style or what?
What's wrong with Process.Start method?
Sit must rest in
Smy application.
---
WBR,
Michael Nemtseva [C# MVP] :: blog:http://spaces.live.com/laflour
"The greatest danger for most of us is not that our aim is too high
and we miss it, but that it is too low and we reach it" (c)
Michelangelo
---
WBR,
Michael Nemtsev [C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
Dec 21 '06 #4
excuse me but this question if for pc not for pocket pc, in fact I have
postd it here in (microsoft.public.dotnet.languages.csharp).
I want only to creaet an application parent MDI and to call in it
another program (i.e. notepad) like his child.
Do you think is possible?

On 21 Dic, 16:07, Michael Nemtsev <nemt...@msn.comwrote:
Hello Sheikko,

SYes,
SI have a parent child and want to call in it not a form, but an
Sentire
Sapplication, like notepad, word..ecc.

So call the app in the bounds of form?! Don't think it's even possible. What
are u going to do? Maybe there is another alternative solution for it, if
u describe what u wanna do

SI have solved the problem of process...I have used the
SHardwareButtons
S(solution found in the visual help), at this scope I have included
Sthe
SWindowsCe.Forms.dll to my project even if it for pocket PC.

All CE questions are more appropriate for the compactframework group, not
this one
What does it mean? MDI style or what?
What's wrong with Process.Start method?
Sit must rest in
Smy application.
---
WBR,
Michael Nemtseva [C# MVP] :: blog:http://spaces.live.com/laflour
"The greatest danger for most of us is not that our aim is too high
and we miss it, but that it is too low and we reach it" (c)
Michelangelo---
WBR,
Michael Nemtsev [C# MVP] :: blog:http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
Dec 21 '06 #5
Hello Sheikko,

It's a kind of hack, redirecting the process' window handler on your form one
Use SetParent and ShowWindow WinAPI methods

http://groups.google.ru/group/micros...564c2dff6613fb

Sexcuse me but this question if for pc not for pocket pc, in fact I
Shave
Spostd it here in (microsoft.public.dotnet.languages.csharp).
SI want only to creaet an application parent MDI and to call in it
Sanother program (i.e. notepad) like his child.
SDo you think is possible?
SOn 21 Dic, 16:07, Michael Nemtsev <nemt...@msn.comwrote:
S>
>Hello Sheikko,

SYes,
SI have a parent child and want to call in it not a form, but an
Sentire
Sapplication, like notepad, word..ecc.
So call the app in the bounds of form?! Don't think it's even
possible. What
are u going to do? Maybe there is another alternative solution for
it, if
u describe what u wanna do
SI have solved the problem of process...I have used the
SHardwareButtons
S(solution found in the visual help), at this scope I have included
Sthe
SWindowsCe.Forms.dll to my project even if it for pocket PC.
All CE questions are more appropriate for the compactframework group,
not this one
>>>What does it mean? MDI style or what?
What's wrong with Process.Start method?
Sit must rest in
Smy application.
---
WBR,
Michael Nemtseva [C# MVP] :: blog:http://spaces.live.com/laflour
"The greatest danger for most of us is not that our aim is too high
and we miss it, but that it is too low and we reach it" (c)
Michelangelo---
WBR,
Michael Nemtsev [C# MVP] :: blog:http://spaces.live.com/laflour
"The greatest danger for most of us is not that our aim is too high
and we miss it, but that it is too low and we reach it" (c)
Michelangelo
---
WBR,
Michael Nemtsev [C# MVP] :: blog: http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
Dec 21 '06 #6
thanks I will try tomorrow and I tell you something. thanks.

On 21 Dic, 17:02, Michael Nemtsev <nemt...@msn.comwrote:
Hello Sheikko,

It's a kind of hack, redirecting the process' window handler on your form one
Use SetParent and ShowWindow WinAPI methods

http://groups.google.ru/group/micros...ramework/brows...

Sexcuse me but this question if for pc not for pocket pc, in fact I
Shave
Spostd it here in (microsoft.public.dotnet.languages.csharp).
SI want only to creaet an application parent MDI and to call in it
Sanother program (i.e. notepad) like his child.
SDo you think is possible?
SOn 21 Dic, 16:07, Michael Nemtsev <nemt...@msn.comwrote:
S>
Hello Sheikko,
SYes,
SI have a parent child and want to call in it not a form, but an
Sentire
Sapplication, like notepad, word..ecc.
So call the app in the bounds of form?! Don't think it's even
possible. What
are u going to do? Maybe there is another alternative solution for
it, if
u describe what u wanna do
SI have solved the problem of process...I have used the
SHardwareButtons
S(solution found in the visual help), at this scope I have included
Sthe
SWindowsCe.Forms.dll to my project even if it for pocket PC.
All CE questions are more appropriate for the compactframework group,
not this one
>>What does it mean? MDI style or what?
What's wrong with Process.Start method?
Sit must rest in
Smy application.
---
WBR,
Michael Nemtseva [C# MVP] :: blog:http://spaces.live.com/laflour
"The greatest danger for most of us is not that our aim is too high
and we miss it, but that it is too low and we reach it" (c)
Michelangelo---
WBR,
Michael Nemtsev [C# MVP] :: blog:http://spaces.live.com/laflour
"The greatest danger for most of us is not that our aim is too high
and we miss it, but that it is too low and we reach it" (c)
Michelangelo---
WBR,
Michael Nemtsev [C# MVP] :: blog:http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
Dec 21 '06 #7
Hi,
I have tried the code example in the link you have provided, but he
doesn't work. The notepad process is creadte, but like a separated
program.

Here there is my code:

=================
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Diagnostics;
using System.Runtime.InteropServices;

namespace chilTest01
{
public partial class Form1 : Form
{
[DllImport("user32.dll")]
private static extern int SetParent(IntPtr hWndChild, IntPtr
hWndNewParent);
[DllImport("User32")]
private static extern int ShowWindow(IntPtr hWnd, int
nCmdShow);

private const int SW_MAXIMIZE = 3;
Process p = new Process();

public Form1()
{
InitializeComponent();
}
/**
* this code call a form like a child.
*/
private void newToolStripMenuItem_Click(object sender,
EventArgs e)
{
Form2 newMDIChild = new Form2();
// Set the Parent Form of the Child window.
newMDIChild.MdiParent = this;
// Display the new form.
newMDIChild.Show();
}

private void processToolStripMenuItem_Click(object sender,
EventArgs e)
{
// start your application
p.StartInfo.FileName = "NOTEPAD.EXE";
p.StartInfo.UseShellExecute = true;
p.Start();
// change parent window and maximize inside the form
//SetParent(p.MainWindowHandle, this.Handle);
//ShowWindow(p.MainWindowHandle, SW_MAXIMIZE);
}
}
}

=================

Sheikko ha scritto:
thanks I will try tomorrow and I tell you something. thanks.

On 21 Dic, 17:02, Michael Nemtsev <nemt...@msn.comwrote:
Hello Sheikko,

It's a kind of hack, redirecting the process' window handler on your form one
Use SetParent and ShowWindow WinAPI methods

http://groups.google.ru/group/micros...ramework/brows...

Sexcuse me but this question if for pc not for pocket pc, in fact I
Shave
Spostd it here in (microsoft.public.dotnet.languages.csharp).
SI want only to creaet an application parent MDI and to call in it
Sanother program (i.e. notepad) like his child.
SDo you think is possible?
SOn 21 Dic, 16:07, Michael Nemtsev <nemt...@msn.comwrote:
S>
>Hello Sheikko,
>SYes,
>SI have a parent child and want to call in it not a form, but an
>Sentire
>Sapplication, like notepad, word..ecc.
>So call the app in the bounds of form?! Don't think it's even
>possible. What
>are u going to do? Maybe there is another alternative solution for
>it, if
>u describe what u wanna do
>SI have solved the problem of process...I have used the
>SHardwareButtons
>S(solution found in the visual help), at this scope I have included
>Sthe
>SWindowsCe.Forms.dll to my project even if it for pocket PC.
>All CE questions are more appropriate for the compactframework group,
>not this one
>>>What does it mean? MDI style or what?
>>>What's wrong with Process.Start method?
>>>Sit must rest in
>>>Smy application.
>>>---
>>>WBR,
>>>Michael Nemtseva [C# MVP] :: blog:http://spaces.live.com/laflour
>>>"The greatest danger for most of us is not that our aim is too high
>>>and we miss it, but that it is too low and we reach it" (c)
>>>Michelangelo---
>WBR,
>Michael Nemtsev [C# MVP] :: blog:http://spaces.live.com/laflour
>"The greatest danger for most of us is not that our aim is too high
>and we miss it, but that it is too low and we reach it" (c)
>Michelangelo---
WBR,
Michael Nemtsev [C# MVP] :: blog:http://spaces.live.com/laflour

"The greatest danger for most of us is not that our aim is too high and we
miss it, but that it is too low and we reach it" (c) Michelangelo
Jan 8 '07 #8

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

Similar topics

2
by: Mike | last post by:
I am sure that I am making a simple boneheaded mistake and I would appreciate your help in spotting in. I have just installed apache_2.0.53-win32-x86-no_ssl.exe php-5.0.3-Win32.zip...
2
by: Ron L | last post by:
I have an MDI application which opens a number of child windows, each of which could have data in a state that needs to be saved. Each child window catches its Closing event and cancels it if the...
8
by: Bf | last post by:
I was creating test projects using c# and was surprised that there seems to be only a form based windows applications available. Is it safe to assume that classic window applications that utilize a...
9
by: meerubus | last post by:
Hi, Could someone advise how to go about writing a (simple?) C++ program to block a windows exe file from running? For example, my child likes to run halo.exe & the pgm can run even in a...
11
by: c676228 | last post by:
Hi everyone, I am just wodering in asp program, if there is anybody writing store procedure for inserting data into database since there are so many parameters need to be passed into store...
12
by: Phil | last post by:
I can check for MdiChildren.Length=0, but which event handler should I put this in to detect when a child window is closed? TIA Phil.
3
by: Dean Slindee | last post by:
Need to write a standalone application that processes data once per day. Looking for the application program types available that would satisfy these requirements: Requirements: 1. Unattended...
5
by: cglobal25 | last post by:
Here is the output from phpinfo() on my laptop running windows vista. As you can see mysql is mentioned several times in the output. I'm not sure why i get this error. Php scripts that i save in...
2
by: Radz | last post by:
when the fork system call is executed, a new process is created. The original process is called the parent process whereas the new process is called the child process. The new process consists of a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.