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. control

control

Scheduled Pinned Locked Moved Visual Basic
csharpquestion
2 Posts 2 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
    Mr kilany
    wrote on last edited by
    #1

    dear friend... if i have a form in vb.net such as (A) and another application in c language such as (B) how can i control the application (B) from the buttons based on form (A) and i mean of control : 1-run application B 2-minimize and mazimize form B 3-close form B 4- the most thing is make the form A always active that mean you cant use the appliation B except throught the form (A) thanx all kilany kilany kilany

    D 1 Reply Last reply
    0
    • M Mr kilany

      dear friend... if i have a form in vb.net such as (A) and another application in c language such as (B) how can i control the application (B) from the buttons based on form (A) and i mean of control : 1-run application B 2-minimize and mazimize form B 3-close form B 4- the most thing is make the form A always active that mean you cant use the appliation B except throught the form (A) thanx all kilany kilany kilany

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      First, you can NOT make another application a modal child of your own. Once launched, there is nothing you can do to reliably stop a user from switching over to the other application and using it without your interface. It's very easy to launch the other app (point 1 in your post). Point 2 is also pretty easy. All you need to do is get the Window handle of the launched app and call the Win32 function ShowWindow with the appropriate parameters. Point 3 is a bit more complicated, despite it's seeming ease. You can easily tell the application to exit, but if it wants to show some window that wants comfirmation of exit or saving changes, then you've got a problem. You have to find those windows, if they exist, then send the appropriate commands to those windows. Point 4 - Not practically possible. There is nothing you can do to prevent the user from skipping your app, or shutting it down, and just using the app your trying to control. Point 5 (you didn't put this) - How do you intend to control the other application?? The only way to do it is not reliable and is far more complex than the benefits your going to get from implementing it. Dave Kreskowiak Microsoft MVP - Visual Basic

      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