Click here to Skip to main content
15,923,222 members
Home / Discussions / C#
   

C#

 
Questionbutton click event Pin
anishkannan7-Jan-10 19:33
anishkannan7-Jan-10 19:33 
AnswerRe: button click event Pin
kpeter67-Jan-10 21:12
kpeter67-Jan-10 21:12 
AnswerRe: button click event Pin
OriginalGriff7-Jan-10 22:25
mveOriginalGriff7-Jan-10 22:25 
GeneralRe: button click event Pin
dojohansen8-Jan-10 0:35
dojohansen8-Jan-10 0:35 
GeneralRe: button click event Pin
OriginalGriff8-Jan-10 0:41
mveOriginalGriff8-Jan-10 0:41 
GeneralRe: button click event Pin
Luc Pattyn8-Jan-10 2:09
sitebuilderLuc Pattyn8-Jan-10 2:09 
Questionall form problem? [modified] Pin
miss YY7-Jan-10 19:27
miss YY7-Jan-10 19:27 
AnswerRe: all form problem? Pin
OriginalGriff7-Jan-10 22:32
mveOriginalGriff7-Jan-10 22:32 
Firstly: Don't do it!

If you access controls on one form from another, then you are locking the design of teh two forms together - you cannot change one form without changing the other. This defeats one of the intentions of an OOP language at a stroke, and it why by default controls are not declared as public.

Instead, either:

1) Set up a public property or method on form2 which form1 can access to get the information it needs without knowning the internal details of form2.

or

2) Set up an event or delegate with form1 can subscribe to get the information.

Depending on what you are doing when you need the information will determine which way to go. If you need form1 to be aware when the datetimepicker has changed, then use (2), otherwise, go with (1).

All those who believe in psycho kinesis, raise my hand.

QuestionHow to get The Url in the browser's address bar by c#(winform) [modified] Pin
SrhLj7-Jan-10 18:24
SrhLj7-Jan-10 18:24 
AnswerRe: How to get IE address by c#(winform) Pin
Dimitri Witkowski7-Jan-10 19:07
Dimitri Witkowski7-Jan-10 19:07 
GeneralRe: How to get IE address by c#(winform) Pin
SrhLj7-Jan-10 20:25
SrhLj7-Jan-10 20:25 
AnswerRe: How to get The Url in the browser's address bar by c#(winform) Pin
SrhLj7-Jan-10 21:49
SrhLj7-Jan-10 21:49 
JokeRe: How to get The Url in the browser's address bar by c#(winform) Pin
dojohansen8-Jan-10 0:37
dojohansen8-Jan-10 0:37 
AnswerRe: How to get The Url in the browser's address bar by c#(winform) Pin
carlecomm10-Jan-10 20:57
carlecomm10-Jan-10 20:57 
QuestionHow do i get the date, burned speed, manufactorer id of cd or dvd that i was burned? Pin
vinlong907-Jan-10 16:10
vinlong907-Jan-10 16:10 
QuestionConsole.Beep(int,int) uses sound card Pin
Lutosław7-Jan-10 12:13
Lutosław7-Jan-10 12:13 
AnswerRe: Console.Beep(int,int) uses sound card Pin
Expert Coming7-Jan-10 12:20
Expert Coming7-Jan-10 12:20 
GeneralRe: Console.Beep(int,int) uses sound card Pin
Lutosław7-Jan-10 12:32
Lutosław7-Jan-10 12:32 
GeneralRe: Console.Beep(int,int) uses sound card Pin
Expert Coming7-Jan-10 12:43
Expert Coming7-Jan-10 12:43 
AnswerRe: Console.Beep(int,int) uses sound card Pin
DaveyM697-Jan-10 13:06
professionalDaveyM697-Jan-10 13:06 
GeneralRe: Console.Beep(int,int) uses sound card Pin
Roger Wright7-Jan-10 17:16
professionalRoger Wright7-Jan-10 17:16 
QuestionHover form over label... keeps flashing Pin
Jacob Dixon7-Jan-10 11:12
Jacob Dixon7-Jan-10 11:12 
AnswerRe: Hover form over label... keeps flashing Pin
Luc Pattyn7-Jan-10 12:52
sitebuilderLuc Pattyn7-Jan-10 12:52 
GeneralRe: Hover form over label... keeps flashing Pin
Jacob Dixon7-Jan-10 13:00
Jacob Dixon7-Jan-10 13:00 
GeneralRe: Hover form over label... keeps flashing Pin
Luc Pattyn7-Jan-10 13:10
sitebuilderLuc Pattyn7-Jan-10 13:10 

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.