locked
visual basic help needed !! RRS feed

  • Question

  • so the interface i've made will run a c program as exe when a button is clicked.. i need to send a image file's path name as an argument to the exe.

    so i am selecting a image from computer. clicking a button and a c program runs as exe which operates on the browsed image and generates another image.this is working fine

    but when i am again browsing another file and trying to executing the exe on this second browsed file.. it is showing that the exe has run.. but the output image is the same old one.. 

    if i rerun the application then everything works fine...

    i always have to application.restart() before browsing another file otherwise the new image file won't be generated..

    what is the reason behind this?

    Thursday, November 15, 2012 5:21 PM

All replies

  • Hi Shopaholic,

    Welcome to the MSDN forum.

    Firstly, you need to check where the root limitation of switching the picture, vb side or c program side.

    You can run the exe file in cmd.exe and add parameters to it. So what is the result of switching the picture?

    If the result is the same with you get in VB program. This issue is in c program side, and the best way is rewrite the C program.

    If the result is works well, than just using vb program to run the cmd and add the paraneters into it.

    Hope this helps.


    Mark Liu-lxf [MSFT]
    MSDN Community Support | Feedback to us

    Friday, November 16, 2012 3:13 AM
    Moderator
  • actually i need to create an interface for that c program..

    the results are same even if i run the exe in cmd with parameters..

    but when i am rerunning the exe it's not working.. i can't figure out why!!

    do i need to clear the variable in vb or anything like that??

    Friday, November 16, 2012 12:40 PM
  • Hi Shopaholic,

    >>actually i need to create an interface for that c program..

    >>the results are same even if i run the exe in cmd with parameters.

    The issue is not at creating an interface, but for you need to change the behavior of the c program. It is like you have an apple. But whatever you deal with it, you can’t get the orange juice. So the solution is change the apple to orange (rewrite or change the c program).

    Hope this helps.


    Mark Liu-lxf [MSFT]
    MSDN Community Support | Feedback to us

    Tuesday, November 20, 2012 2:45 AM
    Moderator