Click here to Skip to main content
15,890,897 members
Home / Discussions / C#
   

C#

 
GeneralRe: how to call c#.net dll in vb 6.0 Pin
Justin Perez20-Aug-07 8:11
Justin Perez20-Aug-07 8:11 
AnswerRe: how to call c#.net dll in vb 6.0 Pin
Christian Graus20-Aug-07 11:01
protectorChristian Graus20-Aug-07 11:01 
GeneralRe: how to call c#.net dll in vb 6.0 Pin
hk7792120-Aug-07 20:01
hk7792120-Aug-07 20:01 
QuestionUsing ErrorProvider with an AutoSize panel Pin
Jon Hulatt20-Aug-07 4:27
Jon Hulatt20-Aug-07 4:27 
QuestionLooking for a control Pin
mjmcinto20-Aug-07 3:41
mjmcinto20-Aug-07 3:41 
AnswerRe: Looking for a control Pin
Talal Sultan20-Aug-07 3:45
Talal Sultan20-Aug-07 3:45 
AnswerRe: Looking for a control Pin
Justin Perez20-Aug-07 3:46
Justin Perez20-Aug-07 3:46 
AnswerRe: Looking for a control Pin
Eduard Keilholz20-Aug-07 3:52
Eduard Keilholz20-Aug-07 3:52 
Erhm, I think that selecting kind of thing is a misterious kind of cooperation between controls, events and code! You can even try this at home!!

Right click your projects and choose Add > User Control

Drag two listboxes on the newly create control which you named whatever you want...

Place one listbox in the left, the other one aligns right, make sure to leave some space in between the boxes for some buttons...

name the left listbox lstOptions, the right listbox we name lstSelection...

Now place four buttons aboce eachother between those lists
name the first one btnAddAll
The second one btnAdd
the third one btnRemove
and the last one btnClearSelection

Now create a function which will add a listitem to a listbox

private void AddItem(ListItem Item, ListBox Box)
{
// Your code
}

then doubleclick the btnAddAll and enter the following code :

<br />
foreach (ListItem itm in lstOptions)<br />
{<br />
lstOptions.Items.Remove(itm);<br />
lstSelection.Items.Add(itm);<br />
}<br />


Then add quite similar code behind the other buttons... You've just create your own control!!!




.: I love it when a plan comes together :.
http://www.zonderpunt.nl

QuestionIs it possible to write such a methode? Pin
MarkPhB20-Aug-07 3:26
MarkPhB20-Aug-07 3:26 
AnswerRe: Is it possible to write such a methode? Pin
Luc Pattyn20-Aug-07 3:40
sitebuilderLuc Pattyn20-Aug-07 3:40 
AnswerRe: Is it possible to write such a methode? Pin
Talal Sultan20-Aug-07 3:42
Talal Sultan20-Aug-07 3:42 
AnswerRe: Is it possible to write such a methode? Pin
Scott Dorman20-Aug-07 4:09
professionalScott Dorman20-Aug-07 4:09 
AnswerRe: Is it possible to write such a methode? Pin
Eduard Keilholz20-Aug-07 4:18
Eduard Keilholz20-Aug-07 4:18 
AnswerRe: Is it possible to write such a methode? Pin
Rudolf Jan21-Aug-07 0:52
Rudolf Jan21-Aug-07 0:52 
QuestionListBox reordering.. Pin
Dio2220-Aug-07 3:23
Dio2220-Aug-07 3:23 
AnswerRe: ListBox reordering.. Pin
Luc Pattyn20-Aug-07 3:43
sitebuilderLuc Pattyn20-Aug-07 3:43 
GeneralRe: ListBox reordering.. Pin
Dio2220-Aug-07 4:06
Dio2220-Aug-07 4:06 
QuestionException handling..???? Pin
Ron.S20-Aug-07 2:57
Ron.S20-Aug-07 2:57 
AnswerRe: Exception handling..???? Pin
originSH20-Aug-07 3:00
originSH20-Aug-07 3:00 
GeneralRe: Exception handling..???? Pin
Scott Dorman20-Aug-07 4:14
professionalScott Dorman20-Aug-07 4:14 
GeneralRe: Exception handling..???? Pin
originSH20-Aug-07 4:51
originSH20-Aug-07 4:51 
GeneralRe: Exception handling..???? Pin
Scott Dorman20-Aug-07 5:40
professionalScott Dorman20-Aug-07 5:40 
AnswerRe: Exception handling..???? Pin
Talal Sultan20-Aug-07 3:02
Talal Sultan20-Aug-07 3:02 
AnswerRe: Exception handling..???? Pin
Eduard Keilholz20-Aug-07 3:06
Eduard Keilholz20-Aug-07 3:06 
AnswerRe: Exception handling..???? Pin
Rudolf Jan21-Aug-07 0:55
Rudolf Jan21-Aug-07 0:55 

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.