Click here to Skip to main content
15,895,084 members
Home / Discussions / C#
   

C#

 
AnswerRe: try catch finally Pin
wout de zeeuw4-Aug-06 7:46
wout de zeeuw4-Aug-06 7:46 
GeneralRe: try catch finally Pin
Saamir4-Aug-06 7:50
Saamir4-Aug-06 7:50 
AnswerRe: try catch finally Pin
Glen Harvy4-Aug-06 13:17
Glen Harvy4-Aug-06 13:17 
QuestionCreate "aspx" code for a control Pin
bdn024-Aug-06 6:54
bdn024-Aug-06 6:54 
QuestionCombo Box binding Pin
~~~Johnny~~~4-Aug-06 6:47
~~~Johnny~~~4-Aug-06 6:47 
AnswerRe: Combo Box binding Pin
Josh Smith4-Aug-06 7:21
Josh Smith4-Aug-06 7:21 
GeneralRe: Combo Box binding Pin
~~~Johnny~~~4-Aug-06 8:00
~~~Johnny~~~4-Aug-06 8:00 
QuestionHow to access an object stored in the Tag property Pin
Subterranean4-Aug-06 6:43
Subterranean4-Aug-06 6:43 
The program I’m working on allows the user to produce a number of pictureboxes, set their pictures and drag them around. I also needed to store extra information about each picturebox, so I created a class called ‘item’ that has values such as ‘previousx’ ‘previousy’ etc. At the moment I have an ‘item’ for each picturebox, and all the ‘items’ in a collection so that when the user starts working with a different picturebox, the program has to look through the collection to find the correct item, so it can display the correct variables.

However, I realised that the Tag property of each picturebox can take an object, not just a single string or int etc. So attaching each picturebox’s item class to its tag should be more efficient and easier to work with. My problem is, how do I go about accessing the variables once they are stored in the tag. For example,

x = pictureBox1.Tag.previousx

would give an error on compile, as the property does not exist at build time. Is there any way to get this to work?

Thanks for the help.
AnswerRe: How to access an object stored in the Tag property Pin
LongRange.Shooter4-Aug-06 6:47
LongRange.Shooter4-Aug-06 6:47 
QuestionEncrypt Pin
seee sharp4-Aug-06 6:14
seee sharp4-Aug-06 6:14 
Questionhow to print form and how to print maltiple pages?? Pin
hdv2124-Aug-06 4:29
hdv2124-Aug-06 4:29 
AnswerRe: how to print form and how to print maltiple pages?? Pin
Judah Gabriel Himango4-Aug-06 5:10
sponsorJudah Gabriel Himango4-Aug-06 5:10 
GeneralRe: how to print form and how to print maltiple pages?? Pin
hdv2124-Aug-06 11:06
hdv2124-Aug-06 11:06 
QuestionSerial port power Pin
hacker0134-Aug-06 4:18
hacker0134-Aug-06 4:18 
AnswerRe: Serial port power Pin
Stefan Troschuetz4-Aug-06 4:43
Stefan Troschuetz4-Aug-06 4:43 
AnswerRe: Serial port power Pin
stancrm4-Aug-06 6:15
stancrm4-Aug-06 6:15 
AnswerRe: Serial port power Pin
eggie55-Aug-06 20:53
eggie55-Aug-06 20:53 
Questionhow does dispose method actually work? Pin
edel_ong4-Aug-06 4:11
edel_ong4-Aug-06 4:11 
AnswerRe: how does dispose method actually work? Pin
WillemM4-Aug-06 4:16
WillemM4-Aug-06 4:16 
GeneralRe: how does dispose method actually work? Pin
Judah Gabriel Himango4-Aug-06 5:05
sponsorJudah Gabriel Himango4-Aug-06 5:05 
AnswerRe: how does dispose method actually work? Pin
Dave Kreskowiak4-Aug-06 5:00
mveDave Kreskowiak4-Aug-06 5:00 
AnswerRe: how does dispose method actually work? Pin
Judah Gabriel Himango4-Aug-06 5:07
sponsorJudah Gabriel Himango4-Aug-06 5:07 
GeneralRe: how does dispose method actually work? Pin
Dan Neely4-Aug-06 5:34
Dan Neely4-Aug-06 5:34 
Question.net remoting concepts Pin
chandut4-Aug-06 3:57
chandut4-Aug-06 3:57 
AnswerRe: .net remoting concepts Pin
Not Active4-Aug-06 4:04
mentorNot Active4-Aug-06 4:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.