7 Replies - 350 Views - Last Post: 07 February 2013 - 11:29 AM Rate Topic: -----

#1 kaed  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 27-January 13

Running programs from within a program

Posted 05 February 2013 - 06:54 PM

Hey guys I'm curious how running programs within a program works. For example there was an app called SleepyTabber developed a while ago that does this. Here's a picture of it: http://i56.tinypic.com/15ojmdz.png

Would something like this be able to be developed in vb.net? If so, what would the pseudo code for it be like and what classes would it be dependent on? I'm interested in recreating an app like this but don't know where to start.

Is This A Good Question/Topic? 0
  • +

Replies To: Running programs from within a program

#2 Guitora Kuronato  Icon User is offline

  • New D.I.C Head

Reputation: -7
  • View blog
  • Posts: 28
  • Joined: 02-December 12

Re: Running programs from within a program

Posted 05 February 2013 - 07:14 PM

As i know,
A program can call another program to run, but if program run within the program, it just like program open another program.
So, the result is same. only can program run program
Was This Post Helpful? 0
  • +
  • -

#3 IronRazer  Icon User is offline

  • D.I.C Addict

Reputation: 236
  • View blog
  • Posts: 778
  • Joined: 01-February 13

Re: Running programs from within a program

Posted 05 February 2013 - 07:47 PM

Hey Kaed,
I never used that program before but, maybe using a (Process) or the (Shell) command to execute the programs you could make something like it. You can control the programs somewhat with them but, you may also want to use some API`s to get more control of the programs.
Was This Post Helpful? 0
  • +
  • -

#4 kaed  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 27-January 13

Re: Running programs from within a program

Posted 05 February 2013 - 08:03 PM

Well I've tried this already:
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim nMS As New Process
        With nMS
            .StartInfo.UseShellExecute = True
            .StartInfo.Arguments = "C:\Program Files (x86)\Mozilla Firefox\firefox.exe"
            .StartInfo.FileName = "MultiMS.vshost.exe"
            .Start()
        End With
    End Sub


When I click the button I see the process for my program increase in memory a bit but I can't see the firefox running at all.

code above is from here btw: http://www.vbforums....ethod-in-vb.NET
Was This Post Helpful? 0
  • +
  • -

#5 IronRazer  Icon User is offline

  • D.I.C Addict

Reputation: 236
  • View blog
  • Posts: 778
  • Joined: 01-February 13

Re: Running programs from within a program

Posted 05 February 2013 - 09:12 PM

Your FileName should be the program you want to open "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" and the arguments are for passing arguments to the program for example if you wanted firefox to open to yahoo when it starts you could use :

.StartInfo.Argument = "http://www.Yahoo.com"


or if the program was notepad you could set the argument to the text file PathName you want to open.
Was This Post Helpful? 0
  • +
  • -

#6 kaed  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 27-January 13

Re: Running programs from within a program

Posted 06 February 2013 - 11:01 AM

View PostIronRazer, on 05 February 2013 - 09:12 PM, said:

Your FileName should be the program you want to open "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" and the arguments are for passing arguments to the program for example if you wanted firefox to open to yahoo when it starts you could use :

.StartInfo.Argument = "http://www.Yahoo.com"


or if the program was notepad you could set the argument to the text file PathName you want to open.


Okay so basically this code is no where near accomplishing what I want to do. Anyone have some type of idea where I can start?
Was This Post Helpful? 0
  • +
  • -

#7 andrewsw  Icon User is online

  • Fire giant boob nipple gun!
  • member icon

Reputation: 3326
  • View blog
  • Posts: 11,248
  • Joined: 12-December 12

Re: Running programs from within a program

Posted 06 February 2013 - 11:21 AM

If you want to open a web page in your default browser, then just:

.StartInfo.FileName = "http://www.bbc.co.uk"

If you just want to start FireFox:

.StartInfo.FileName = "C:\Program Files (x86)\Mozilla Firefox\firefox.exe"


but if you want to use FireFox AND open a specific web page, then:

.StartInfo.FileName = "C:\Program Files (x86)\Mozilla Firefox\firefox.exe"
.StartInfo.Arguments = "http://www.bbc.co.uk"
.Start()

Was This Post Helpful? 0
  • +
  • -

#8 kaed  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 8
  • Joined: 27-January 13

Re: Running programs from within a program

Posted 07 February 2013 - 11:29 AM

View Postandrewsw, on 06 February 2013 - 11:21 AM, said:

If you want to open a web page in your default browser, then just:

.StartInfo.FileName = "http://www.bbc.co.uk"

If you just want to start FireFox:

.StartInfo.FileName = "C:\Program Files (x86)\Mozilla Firefox\firefox.exe"


but if you want to use FireFox AND open a specific web page, then:

.StartInfo.FileName = "C:\Program Files (x86)\Mozilla Firefox\firefox.exe"
.StartInfo.Arguments = "http://www.bbc.co.uk"
.Start()


Yea sorry that was just a stupid mistake on my part. Anyways I found a way to accomplish my goal by just setting the handle of the process I create to the handle of a tab page.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1