Click here to Skip to main content
15,913,467 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionHow to refer to a control from inside a class? Pin
IlanTal8-Aug-06 21:32
IlanTal8-Aug-06 21:32 
AnswerRe: How to refer to a control from inside a class? Pin
Guffa8-Aug-06 22:31
Guffa8-Aug-06 22:31 
GeneralRe: How to refer to a control from inside a class? Pin
IlanTal9-Aug-06 0:17
IlanTal9-Aug-06 0:17 
GeneralRe: How to refer to a control from inside a class? Pin
IlanTal9-Aug-06 0:28
IlanTal9-Aug-06 0:28 
GeneralRe: How to refer to a control from inside a class? Pin
Guffa9-Aug-06 2:08
Guffa9-Aug-06 2:08 
GeneralRe: How to refer to a control from inside a class? Pin
IlanTal9-Aug-06 3:11
IlanTal9-Aug-06 3:11 
GeneralRe: How to refer to a control from inside a class? Pin
Leah_Garrett9-Aug-06 4:31
Leah_Garrett9-Aug-06 4:31 
GeneralRe: How to refer to a control from inside a class? Pin
Dave Kreskowiak9-Aug-06 4:52
mveDave Kreskowiak9-Aug-06 4:52 
That is nice and all, but completely bad practice in an Object Oriented language.

You're other class is now forever tied to this form and only this form. You'll never be able to reuse it in any other project, or even any other form, unless it's built speicifically with this class in mind.

Any code that changes the form should remain in the form's code, not in a seperate class. The form's code is responsible for updating the UI it's showing. If your class has to return a value that changes the form, the form code should be evaluating that return value and making any necessary changes. Keep the UI code in the UI layer, not the business layer.


Dave Kreskowiak
Microsoft MVP - Visual Basic


GeneralRe: How to refer to a control from inside a class? Pin
IlanTal9-Aug-06 19:16
IlanTal9-Aug-06 19:16 
GeneralRe: How to refer to a control from inside a class? Pin
Guffa9-Aug-06 23:41
Guffa9-Aug-06 23:41 
Questionhow to show detail on list view? Pin
campbells8-Aug-06 17:42
campbells8-Aug-06 17:42 
AnswerRe: how to show detail on list view? Pin
Rizwan Bashir8-Aug-06 21:16
Rizwan Bashir8-Aug-06 21:16 
GeneralRe: how to show detail on list view? Pin
campbells8-Aug-06 21:31
campbells8-Aug-06 21:31 
QuestionCustom Control Datasource Pin
Thomas Wells8-Aug-06 12:11
Thomas Wells8-Aug-06 12:11 
AnswerRe: Custom Control Datasource Pin
Thomas Wells8-Aug-06 12:58
Thomas Wells8-Aug-06 12:58 
QuestionGetting xml from webservice into dataset Pin
digsy_8-Aug-06 10:54
digsy_8-Aug-06 10:54 
AnswerRe: Getting xml from webservice into dataset [modified] Pin
Keith Malwitz8-Aug-06 18:01
Keith Malwitz8-Aug-06 18:01 
GeneralRe: Getting xml from webservice into dataset Pin
digsy_9-Aug-06 1:51
digsy_9-Aug-06 1:51 
GeneralRe: Getting xml from webservice into dataset Pin
digsy_9-Aug-06 2:57
digsy_9-Aug-06 2:57 
Questionclick event Pin
iramg8-Aug-06 9:23
iramg8-Aug-06 9:23 
AnswerRe: click event Pin
Stephen McGuire8-Aug-06 12:21
Stephen McGuire8-Aug-06 12:21 
AnswerRe: click event Pin
Dave Kreskowiak8-Aug-06 16:25
mveDave Kreskowiak8-Aug-06 16:25 
AnswerRe: click event Pin
Guerven8-Aug-06 17:10
Guerven8-Aug-06 17:10 
QuestionGlobal Arrays Pin
peterzorbas8-Aug-06 6:20
peterzorbas8-Aug-06 6:20 
AnswerRe: Global Arrays Pin
peterzorbas8-Aug-06 7:06
peterzorbas8-Aug-06 7:06 

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.