473,811 Members | 2,324 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Opening another application from .Net application

I have an application that I want to open from my .net application. I
want this application as a clild window of my application. not as a
separate process. Is this posssible?

System.Diagnost ics.Process p = new System.Diagnost ics.Process();
p.StartInfo.Fil eName = "Mspaint.ex e";
p.Start();

The following code will open mspaint from my application.. but it will
be a free window. I want this to be like a child window of my
application.

Dec 8 '06 #1
2 1084
You can try this. It doesn't make it a "child" (I'm not sure actually what
you mean by this) but it does give you control.

Try
MyApp = GetObject(, ""Mspaint.e xe") ' in case it's there
Catch ex as Exception
MyApp = CreateObject ( and here you need to do some research )
End Try

you will need to create a reference if you want Intellisense etc. but later
you can use late binding and convert MyApp to Object
Dec 8 '06 #2
Stuart Nathan
Will you be able to give me the C# equivalent for this?
What object is MyApp?

Thanks in advance
Kris

Stuart Nathan wrote:
You can try this. It doesn't make it a "child" (I'm not sure actually what
you mean by this) but it does give you control.

Try
MyApp = GetObject(, ""Mspaint.e xe") ' in case it's there
Catch ex as Exception
MyApp = CreateObject ( and here you need to do some research )
End Try

you will need to create a reference if you want Intellisense etc. but later
you can use late binding and convert MyApp to Object
Dec 11 '06 #3

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

Similar topics

44
4749
by: Carlos Andr?s | last post by:
Hi everybody. I've got a problem. I'd like to avoid opening a new window when you have pressed the shift key and you click in the left button of the mouse. I've tried the next solution, in the body of the page I put the next code: <BODY onkeydown='notOpenNewWindow();'>
2
2103
by: Matt Hamilton | last post by:
I have an application page with a datagrid with a checkbox on each row. The user should check the rows they want to modify and then click a button. When the button is clicked, I have a Click handler that builds a url and then registers a startup script to open a modal dialog window. With XP SP2 installed the pop-up blocker stops the windows from displaying. Is there any way around this? My users are too stupid to turn off the popup blocker...
11
3621
by: aldrin | last post by:
I'm trying to run this code under windows xp sp2 using codeblocks v1.0 compiler with great difficulty.There is no problem with running this under KDevelop in linux. Any help would be greatly appreciated. Enter an interesting string. Too many cooks spoil the broth Error opening C:\myfile.txt for writing. Program termnated. This application has requested the Runtime to terminate it in an unusual way.
1
6337
by: sunil | last post by:
Hi all, I have a web application in which I have to open a "chm" file that exists on the local file system. I am able to open other files such as PDF, DOC files by writing the Response's output stream. But I do not exactly know the Response.ContentType for chm files. I have used the following code to handle the case for chm files System.IO.StreamReader sr = new System.IO.StreamReader(this.Path); FileInfo file = new FileInfo(this.Path);...
0
5808
by: Jeremy Noring | last post by:
Hi, I have an application that loads various settings from the app.exe.config file. This has worked very well on w2k, XP, and Vista. However, recently I've been troubleshooting an issue on Windows Home Server (which is based on some variation of Windows Server 2003) and I've found that ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel) is
3
3086
by: Luke Davis | last post by:
I'm looking for an effective way to open and close TCP ports. Can I do this through Tcpclient? And I know this is a potential security risk, so what kind of permission must the person running the application possess to handle it without errors? -- Luke Davis, MCSE: Security DEM Networks - Senior Systems Architect 7225 N First, Suite 105 Fresno, CA 93720
1
4631
by: Mucker | last post by:
This could be a difficult one, so please bear with me. I've an assembly containing Delphi 2006.NET forms. A C# app, via reflection opens these forms . This works fine - I've a C# app, opening Delphi 2006.NET forms. Some of these forms are MDI Child forms. Exceptions are thrown - "Cannot create form - No MDI Forms are currently active" when the C# app tries to open one of these.
1
1833
by: Sanjeeva K kanakam | last post by:
Hi all, I am developing one application. In that i have created on report file which contains tables, titles and tree view list also by using HTML tags. I am opening this file in my application it self as another window. There is no problem in opening this file if the file is small. If the file is big(here i mean to say if number of tables present in this file)then while opening this file my application is displaying a message "Cannot create...
15
2887
by: anon | last post by:
I have a page where the ASP script create a table of links i.e. 1 = NextPage.asp?Item=1 2 = NextPage.asp?Item=2 etc What I would like to do is open an new window with this link without any toolbars, addressbars, scrollbars and tabs. I would be happy even if the
1
2788
by: mohitpande | last post by:
i am using windows 2003 server and iis 5.1 for hosting my web application and windows xp as client OS i ahv excel reports in my web application which are not opening in client machine i hav already configured dcom for excel application by using Interactive excel reports are opening in server not in client i hav also tested launching user and this user property but not working i hav to open excel report in client machine
0
9728
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9605
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10648
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10389
jinu1996
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10135
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5554
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5692
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3867
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3018
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.