I guess you could say that I am a beginner with C# programming but I do know my way around the visual aspect of it. The coding often confuses me but I am slowly getting the hang of it. After completing tutorials on several sites I could not think of a program to make until today. I jot down christmas ideas all year long and I figured I would make an application with the items I would like to get.
I am going to have some categories on the main form like Games, Electronics, Clothes, etc. When you click on a category another form pops up with all the items that fall under that category. When you click an item the last form pops up with different information on the item.
What I don't know how to do is have the form automatically display the right information depending on which product is clicked instead of having to create a new form form every single item.
If you did not understand anything that I have said in this message then please let me know and I will do my best to rephrase it.
2 replies to this topic
#1
Posted 12 August 2011 - 05:06 PM
|
|
|
#2
Posted 12 August 2011 - 05:48 PM
This tutorial should help you. All you should have to do is pass the information from the list form to the display form and display it. If you have any questions just post here. :)
http://forum.codecal...ross-forms.html
~ Committed.
http://forum.codecal...ross-forms.html
~ Committed.
A man can be defined by what he does when no one is looking.
Science is only an educated theory, which we cannot disprove.
Science is only an educated theory, which we cannot disprove.
#3
Posted 12 August 2011 - 05:51 PM
The best way could be to send the data to the form
My c# is a little bit rusty but it's gonna be something like this
You can either send data throw a public variable/function like this
Or you can overload the constructor
And now that you have your data (it can be a string, a array, hashtable... anything) you can display your info, or fetching a database
Hope this was what you were asking :)
My c# is a little bit rusty but it's gonna be something like this
You can either send data throw a public variable/function like this
frmPopupForm frm = new frmPopupForm(); frm.myVar = "..."; frm.show();Of course in frmPopupForm you need a public variable called myVar
Or you can overload the constructor
frmPopupForm frm = new frmPopupForm("My data");
frm.show();
To do this, you simply copy the constructor of frmPopupForm to create a new function, but the new one have a one more arguments And now that you have your data (it can be a string, a array, hashtable... anything) you can display your info, or fetching a database
Hope this was what you were asking :)
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account

Back to top









