I am writing a program that runs off of a main() subroutine. There are a few operations and then an eternal while loop. If the user clicks on the tray icon and selects to update, how can I break out of the place I am at in the code and restart my main() subroutine without losing my variables? I am concerned about doing a call main() because then won't my stack keep growing since I am not exiting the place I was previously at in the main loop and not ending the subroutine that was called when "update" was clicked. Thank you.
VB memory issue
Collapse
X
-
My code looks as follows:
Code:sub main() 'some initialization and a few function calls dim loopvar as boolean = true while loopvar = true 'some more function calls and a few application.run() end while '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' 'here is the on_click method for the "update" button on the tray icon sub 'here is where i need to somehow go back to a point a little before the eternal loop in main() on the button click, and i need to do this without creating memory issues if the "update" button is repeatedly clicked end sub
Comment