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. C#
  4. c# console application sharing variables with visual basic

c# console application sharing variables with visual basic

Scheduled Pinned Locked Moved C#
csharpalgorithmsquestion
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.
  • P Offline
    P Offline
    Papatrexas
    wrote on last edited by
    #1

    Hello all and thanks for reading me. I have a simple console application in c# that gets a continuous stream from a camera. the pseudo code is

    bool takepicture = false
    while (true)
    {
    Stream
    Stream some more
    if (takepicture)
    {
    capture and save the image to a file
    takepicture=false
    }
    }

    In the end what i would like to do is for a Visual Basic !!!!!!!! program to be able to call my c# console app and when something happens in the visual basic (like press a button) it will change the variable takepicture to true. I don't even know if this is possible and if it is what should i be searching for? Thanks again.

    R W 2 Replies Last reply
    0
    • P Papatrexas

      Hello all and thanks for reading me. I have a simple console application in c# that gets a continuous stream from a camera. the pseudo code is

      bool takepicture = false
      while (true)
      {
      Stream
      Stream some more
      if (takepicture)
      {
      capture and save the image to a file
      takepicture=false
      }
      }

      In the end what i would like to do is for a Visual Basic !!!!!!!! program to be able to call my c# console app and when something happens in the visual basic (like press a button) it will change the variable takepicture to true. I don't even know if this is possible and if it is what should i be searching for? Thanks again.

      R Offline
      R Offline
      Rob Philpott
      wrote on last edited by
      #2

      Yes, it's possible alright. You're talking about inter-process communication. Why do you want to use VB though? Also, because both C# and VB.NET compile down to the same thing you could probably just reference the C# assembly from your VB code if it could run in-process.

      Regards, Rob Philpott.

      1 Reply Last reply
      0
      • P Papatrexas

        Hello all and thanks for reading me. I have a simple console application in c# that gets a continuous stream from a camera. the pseudo code is

        bool takepicture = false
        while (true)
        {
        Stream
        Stream some more
        if (takepicture)
        {
        capture and save the image to a file
        takepicture=false
        }
        }

        In the end what i would like to do is for a Visual Basic !!!!!!!! program to be able to call my c# console app and when something happens in the visual basic (like press a button) it will change the variable takepicture to true. I don't even know if this is possible and if it is what should i be searching for? Thanks again.

        W Offline
        W Offline
        Wayne Gaylard
        wrote on last edited by
        #3

        A possible solution could be to have the VB application update a text / xml etc file, which would be polled by the c# console app to check if the user wants to take a snapshot. Maybe !

        Everyone dies - but not everyone lives

        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