Click here to Skip to main content
15,892,298 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Using HasChanges to find unsaved data Pin
ctlqt121-Aug-07 18:46
ctlqt121-Aug-07 18:46 
Questionstart and stop timer Pin
Cory Kimble1-Aug-07 10:57
Cory Kimble1-Aug-07 10:57 
AnswerRe: start and stop timer Pin
Johan Hakkesteegt1-Aug-07 20:16
Johan Hakkesteegt1-Aug-07 20:16 
GeneralRe: start and stop timer Pin
Cory Kimble2-Aug-07 3:02
Cory Kimble2-Aug-07 3:02 
GeneralRe: start and stop timer Pin
Johan Hakkesteegt2-Aug-07 23:16
Johan Hakkesteegt2-Aug-07 23:16 
AnswerRe: start and stop timer Pin
Cory Kimble3-Aug-07 2:06
Cory Kimble3-Aug-07 2:06 
QuestionCustom event on variable change Pin
2hdass1-Aug-07 7:58
2hdass1-Aug-07 7:58 
AnswerRe: Custom event on variable change Pin
Colin Angus Mackay1-Aug-07 8:22
Colin Angus Mackay1-Aug-07 8:22 
2hdass wrote:
I am wishing make my program fire an event when a variable changes, how can I do that?


You can't.

If the variable is a field on the class then you should encapsulate it in a property and have the property's setter fire the event.

This article[^] shows how to use events (See the sibling to sibling section). The event is fired from a method, but a property is just syntactic sugar for a get or set method anyway.


Upcoming events:
* Glasgow: Mock Objects, SQL Server CLR Integration, Reporting Services, db4o, Dependency Injection with Spring ...

"I wouldn't say boo to a goose. I'm not a coward, I just realise that it would be largely pointless."


My website

GeneralRe: Custom event on variable change Pin
2hdass1-Aug-07 9:17
2hdass1-Aug-07 9:17 
Questionsend data from a listbox to textbox Pin
sixecho1-Aug-07 6:14
sixecho1-Aug-07 6:14 
AnswerRe: send data from a listbox to textbox Pin
Colin Angus Mackay1-Aug-07 8:18
Colin Angus Mackay1-Aug-07 8:18 
GeneralRe: send data from a listbox to textbox Pin
sixecho1-Aug-07 9:19
sixecho1-Aug-07 9:19 
GeneralRe: send data from a listbox to textbox Pin
Colin Angus Mackay1-Aug-07 10:11
Colin Angus Mackay1-Aug-07 10:11 
GeneralRe: send data from a listbox to textbox Pin
Colin Angus Mackay2-Aug-07 7:51
Colin Angus Mackay2-Aug-07 7:51 
QuestionChanging button border Pin
HelpMePlease!1-Aug-07 5:40
HelpMePlease!1-Aug-07 5:40 
AnswerRe: Changing button border Pin
Taylor Kobani1-Aug-07 10:20
Taylor Kobani1-Aug-07 10:20 
GeneralRe: Changing button border Pin
HelpMePlease!1-Aug-07 12:43
HelpMePlease!1-Aug-07 12:43 
QuestionCalculate downtime excluding off-hours and weekends Pin
takaz1231-Aug-07 5:11
takaz1231-Aug-07 5:11 
AnswerRe: Calculate downtime excluding off-hours and weekends Pin
klaydze1-Aug-07 20:04
klaydze1-Aug-07 20:04 
GeneralRe: Calculate downtime excluding off-hours and weekends Pin
takaz1231-Aug-07 21:49
takaz1231-Aug-07 21:49 
QuestionHow to attach any extension with your application Pin
Rizwan Bashir1-Aug-07 5:04
Rizwan Bashir1-Aug-07 5:04 
AnswerRe: How to attach any extension with your application Pin
Luc Pattyn1-Aug-07 5:14
sitebuilderLuc Pattyn1-Aug-07 5:14 
GeneralRe: How to attach any extension with your application Pin
Rizwan Bashir2-Aug-07 1:58
Rizwan Bashir2-Aug-07 1:58 
GeneralRe: How to attach any extension with your application Pin
Luc Pattyn2-Aug-07 2:36
sitebuilderLuc Pattyn2-Aug-07 2:36 
Questionworking with files and graphics... Pin
CAxeMan1-Aug-07 5:02
CAxeMan1-Aug-07 5:02 

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.