Hello, this is my first time posting on here.
I took a class for Visual Basic but never got a chance to get real deep into it. IM currently trying to make a program that I can use to store all my serials for my games and other programs, so that it will be more organized, and possibly eventually try to make it more secured.
I have my main form "form1.vb" I have a dialog box called "AddKey.vb" and another dialog box called "DeleteKey.vb". On form1.vb I have 3 buttons, one labeled Add, one labeled Delete, and one labeled Exit *for apparent reasons*. I then have a drop down combo box and a list box. I want to, after addding keys, be able to select the drop down list box select a game and have it push my serial(s) for that peticular program to the list box.
Well . . . when I push the "add button" it opens up the "AddKey.vb" dialog box. the dialog box has 3 text boxes in it. One to type in the name of the game, and 2 to type in the serial *so that It can compare the both together, kind of like when you create a password it wants you to type it in twice. Well . . . the first box will be added to the variable "Gamename" then the second one will be added to the variable "GameKey1" then the second one will be added to "GameKey2".
I was wondering how do I make the value stored in the variable in the "addkey.vb" dialog box code to variables in the "form1.vb" dialog box code, and also, how should I go about adding these values so that every time I open the program its there. should I use an external text file or 2 text files or what. Im not sure as to what the best rout of action is to take here.

Using Multiple Dialog Boxes
Michael Mossman
also, how would I go about encrypting it, and also how do I make it so that the database is stored in the .exe so it doesnt matter if I move the program, I will still be able to access everything and modify everything every time I use it
hari krishna panda1
IanBlackburn
You need to write (push) these values from the AddKey.vb (Dialog form) to form1.vb
Form1.vb calls the AddKey.vb (dialog/form). Make sure this is modal.
' Push the values back to form1:
' This assumes you have a variables called GameName, GameKey1, GameKey2 that are Pulbic type String in .
form1.GameName = AddKey.GameName.text
form1.GameKey1 = AddKey.GameKey1.text
form1.GameKey2 = AddKey.GameKey2.text
Once you are done, just before you exit AddKey place this code in the exit routine to send the data back to form1.
There are other ways to do this; objects to pass values or global varables..... But for now this is probably the best way.
fleo
This is a good senerio for using ADO.NET, databinding, and a database...
Learning ADO.NET:
http://msdn2.microsoft.com/en-us/data/aa937699.aspx
VB Data samples:
http://msdn2.microsoft.com/en-us/vbasic/ms789075.aspx#data
mrmckeb
Let me clarify something here...to use an Access database you do NOT have to have Access installed on your computer or your end users computer(only the mdb file)...furthermore you are capable of encrypting the database(mdb file) as well as the data that you store in the database...which makes it pretty secure...although nothing is 100% secure ...the scenerio of encryting the data and then encrypting the mdb file would be a tough one to crack for the best of hackers!
textman
fun project!!