Click here to Skip to main content
15,887,328 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Generaltask manager Pin
aliali7410-Jul-12 8:14
aliali7410-Jul-12 8:14 
GeneralRe: task manager Pin
Dave Kreskowiak10-Jul-12 8:22
mveDave Kreskowiak10-Jul-12 8:22 
GeneralRe: task manager Pin
Wes Aday10-Jul-12 9:35
professionalWes Aday10-Jul-12 9:35 
QuestionProperty changed event in standard control Pin
908236510-Jul-12 6:28
908236510-Jul-12 6:28 
AnswerRe: Property changed event in standard control Pin
Sonhospa10-Jul-12 8:11
Sonhospa10-Jul-12 8:11 
AnswerRe: Property changed event in standard control Pin
Eddy Vluggen10-Jul-12 9:18
professionalEddy Vluggen10-Jul-12 9:18 
GeneralRe: Property changed event in standard control Pin
908236511-Jul-12 9:03
908236511-Jul-12 9:03 
GeneralRe: Property changed event in standard control Pin
Dave Kreskowiak11-Jul-12 9:11
mveDave Kreskowiak11-Jul-12 9:11 
Member 9082365 wrote:
The intention is to have an event trigger every time that the count of list
items changes for any reason


Actually, this is a piss-poor idea. A ListBox control should not be the "authoritative" collection of items, such as your list of attendees. A dedicated collection should be the one that controls this and either raises its own event or throws an exception of the collection is considered full. The ListBox should be used as it was designed, as a visual representation of the backing collection, nothing more.


Your idea is not quite as simple as creating your own version of ListBox with this little functionality added. The ListBox Items collection is a seperate class, called ObjectCollection I believe. You'd have to inherit from ObjectCollection, add your CountChanged event to it, the create your own ListBox implementation, changing out the Items collection with one that uses your new ObjectCollection implementation, handle the ObjectCollection.CountChanged event you made, and, finally, the ListBox would have to expose it's own CountChanged event that fires whenever the underlying ObjectCollection.CountChanged event was raised.

...or some variant thereof. But, the basic concept doesn't change from this.

GeneralRe: Property changed event in standard control Pin
908236511-Jul-12 11:52
908236511-Jul-12 11:52 
GeneralRe: Property changed event in standard control Pin
_obi_1-Aug-12 7:31
_obi_1-Aug-12 7:31 
QuestionHelo Guys i need your help Pls Pin
samfrancis10-Jul-12 1:18
samfrancis10-Jul-12 1:18 
AnswerRe: Helo Guys i need your help Pls Pin
Nick Otten10-Jul-12 2:36
Nick Otten10-Jul-12 2:36 
AnswerRe: Helo Guys i need your help Pls Pin
Wes Aday10-Jul-12 2:56
professionalWes Aday10-Jul-12 2:56 
AnswerRe: Helo Guys i need your help Pls Pin
Sonhospa10-Jul-12 8:26
Sonhospa10-Jul-12 8:26 
Questionadministrator privilage Pin
info4shajeer9-Jul-12 22:58
info4shajeer9-Jul-12 22:58 
AnswerRe: administrator privilage Pin
Richard MacCutchan9-Jul-12 23:15
mveRichard MacCutchan9-Jul-12 23:15 
GeneralRe: administrator privilage Pin
info4shajeer2-Aug-12 9:45
info4shajeer2-Aug-12 9:45 
Questioncpp code convert to visual basic 6 Pin
densti9-Jul-12 16:50
densti9-Jul-12 16:50 
AnswerRe: cpp code convert to visual basic 6 Pin
Midnight Ahri9-Jul-12 19:01
Midnight Ahri9-Jul-12 19:01 
AnswerRe: cpp code convert to visual basic 6 Pin
Eddy Vluggen10-Jul-12 0:35
professionalEddy Vluggen10-Jul-12 0:35 
AnswerRe: cpp code convert to visual basic 6 Pin
shubham salwan12-Jul-12 18:21
shubham salwan12-Jul-12 18:21 
QuestionRuntime error debugging Pin
Gagnon Claude9-Jul-12 16:08
Gagnon Claude9-Jul-12 16:08 
AnswerRe: Runtime error debugging Pin
Nick Otten9-Jul-12 20:36
Nick Otten9-Jul-12 20:36 
AnswerRe: Runtime error debugging Pin
Eddy Vluggen10-Jul-12 0:40
professionalEddy Vluggen10-Jul-12 0:40 
QuestionSuggestion about creating a installer of VB application Pin
Student102308-Jul-12 0:11
Student102308-Jul-12 0:11 

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.