VS 2008 A Couple About Listboxes And Comboboxes?
Aug 20, 2009
1) Does this code make text the selected items text? If it doesnt then how would I do that?Dim text As String text = ListBox1.SelectedItem.ToString()
2)How would I make it so that if in combobox.items there is an item with the same text as the listbox selecteditem it is removed? This is what I have and it doesnt work.
If ComboBox3.Items.Item(text) Then
ComboBox3.Items.Remove(text)
End If
View 3 Replies
ADVERTISEMENT
May 29, 2009
I am a sys admin for a company and our programmer left several months ago. a program they wrote is now failing and i am struggling to work out why. the program basically pulls data from a csv file into a readable form, written in visual basic. the application works on a couple of machines but not on a couple of others. i have matched up .Net framework versions, MS Primary Interop Assembly versions, still no joy. As the app works on some pc's i am wondering what other differences could cause this?
The error output is:
see the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box.
Exception Text
CODE:
JIT Debugging
To enable just-in-time (JIT) debugging, the .config file for this application or computer (machine.config) must have the jitDebugging value set in the system.windows.forms section. The application must also be compiled with debugging enabled.
For example:
CODE:
When JIT debugging is enabled, any unhandled exception will be sent to the JIT debugger registered on the computer rather than be handled by this dialog box.
View 8 Replies
May 25, 2009
how do I move couple of folders all into another folder
View 3 Replies
Aug 25, 2009
My application (MDI if that matters) has what appears to be a very quick jump/shift/jerk (lots of descriptions of it) in the first minute that the application is running. I have tried double buffering all the forms...
View 3 Replies
Aug 27, 2009
I would like to make a program that will automate a couple things on a webpage. Here is the things I would like to automate:
[Code]...
View 2 Replies
Apr 24, 2012
this is a subset of a previously posted problem, I have narrowed down my issue and am reposting a question from this thread: [URL] I have apparently confused the compiler by renaming some comboboxes in Visual Basic .net express? (See relevant code below) I think the confusion is in who should handle what, with two routines named with variations of ComboBox1 and one handling the other ( it confuses me just trying to interpret it mentally):
[Code]...
View 5 Replies
Oct 28, 2011
I have a form with 4 comboboxes and a button. The first combobox is enabled, but the rest of the controls are disabled. When the form is opened I fill the first combobox (cbxMethod) with a datatable. When the user selects something in cbxMethod the next combobox (cbxStudy) will be filled and so on. When the last combobox (cbxAnalyte) has a selected value I want to enable the button and give it focus so the user can move forward with the program. I basically want to force the user to move from one combobox to the other, until all are filled.I am currently using the SelectionValueChange event, but this event only fires when the user changes the value with their mouse or hits the Enter key, not when the user hits the Tab key.
Public Class frmCalculatedAnalyte
Private cv_dt As New DataTable
Public Sub New()
[code]....
View 8 Replies
Jul 5, 2011
i have a problem, i have a
[Code]...
But when i want to delete something in the list, it deslect in the other list, so it don't remove there then i get like
[Code]...
View 3 Replies
Sep 2, 2011
so, now my code is: (part of it.)
For Each item1 In ListBox1.Items
Write.WriteLine(" " & item1.ToString)
Next
[code]....
View 4 Replies
Sep 3, 2011
So, i have a saved file like:
|Cola
|Ice Tea
1,00 �
1,20 �
Now i would like everything with a "|" symbol for the sense to get in Listbox1 and everything with nothing in Listbox2.
View 3 Replies
Oct 22, 2010
the question states im looking to remove duplicates from a textbox in the sense that i have two textboxes like this
[Code]...
My goal here is to remove item 1 and 3 from the first listbox if it exists on the 2nd listbox, ive searched for 30 minutes to no avail, found a similar question on how to do it in vb but still didnt give me a idea on how to do it relating to vb.net also this is more then one instance,
[Code]...
View 4 Replies
Jun 20, 2009
i considering implement something similar to this
where I display links between two listboxes, the links must correctly display when the listboxes are:moved resized scrolled
View 4 Replies
Apr 16, 2009
I have three listboxes with vertical scroll bars. I'd like it so that when one is scrolled, so are the others. However, I can't seem to find a "scroll" event. I tried this:
vb.net
Public Scrolling As Boolean
Private Sub ListBox1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles ListBox1.MouseDown
If e.Button = MouseButtons.Left Then
[code]....
It works when you click and drag on the listbox area where the items are, but not when you click on the scroll bar!
View 4 Replies
Mar 18, 2011
vb
Imports System.Net.WebClientImports System.IO Public Class Form1 Dim link As String Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
[code].....
View 2 Replies
Oct 18, 2010
I have a project where the dropdowns for the Form and controls (left side) and the events (right side) aren't available. I can re-boot, open and close the project or solution and still they do not show. They do show for other projects.how to make them come back?
View 3 Replies
Oct 3, 2011
I have problem with a datagridview with combo boxes firing unwanted events handlers.I have a datagridview with 4 columns all data bound. All of these columns have comboboxes. Column 2,3,4 has a custom generated combobox with code with on the 'DataGridView_EditingControlShowing event' and have event handlers (Dropdown,selected Etc). (Data in the custom generated comboboxes needs to be filtered and worked on)
[Code]...
View 2 Replies
Apr 7, 2011
I need to build a SQL statement.
I have 3 ComboBoxes that i need to use for my SELECT statement. This means that if the user selects ONE of them the SQL statement will be different than when he chooses TWO or THREE.
If none is select, then ALL data is displayed.
View 6 Replies
May 11, 2012
I have 3 Combo boxes that have number 1-9 in each, i would like to make it so that if the first one is set to 9 then the and the second it set to 8 then the first 1 is set to 1, i need them to only equal 9 through all the boxes?
View 6 Replies
Nov 17, 2010
I have a program issue I am trying to work on. I have multiple comboboxes(12 total) on a form.I am attempting to update some settings from what ever the user selects from the combo boxes. I am trying to keep the code as small as possible, so I thought about having all the comboboxes have similar names only different by a number being changed at the end. (ex: cbo_1, cbo_2, cbo_3, etc...)And using a For next loop to advance through each combobox and update the settings as the for next loop advances.(This might be a stupid way of doing it, but its the first idea that came to mind.)
[code]...
View 1 Replies
Nov 1, 2009
I need to select all the comboboxes on a form with a for each loop. I have about 19 comboboxes and I need to select each one. I tried to do
for each box as combobox in me.controls
But that gave me an error and i now tried this:
for each box as control in me.controls
if box.name.contains("ComboBox") then
...
end if
next
That selected only the comboboxes but the problem is i need to access some data that is specific to comboboxes (aka the selected item(s), if its blank) but those properties are not present since "box" is a control, not a combo box.
View 1 Replies
Nov 28, 2010
I have a ComboBox with several names within it. The names are sourced from a database. Once the user has selected a name from the ComboBox, he must input the no. of hours from another ComboBox and then he is able save it to a .txt file through a streamwriter.
Here is a little image I just put together:I want the file name of the .txt file to be whatever is selected from the first combobox. So, by using the example shown above, the file would be called bob.txt. Is this possible?There shouldn't be any save file dialog or anything, I want it to be automated and the name of the .txt file to be selected from the ComboBox.
View 2 Replies
Jun 13, 2010
I have a combobox on my main form and it lists geographical locations that the user creates. How do I make the combo-boxes on the sub forms match the one on the main form?
View 1 Replies
Sep 3, 2009
Is there a simple way to make all comboboxes on a form to be readonly upon form load?
Rather than doing:
ComboBox1.ReadOnly = True
Combobox2.ReadOnly = True
And so on...
View 29 Replies
Feb 15, 2011
This post is a continuation of my other post concerning 'List(of) with multiple comboboxes refill problem.'. I threw the list overboard and began anew with a Dataview.
So far I (finally) managed to get 2 comboboxes (will be more, but if it works for 2...) loaded with the same data using different dataviews (DataView1 & DataView2) so I can select a value from each combobox without the other following the selection.
But now I want to filter out the selected value from the other combobox.
This also works.
The only thing is this: If I select in combobox1 the value 3, and select in combobox2 the value 4, combobox1 will change to the value 2.
If I select in combobox1 the value 2, and select in combobox2 the value 1, combobox1 will change to the value 3.
It works also the other way arround. I can't seem to get my hands around the problem..
Does somehow the index of the items in the combobox play's part? I don't use the selectedIndex, so from my point of view it can't be..
The code I use:
(with the item 0 as 'neutral' option)
Public Class Form1
Dim dTable As New DataTable
[Code].....
View 4 Replies
Feb 10, 2011
I'm trying to make a program in which I can import an excel file, read the whole thing and save it in another format. So far so good: can import the file, read it, skip first line or not etc.But.. Now I've been thinking about a sort option.What if the column order of the excel file is in another order than the export file must be in. In stead of opening the excel file and rearrange the columns manually, I would like to sort it in the program. Just for the sake of trying to make it work and gain experience
So, i read the first line which contains the column names and put them in several comboboxes where I can make a selection. No problem here.Now, the selection of combobox1 has to be removed from the other comboboxes and so on, to avoid double selections on one column. That's where my listOld comes in. Everytime a selection is made in a combobox, a sub is called to create the listOld and create the listNew (which contains items you can still choose from).As I make more selections the listOld gains more items and the ListNew grows shorter.But here comes the part where I'm puzzled.In the part "refill the comboboxes" (bottom part) when I disable "cmb2.Items.Clear()" the listOld (previous selected items) contains all selected items correctly.
[Code]...
View 1 Replies
Jan 23, 2009
I'm trying to make a program that'll play the card game "War". I've started to code the dealing process, but it doesn't seem to be working. I currently have 3 comboboxes on the form each with numbers representing different cards, 1 that contains all the cards to be dealt, 1 that contains the user's cards, and 1 that contains the computer's cards. I plan to just draw random numbers from these comboboxes for the dealing. However, nothing happens when I click the tool-strip button that's supposed to deal the cards. [Code]
View 5 Replies
Jan 31, 2009
I want to disallow changes to two comboboxes unless the user first clicks a LOCK symbol on the screen. I pop a Y or N into the tag of the picture box when they click it...I've got this - combobox is called LanguageTo
Private Sub LanguageTo_Enter(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles LanguageTo.Enter
If Me.languageLock.Tag.ToString = "Y" Then
MessageBox.Show("Click LOCK symbol to allow changes to the Language Pair!", "Language is Locked!", MessageBoxButtons.OK, MessageBoxIcon.Exclamation)
[code]....
How do I "cancel" the attempt to change that combobox?I don't want to ENABLE=FALSE the combobox - as I don't want it's image to visually change. I want to allow them to attempt the change and then abort it if they didn't unlock first.
View 2 Replies
Jan 9, 2011
Is it possible to have radio buttion 1 control this code and have radio button 2 control the same code with different sizes? If this can be done it will get me buy until I learn a better way. It is a small envelope app, someday I will add a database to it too hold all my address. Right now I only use a couple different sizes.
View 26 Replies
Mar 25, 2012
i want to random 3 variables...
dim a as integer = 1
dim b as integer = 2
dim c as integer = 3
dim result as integer
result = random ( a , b , c)
How do i write the random stuff in visual basic.and how would i write something that Deletes the a from the random ( ); so im only left with random ( b , c ).
View 1 Replies
Sep 22, 2010
For example I have a form that have 2 Label Boxes both have values inside. lets say that the first Label box value is:
5┌─┐ this button adds value of 1 to the first label box (5)
the second label box value is:
2
┌─┐ this button adds value of 1 to the 2nd label box (2)
in here I have a label box to display Total: 7 so when i click each button, I would like that Total label box calculates Total of Label Box 1+2
View 4 Replies