Click here to Skip to main content
15,923,197 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: image button Pin
Lisana14-Apr-05 5:44
Lisana14-Apr-05 5:44 
GeneralRe: image button Pin
Dave Kreskowiak14-Apr-05 5:56
mveDave Kreskowiak14-Apr-05 5:56 
GeneralRe: image button Pin
Lisana14-Apr-05 6:07
Lisana14-Apr-05 6:07 
GeneralRe: image button Pin
Dave Kreskowiak14-Apr-05 6:13
mveDave Kreskowiak14-Apr-05 6:13 
GeneralRe: image button Pin
Lisana14-Apr-05 6:17
Lisana14-Apr-05 6:17 
GeneralRe: image button Pin
Dave Kreskowiak14-Apr-05 8:17
mveDave Kreskowiak14-Apr-05 8:17 
GeneralRe: image button Pin
Lisana14-Apr-05 9:16
Lisana14-Apr-05 9:16 
GeneralRe: image button Pin
rwestgraham14-Apr-05 10:07
rwestgraham14-Apr-05 10:07 
If there is some compelling reason whay you absolutely have to add the buttons at run-time - like the numebr of buttons changes depending on the number of contacts, then load them all one time when the form is initialized. After you create each button, also add it to a local collection.

Then when a person clicks on a button, enumerate the local collection, set each button's state to unchecked, then continue to process the click event to perform the query and reset the newly checked contact.

This will be much faster than trying to constantly add and remove buttons and their event handlers from the form. You also do not need to keep track of the current state of any given button, because you simply reset them all to unchecked whenever one is clicked.

Unless you have a lot of buttons, simply enumerating the list will be about as fast, and much simpler than writing code to keep track of the the button state.

Robert
GeneralRe: image button Pin
Lisana14-Apr-05 10:41
Lisana14-Apr-05 10:41 
GeneralRe: image button Pin
Dave Kreskowiak15-Apr-05 3:33
mveDave Kreskowiak15-Apr-05 3:33 
GeneralRe: image button Pin
Lisana15-Apr-05 3:42
Lisana15-Apr-05 3:42 
GeneralRe: image button Pin
Lisana14-Apr-05 6:19
Lisana14-Apr-05 6:19 
GeneralRe: image button Pin
rwestgraham14-Apr-05 9:47
rwestgraham14-Apr-05 9:47 
GeneralUsing Wavelet in VB Pin
Anonymous14-Apr-05 2:25
Anonymous14-Apr-05 2:25 
GeneralRe: Using Wavelet in VB Pin
Dave Kreskowiak14-Apr-05 3:49
mveDave Kreskowiak14-Apr-05 3:49 
GeneralHighlighting Datagrid specific items Pin
bibipopopopo14-Apr-05 1:26
bibipopopopo14-Apr-05 1:26 
GeneralRe: Highlighting Datagrid specific items Pin
Dave Kreskowiak14-Apr-05 3:45
mveDave Kreskowiak14-Apr-05 3:45 
GeneralMS chart control Pin
Mr Dabbah13-Apr-05 22:57
Mr Dabbah13-Apr-05 22:57 
GeneralMS Office document preview in windows form. Pin
satano66613-Apr-05 20:39
satano66613-Apr-05 20:39 
Questionhow to do this in windows service Pin
MagicGirL8313-Apr-05 14:52
MagicGirL8313-Apr-05 14:52 
Generalmailing + smtp Pin
_tasleem13-Apr-05 12:43
_tasleem13-Apr-05 12:43 
GeneralVB.NET Display Month in Text Not Number Format Pin
Anonymous13-Apr-05 11:24
Anonymous13-Apr-05 11:24 
GeneralRe: VB.NET Display Month in Text Not Number Format Pin
dpagka14-Apr-05 5:20
dpagka14-Apr-05 5:20 
GeneralWindows.Forms.DataGrid and NumericUpDown and/or DateTimePicker controls Pin
dprima13-Apr-05 10:31
dprima13-Apr-05 10:31 
QuestionWhat's the best way to do? Pin
Lisana13-Apr-05 9:42
Lisana13-Apr-05 9:42 

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.