locked
software problem. RRS feed

  • Question

  • Hi there. I have question regarding one software that is builded on Visual Foxpro 7.
    I have a company and i have 4 computers in my office, i have a software for my company installed only in my computer... The problem is that i dont have the cd from my software and i have tried to copy all files from one computer to run that software in other pc`s. I have installed foxpro in other pc, i build the files from begining but isn`t working... When i click on the software it opens but after 1-2 seconds the program is closed automaticly, cannot run.. What can be the problem? can anyone tell me any solution about this ?

    I will wait further for your message

    Thanks and best regards,

    armandino

    Friday, August 25, 2006 11:24 AM

Answers

All replies

  • You may have not added a READ EVENTS in your main prg.

    * main.prg
    do menu mymenu
    do form myform
    READ EVENTS
    * cleanup code here
    return && or quit

     See:

    http://fox.wikis.com/wc.dll?Wiki~VFPRookieMistakes

    especially the section at the bottom.

     See also:

    ON SHUTDOWN in help file.

     http://fox.wikis.com/wc.dll?Wiki~VFP7RuntimeFiles

     

     

    Friday, August 25, 2006 12:50 PM
  • Thank you for your replay Alex Feldstein, but still i have a question regarding this program..
    That code you gave me do i have to paste into the code? Sorry i`m new on Visual FoxPro that`s why i dont know how to fix it.
    Let me know if you want the code i can send you through mail and you can check it !
    Thank you again for your replay and i will further for your answer.
    Regards,

    Armandino

    Sunday, August 27, 2006 5:02 PM
  • >That code you gave me do i have to paste into the code? Sorry i`m new on Visual FoxPro that`s why i dont know how to fix it.

    The example I gave you is an idea. I assume you have a starting PRG in your project. This is the most common and easiest way to start programs.

    Your PRG runs code to instantiate you main menu and main form. Then VFP needs a wait state. All of the program's life is spent in this line: READ EVENTS. The wait state allows the processor to be looking for your users menu choices, form buttons, or other controls.

    Once you are ready to exit the program, generally through an Exit option in the menu or a button in your main form, you issue a CLEAR EVENTS. The QueryUnload() and Destroy() methods of the form triggered and run whatever code you have there (or your OOP framework has), then processing goes back to the main program (PRG) to the line immediately after READ EVENTS, where you can do your final clean up and QUIT.

    See also ON SHUTDOWN

    http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dv_foxhelp9/html/9ab3af21-8cd6-4a18-b40b-f789b802aef7.asp?frame=true

     

    Monday, August 28, 2006 11:22 AM