how can i tell if its the users first run of the application on there machine?
Printable View
how can i tell if its the users first run of the application on there machine?
There are a ton of different ways of doing it, but I prefer the registry. You can create a SubKey under HKCU\Software\<MyApp> and then make some key like 'FirstRun'. Check if it exists, if it doesn't then create it and set a value.
If it doesn't exist, then you know they haven't used it before. If it does, then you know they have.
I have no idea when it comes to the registry, when you say <MyApp> would i just put my applications name there? Then would i create a subkey like CheckFirstRun?
Would you say checking if a boolean named isFirstRun in my.settings = true is a good way off checking first run?
You have to know by now that I'm not going to give you the code.
I've given you the idea, now do the research.
This is the exact reason why I keep calling your quote, that is in signature, ironic. Because you're not doing the work and you're definitely not working hard at it. Google it, and then ask questions based on what you've found. This doesn't mean this:
"Okay. I Googled it. Now give me code."
It doesn't work that way either. Try things out and post what doesn't work, any error messages, and relevant information. I want you to do the work while I direct you, but no more.
This process is rather simple though. First, check if the key exists. It doesn't matter what the value of the key is because you only create it if the app has has been ran once or more. If you want to check the values, you can, but it's pointless. So if the key exists, then move on, if it doesn't create it and do whatever you want.
He could even do My.Settings instead of Registry. The MSDN page more or less talks about it, but we're not going to 'hand feed you'.
You should do a bit of research too. If you did a search for "vb.net app first run", you would've found this tutorial on Youtube.
no no i know, im just saying what do you think of using that way?
Also formlesstree i watched that and thats where i got the idea from