Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. How to run a program under a window

How to run a program under a window

Scheduled Pinned Locked Moved Visual Basic
tutorial
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Member 10279246
    wrote on last edited by
    #1

    I want to run ms word application in my program... I have call the exe but I want to run under a frame means I do not want to show the border.. or any method to remove the frame or border of external exe here is sample code which I got but not working ----------------------------------------- Public Class Form1 Inherits System.Windows.Forms.Form Declare Function ShowWindow Lib "user32" (ByVal hWnd As System.IntPtr, ByVal nCmdShow As Integer) As Boolean Private Const SW_MINIMIZE As Integer = 6 Private Const SW_MAXIMIZE As Integer = 3 Private Const SW_RESTORE As Integer = 9 Declare Function SetParent Lib "user32" (ByVal hWndChild As System.IntPtr, ByVal hWndNewParent As System.IntPtr) As System.IntPtr #Region " Windows Form Designer generated code " Private Sub wordMenu_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles wordMenu.Click Dim pinfo As New ProcessStartInfo("WINWORD") Dim p As Process = System.Diagnostics.Process.Start(pinfo) p.WaitForInputIdle() SetParent(p.MainWindowHandle, Label1.Handle) End Sub End Class 'Here this fellow explain how to run winword under a label.. But it is not working.... or any method to remove frame of called exe

    L A 2 Replies Last reply
    0
    • M Member 10279246

      I want to run ms word application in my program... I have call the exe but I want to run under a frame means I do not want to show the border.. or any method to remove the frame or border of external exe here is sample code which I got but not working ----------------------------------------- Public Class Form1 Inherits System.Windows.Forms.Form Declare Function ShowWindow Lib "user32" (ByVal hWnd As System.IntPtr, ByVal nCmdShow As Integer) As Boolean Private Const SW_MINIMIZE As Integer = 6 Private Const SW_MAXIMIZE As Integer = 3 Private Const SW_RESTORE As Integer = 9 Declare Function SetParent Lib "user32" (ByVal hWndChild As System.IntPtr, ByVal hWndNewParent As System.IntPtr) As System.IntPtr #Region " Windows Form Designer generated code " Private Sub wordMenu_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles wordMenu.Click Dim pinfo As New ProcessStartInfo("WINWORD") Dim p As Process = System.Diagnostics.Process.Start(pinfo) p.WaitForInputIdle() SetParent(p.MainWindowHandle, Label1.Handle) End Sub End Class 'Here this fellow explain how to run winword under a label.. But it is not working.... or any method to remove frame of called exe

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Member 10279246 wrote:

      Here this fellow explain how to run winword under a label.. But it is not working.

      Then you should go and ask him for help.

      Veni, vidi, abiit domum

      1 Reply Last reply
      0
      • M Member 10279246

        I want to run ms word application in my program... I have call the exe but I want to run under a frame means I do not want to show the border.. or any method to remove the frame or border of external exe here is sample code which I got but not working ----------------------------------------- Public Class Form1 Inherits System.Windows.Forms.Form Declare Function ShowWindow Lib "user32" (ByVal hWnd As System.IntPtr, ByVal nCmdShow As Integer) As Boolean Private Const SW_MINIMIZE As Integer = 6 Private Const SW_MAXIMIZE As Integer = 3 Private Const SW_RESTORE As Integer = 9 Declare Function SetParent Lib "user32" (ByVal hWndChild As System.IntPtr, ByVal hWndNewParent As System.IntPtr) As System.IntPtr #Region " Windows Form Designer generated code " Private Sub wordMenu_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles wordMenu.Click Dim pinfo As New ProcessStartInfo("WINWORD") Dim p As Process = System.Diagnostics.Process.Start(pinfo) p.WaitForInputIdle() SetParent(p.MainWindowHandle, Label1.Handle) End Sub End Class 'Here this fellow explain how to run winword under a label.. But it is not working.... or any method to remove frame of called exe

        A Offline
        A Offline
        Abhinav S
        wrote on last edited by
        #3

        Kindly don't repost - I saw the same question in Q&A. You won't be able to remove the border of the external exe unless you have their source code and can pass a parameter that suggests you are launching this program from another location.

        Apps - Color Analyzer | Arctic | XKCD | Sound Meter | Speed Dial

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups