I have been able to execute Notepad.exe in a Panel (set to Dock.Fill)
on a Windows Form, like:
ProcessStartInfo psi = new ProcessStartInfo("notepad");
p = Process.Start(psi);
p.WaitForInputIdle();
SetParent(p.MainWindowHandle, uiAppPanel.Handle);
ShowWindow(p.MainWindowHandle, (int)ShowCommands.SW_MAXIMIZE);
int style = GetWindowLong(p.MainWindowHandle, GWL_STYLE);
SetWindowLong(p.MainWindowHandle, GWL_STYLE, style & ~WS_CAPTION);
Only problem now when I resize the Form the Panel resizes, but I need a
way to tell Notepad to resize to fill the panel (maximize I guess)
also. I tried calling ShowWindow again, but that seems to have no
effect. Is it possible to make this work? 2 3922
can i ask why you need to use notepad in this way? im curious
<ti*****@gmail.comwrote in message
news:11**********************@i42g2000cwa.googlegr oups.com...
>I have been able to execute Notepad.exe in a Panel (set to Dock.Fill)
on a Windows Form, like:
ProcessStartInfo psi = new ProcessStartInfo("notepad");
p = Process.Start(psi);
p.WaitForInputIdle();
SetParent(p.MainWindowHandle, uiAppPanel.Handle);
ShowWindow(p.MainWindowHandle, (int)ShowCommands.SW_MAXIMIZE);
int style = GetWindowLong(p.MainWindowHandle, GWL_STYLE);
SetWindowLong(p.MainWindowHandle, GWL_STYLE, style & ~WS_CAPTION);
Only problem now when I resize the Form the Panel resizes, but I need a
way to tell Notepad to resize to fill the panel (maximize I guess)
also. I tried calling ShowWindow again, but that seems to have no
effect. Is it possible to make this work?
On Nov 1, 1:12 pm, "Paul Mcilreavy" <r...@hotmail.co.ukwrote:
can i ask why you need to use notepad in this way? im curious
<timn...@gmail.comwrote in messagenews:11**********************@i42g2000cwa.g ooglegroups.com...
I have been able to execute Notepad.exe in a Panel (set to Dock.Fill)
on a Windows Form, like:
ProcessStartInfo psi = new ProcessStartInfo("notepad");
p = Process.Start(psi);
p.WaitForInputIdle();
SetParent(p.MainWindowHandle, uiAppPanel.Handle);
ShowWindow(p.MainWindowHandle, (int)ShowCommands.SW_MAXIMIZE);
int style = GetWindowLong(p.MainWindowHandle, GWL_STYLE);
SetWindowLong(p.MainWindowHandle, GWL_STYLE, style & ~WS_CAPTION);
Only problem now when I resize the Form the Panel resizes, but I need a
way to tell Notepad to resize to fill the panel (maximize I guess)
also. I tried calling ShowWindow again, but that seems to have no
effect. Is it possible to make this work?
We need to host some old legacy windows applications within a new .Net
shell/menu application. I am just using notepad.exe as a test. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Noah Coad [C# MCP] |
last post by:
I'm creating a program the must show the time (a clock) in a user control
and the text must fill the user control. How do I make text dynamically
resize to fill a label/panel/usercontrol? ...
|
by: Bisbal |
last post by:
Hi All,
I have created a class that simulates a MDI form by putting the 'child'
inside a panel located in the 'parent' form. I had to do this because we use
a custom UI that doesn't work...
|
by: Kevin L |
last post by:
How would I go about resizing a panel control using a mouse at runtime?
|
by: Peter Proost |
last post by:
Hi group I have the following piece of code that should resize the bitmap in
a picture box but it doesn't work as I tought it would. Can someone help me
with it?
thnx Peter
Public Class...
|
by: Rob |
last post by:
I need to create a form that will resize only the verticle size of the Form
and not the width. So far I'm partial to the following code. Can someone
please elaborate the ??? . . . .
Const...
|
by: Russ Green |
last post by:
I have a VB.NET app that uses lots of forms which I am loading into a panel
cotrol using.....
Me.pnlMain.Controls.Clear()
frm.TopLevel = False
frm.WindowState = FormWindowState.Maximized...
|
by: Jeffrey Walton |
last post by:
Hi All,
I have a horizontal Splitter, for which I would like the top panel to
remain 20 pixels in height. I do this because I have a containter on
it, and I overide the OnPaint method. It is...
|
by: Dan Tallent |
last post by:
In my application I have a form (Customer) that I want to be able to open
multiple copies at once. Within this form I have other forms that can be
opened. Example: ZipCode. When the user enters...
|
by: Scott Stark |
last post by:
Hello,
I'm *just* delving into Windows forms-based programming without the benefit
of any books, etc. I have a background in light ASP.NET work, so forgive me
if this is a really basic question...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
|
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...
|
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,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
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...
|
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...
| |