Click here to Skip to main content
15,903,012 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: DatagridView row selection Pin
Widgets2-Sep-07 14:52
Widgets2-Sep-07 14:52 
Questionplease help me with combobox keycode Pin
bapu28892-Sep-07 2:16
bapu28892-Sep-07 2:16 
AnswerRe: please help me with combobox keycode Pin
Lucky Sheikh6-Sep-07 20:40
Lucky Sheikh6-Sep-07 20:40 
QuestionReplace multiple space with Single space in RichTextBox Pin
Rupesh Kumar Swami2-Sep-07 2:11
Rupesh Kumar Swami2-Sep-07 2:11 
AnswerReplace multiple space with Single space in RichTextBox Pin
Chatura Dilan2-Sep-07 3:24
Chatura Dilan2-Sep-07 3:24 
AnswerRe: Replace multiple space with Single space in RichTextBox Pin
Luc Pattyn2-Sep-07 4:04
sitebuilderLuc Pattyn2-Sep-07 4:04 
Questioncombobox questions Pin
xebe2-Sep-07 0:11
xebe2-Sep-07 0:11 
AnswerRe: combobox questions Pin
Rupesh Kumar Swami2-Sep-07 0:45
Rupesh Kumar Swami2-Sep-07 0:45 
hi xebe'
First: I want the value of the selected item in a combobox / listbox, how do I that. It is not with me.combobox.valuemember, but what is the correct code of it?


use following statement
dim str as string<br />
dim id as string<br />
str=combobox1.selectedItem<br />
id=combobox1.selectedValue


Next: If I save all the values of the fields on a form, then I clean all the fields with: me.textbox.text = "", but how does I do that with a combobox / listbox?


use for Each loop for clean all textbox,ComboBox,ListBox
Dim a As New System.Windows.Forms.Control<br />
For Each a In me.Controls<br />
      If TypeOf a Is TextBox Then<br />
        a.Text=""<br />
      elseif TypeOf a Is ComboBox then<br />
a.selectedIndex=-1<br />
elseif TypeOf a Is ListBox then<br />
a.selectedIndex=-1<br />
<br />
      End If<br />
            Next


Hope this helps




Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)

My Company

GeneralRe: combobox questions Pin
xebe2-Sep-07 4:02
xebe2-Sep-07 4:02 
GeneralRe: combobox questions Pin
Rupesh Kumar Swami2-Sep-07 19:19
Rupesh Kumar Swami2-Sep-07 19:19 
AnswerRe: combobox questions Pin
Widgets2-Sep-07 14:58
Widgets2-Sep-07 14:58 
AnswerRe: combobox questions Pin
arjunjagtap2-Sep-07 19:39
arjunjagtap2-Sep-07 19:39 
Questioncombobox problem Pin
SamRST1-Sep-07 22:49
SamRST1-Sep-07 22:49 
AnswerRe: combobox problem Pin
Vasudevan Deepak Kumar1-Sep-07 23:09
Vasudevan Deepak Kumar1-Sep-07 23:09 
Questionpls help! Pin
Rharzkie1-Sep-07 20:51
Rharzkie1-Sep-07 20:51 
GeneralRe: pls help! Pin
Guffa1-Sep-07 22:04
Guffa1-Sep-07 22:04 
Questionxml &amp;amp; Vb.net Pin
MrScruff6661-Sep-07 13:03
MrScruff6661-Sep-07 13:03 
AnswerRe: xml &amp;amp; Vb.net Pin
Christian Graus1-Sep-07 13:20
protectorChristian Graus1-Sep-07 13:20 
QuestionConnection string for an access database Pin
Mr Oizo1-Sep-07 8:46
Mr Oizo1-Sep-07 8:46 
AnswerRe: Connection string for an access database Pin
jensenx1-Sep-07 20:08
jensenx1-Sep-07 20:08 
AnswerRe: Connection string for an access database Pin
Vasudevan Deepak Kumar1-Sep-07 23:08
Vasudevan Deepak Kumar1-Sep-07 23:08 
GeneralRe: Connection string for an access database Pin
Mr Oizo2-Sep-07 0:01
Mr Oizo2-Sep-07 0:01 
Questionplz help me in login form in vb.net Pin
asifullahkhan1-Sep-07 7:52
asifullahkhan1-Sep-07 7:52 
AnswerRe: plz help me in login form in vb.net Pin
Christian Graus1-Sep-07 13:56
protectorChristian Graus1-Sep-07 13:56 
GeneralRe: plz help me in login form in vb.net Pin
Vasudevan Deepak Kumar1-Sep-07 23:11
Vasudevan Deepak Kumar1-Sep-07 23: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.