Display form after application has ran for certain amount of times.
Thank you
Thank you
you need to store this value somewhere, such as in your app.config settings file or the registry. It is recommended to store it in the app.config rather than the registry simply because of security reasons (you may not have permission to access the registry)
so create an app settings and save that setting when you close the app (add 1 to the existing value) then when loading, check the value to see if its 10.
Right click on your project > Properties. Press the Settings tab and add a setting named "TotalTimesRan" of type Integer and the scope being Application with the default value of 0.
When your application runs, on the form load event, read/check that value:
if My.Settings.TotalTimesRan = 10 then
'show other form
else
'show first form
end if
when closing your app, on the form closing event, set the value:
My.Settings.TotalTimesRan = My.Settings.TotalTimesRan + 1
'save:
My.Settings.Save()
does this help?