Add Item List As One Of Choices?

Sep 10, 2010

I have visual basic 2008 express. i am learning through videos at LearnVisualStudio.Net and the next step is to add item which is the sql database. i don't have this as one of my choices? am i suppose to have it with express? if not, can i get it somehow and add it to my Add Item list as one of my choices? I have the local and the server database but the video i'm following has an SQL database. Again i am just learning so be easy on me.

View 7 Replies


ADVERTISEMENT

Forms :: Users To Enter Their Own Choices In And Then Their Choices Are Displayed Into The Gridview?

Apr 28, 2010

wondering if someone can help me some small issues I am having with building my first project.

1.I have comboboxes that allow users to enter their own choices in and then their choices are displayed into the gridview.

the problem I am having is this is allowing me to duplicate choices. for example:when I run debug to try my boxes, I can type in Johnathan into the combobox as many times as I want to and it adds is to the combobox list..so now I got 10 johnathans in my combo box.and then to make things worse, when I hit the button I made to send choices to display..it causes duplicated choices to show up in the display.What I figure is that it is easier for me to just prevent duplicates in combobox.

2.Lets say on one of 10 comboboxes I got...lets say someone skips the box and doesnt make a choice...my grid will then display the last choice made.. (man o man)for example:John chose in his boxes and is displayed on gridview: Combobox1 (john) Combo2 (5:00 PM) combo3 (waiting)now lets say I come up to the computer and in Combobox1(Dcurvez) Combo2( i skipped and didnt enter a choice) and Combobox3(In Progess)

The display will put Dcurvez....5:00 PM.....In Progress because I didnt make a choice in the time combobox..it put in the last choice (Johns) as 5:00 PM Can someone in very simple terms tell me how to fix this problem?? I am using visual studio 2008 and vb/vb.net as language this is not a webpage, btw. it is for in shop computer just.

View 6 Replies

Add Choices To The First Two List Boxes?

Dec 14, 2009

I'm new to visual basic and I've put all forths of effort towards this program and I can't get it to work. I know one reason is I don't know how to add my choices to the first two list boxes.

Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim RegistrationFee As Integer
Dim LodgingFee As Integer
Dim Days As Integer

[Code]...

View 27 Replies

Output Data From A List Box With The Possibility Of Multiple Choices Selected(frmPrint)?

Oct 11, 2009

I am attempting to output data from a list box with the possibility of multiple choices selected(frmPrint) and output the data froma another list box frmMain. The code posted does nothing. I can get this form to output everuthing but multiple items selected by the user. I am a student and I have been working on this problem for a long time with no luck.

Private Sub btnAddBooks_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAddBooks.Click
Dim intCount As Integer = 0 ' Counter
Dim mainForm As New frmMain ' Form instance
Dim strInput As String ' Input

[code]....

View 2 Replies

Possible To Make List Box Item Height For Item Depending On Amount Of Lines That Item Contains?

Jan 1, 2012

I have a list box on the form which functions as a copy/paste. When you copy something, it is automatically added to the list box as a "clipboard helper". Here is the problem,however: if the text is more than 1 line, the list box does not show all the text.It ends up looking messy.So getting back to my question, is it possible to make the list box item height for an item depending on the amount of lines that item contains?This is a one line sentence in the list box and should take up one line.This is a multi line sentence in the list box and should take up two lines for item height.

View 11 Replies

Combobox.items.add - Combobox To Have A List Of Choices From A Table In A Db

Jun 14, 2011

[Code]...

I'm making a combobox on a form. I want the combobox to have a list of choices from a table in a db. The two columns are a String and a Date. I want the date column to only show the year. I'm hoping I have the code right as it is above, but I'm not positive I've done the whole date thing right.

View 6 Replies

Get Selected Item Index Or A Sorted & Grouped List Relative To Item Source?

Feb 12, 2011

I'm having some difficulty with a sorted & grouped listbox in WPF vb.net 3.5 that has an items source bound to an ObservableCollection.

What I want to be able to do is to retrieve a piece of data from the ObservableCollection items source depending on what item in the listbox the user has selected.I've almost got it working but because the listbox is sorted it does not match the index of the items source.

[code]...

As I previously mentioned, because the lstBox is sorted and also grouped the index's don't match up.Does anyone know how I can get the correct information I want from the List Source depending on the selected item in the list box?

View 3 Replies

Select An Item From A List Box And Click A Button And Have That Item Go Into Another Listbox With It's Price

Oct 13, 2011

How someone would select an item from a list box and click a button and have that item go into another listbox with it's price? I seem to be stuck on this part.

Here's my code:

I want to select the first option from the first listbox and I want to put it into another listbox along with the price of that item on the same line in the listbox. I can't seem to figure out how to that.

Public Class Form1
Const dcmPRICE_STRESS As Decimal = CDec(595.0)
Const dcmPRICE_TIME_MANAGMENT As Decimal = 695

[CODE]...

View 12 Replies

Add To A Combobox A List Of Item (not Every Item) In A Txt Located On A Server

Feb 13, 2011

my program downloads into a combobox every item(line) that is in a text file located on a server.
Every line in the text file ends with "a)" or with "g)".

Now I just want to make 3 radio buttons:

- one that will allow the download in the combobox only the item ending with "g)"
- one that will allow the download in the combobox only the item ending with "a)"
- one that will allow the download in the combobox of both (I already know how to do).

How can I do so?

To download the entire list in the combobox I do:

Dim List As String = client.DownloadString("http://mywebsite.com/mytextfile.txt)Dim lines As String() = List.Split(New String() {ControlChars.CrLf}, StringSplitOptions.RemoveEmptyEntries)ComboBox1.Items.Clear()
ComboBox1.Items.AddRange(lines)

View 13 Replies

Delete Item From List Box Select Next Available Item?

May 14, 2012

how whould I go about deleteing an item from a listbox and it will select the next available item.you know like the treeview control selects the next node if you delete one.

View 2 Replies

Get Type Of Derived Generic List Class From List Item Method?

Mar 23, 2011

Public Class notifierMain
Public Class Contacts
Inherits List(Of row)
Public Sub New()

[code]....

When I debug this winforms application I get curType = "notifier.notifierMain+Contacts+row" I want to the Validate function to know it is in MyContacts. How do I do this?

View 3 Replies

Drop Down List Box (stop Selecting Item From List)

Jun 18, 2009

i want to stop accepting form drop down listbox if certrain criteria is not met [code]how i can cancel the selection of drop down list?

View 3 Replies

VS 2008 Search Item A (from A List Of X Items) In List B?

May 5, 2010

i want to search item A (from a list of X items) in list B but i want to get the item not found example Search ITEM A in LIST B if not found then return a print....if found continue with ITEM B..and so on.

View 5 Replies

.net - List.Contains Based On A Property Of A List Item?

Jan 11, 2011

I have a List myList of MyObjects. Is it possible to check if myList contains a particular myObject based on a property of myObject in VB.NET? In C#, you'd something similar to this right:

myList.Exists(myObject => myObject.property1 == 3)

View 2 Replies

Comparing An Item In A List Against Other Items In The Same List In .NET?

May 30, 2011

I have a List(Of MyObj), and I want to iterate through that list and compare each element to all other elements in the same list, excluding (if possible) the same element. I have a solution that works, but it's slow and uses double For loops. It may possibly have also summoned Cthulhu from his sleep. This below is a sanitized version of what I have:

Dim MyList As New List(Of MyObj)({Obj1, Obj2, Obj3, Obj4, Obj5, Obj6})
If MyList.Count > 0 Then
For i = 0 To (MyList.Count - 1) Step 1

[code]....

View 3 Replies

How To Test 1st List Box If It Has Items More Than Other List Box But By One Item

Nov 15, 2011

I want to know how to test the 1st list box if it has items more than the other list box but by one item, here is what i have: If lstInvisibleTv. Items.Count > lstInvisiblePc.Items.Count Then it works good if the lstInvisibleTv list box is greater than the other list box by one but it also works if it is greater the other one by one or more which I do not want. I want it to work just by one.

View 3 Replies

Program That Will Compare Array Of Grocery List Items Glist And Array Of Coupon Item List

May 27, 2012

I have a program that will compare an array of grocery list items glist and an array of coupon item clist.When I compare the two and if there is a match somewhere in the array I want to have a picturebox visible.When there is no match, I want the picture box not to be visible. [code] The code seems to work great until I come to the else statement.When the code finds a match it displays the picture box and the msgbox without error, but as soon as the message box is cleared, even though i've input it as an ELSE statement, the picturebox goes false again.Does anyone have any idea of how I can "hold" the picturebox to stay visible while the match between the arrays exists?

View 18 Replies

Filter The Choices In The Second Combobox?

Dec 31, 2008

I have 2 comboboxes, textbox and a cmdbutton. When the user makes a selection in one combobox I want it to filter the choices in the second combobox. Then when the user clicks the button it passes the values from the comboboxes to a stored procedure and populates a datagridview. I am using VB.net 2005 and sql server 2005.

View 1 Replies

Get The Number From Choices In A Combobox?

Apr 9, 2011

I have a combox with a bunch of choices already populated.

View 3 Replies

Keeping Track Of Choices?

May 24, 2011

I have two combo boxes, and four buttons. When the user clicks "Add" on the first combo box, it adds a new item to the combo box with "New" and then lets the user rename that item to something else. That "new" item has to have an array of "answers" that go along with that item in the list. What I'm having trouble figuring out is assigning "answers" to the second combobox for each item in the first combobox and changing the second combobox when selecting an item in the first combobox.

EXAMPLE:

Item 1 - Combobox1
- Item 1 - Combobox2
- Item 2 - Combobox2

[code]....

View 5 Replies

Reciept Printing - Form Which Consist - Item Code , Item Name , Item Price , Quantity Of Item

May 25, 2012

Regarding my college project. i'm working on a sales system . i have a form which consist of all the following information( item code , item name , item price , quantity of item ) which is display using a data grid . data input by user using text box and all this information will be stored in a database(sales database) i'm using ms access 2007. the grand total will be displayed in a text box . and amount paid will be input in a text box too , my major problem now is how to i create a reciept that will have all this information of the purcase. i have a reciept button . what the next step ? i dont have any idea how to get the reciept done.

Imports System.Data.OleDb

Public Class Form5
Dim con As New OleDbConnection

[CODE].......................

View 9 Replies

C# - Language Choices When Porting A Classic Asp App To .NET

Sep 7, 2010

We are looking to port our existing classic ASP application to .NET, but we're unsure of what language to use for the new app. I personally would 'prefer' C#, as I'm more familiar and comfortable with that languages way of doing things, but, the original code is VBScript, so it would possibly be easier to port to VB.NET ... One possible situation I fear would be that, because the code is so similar between the two variants of VB, that we might end up getting stuck on something that is not similar between the two, even though it looks like it would work. A shift to a wholly different language might avoid that kind of situation. Does anyone have any practical examples of this kind of situation? Insights to illuminate the issue with? Do the potential benefits of a complete paradigm shift outweigh the gains from a high degree of 'copy-and-paste-ability' ?

View 9 Replies

Display A Random Messagebox Out Of Nine Choices?

Apr 4, 2009

i'm trying to display a random messagebox that displays a message associated with a character. the character image displays and the user clicks a button to guess the character if it is correct, one of three messages should randomly appear that is associated with that character (there are 4 characters, so there are 12 possible messages total. 3 for each character) but as it stands now, the picture box on the form displays the character name so the user doesn't have to guess which button to push. i need to remove the name from beneath the picture so only the buttons have the name and the user is forced to guess and i don't have the messages randomly popping up. only a messabebox that says correct i added a message box in the code but i can't figure out how to randomly get the messages associated with the characters to appear?

Imports System.IO
Public Class Form1
Dim currImageIndex As Integer = 0
Dim characterNames As String() = New String() {"Donny", "Jesus", "Lebowski", "Walter"}

[code].....

View 12 Replies

Override The DevExpress Filter Choices In GridControl?

Oct 5, 2011

I am currently programming in Visual Studio 2010 within VB.NET and am using DevExpress v10.2, specifically WinForms. In the DevExpress GridControl at runtime you can click on the right side of the column header and choose which values in the column you want to show. For example if your table contained:

Name1 Checked
Name2 Unchecked
Name3 Unchecked
Name4 Checked

Then if you click on the right side of the checkbox's header you can choose checked (or unchecked) and it would display only the data that is checked (or unchecked). In this case with checked you would have:

Name1 Checked
Name4 Checked

I was wondering if there was some way to override the names so instead of letting me choose checked or unchecked I could override it with 'owned' and 'rented' or 'active' and 'inactive' based on what the checkbox represents in that specific column.

View 1 Replies

Disable Appearance Choices From Designer View

Dec 14, 2011

I'm building a game using the traditional form view on VS2010 and I'm trying to change the colour of a label's text depending on its contents. I believe I've coded that fine, but the problem is that the settings for the label in the designer view pane are overriding my code!Is there a way to disable certain options in the designer view so that my code can work?

View 2 Replies

Login To The Website - Fill The Choices And Then Navigate Further?

Sep 15, 2010

I've been trying to write a vb program to help me login to a website! I've managed it with HtmlCollection, but the problem is that on the next page there are a few choices that need checking and it goes kind of crazy. Is there any way to login to the website, fill the choices and then navigate further?

View 1 Replies

Radiobutton To Select Multiple Choices From Listbox?

Jan 25, 2011

Can't seem to find code for radiobutton to hilight multiple choices from listbox, e.g.

If radiobutton1.clicked = true then
listbox1.selecteditems = "apple" "cherry" "pear
if radiobutton2.clicked = true
listbox1selecteditems = "apple" "cherry" etc....

View 3 Replies

Saving Users RadioButton Choices Into A File?

Feb 17, 2009

how to save the users radio buttons choices to load into a file. I have a button which controls the If statements to determine the price of the configuration. I was wanting to save these choices that the user made. I thought I could do this by altering the If statements but I don't know if thats the right way. I've got 3 different groupboxes with 3 options in each.

Heres a part of the code for the IF statements:

Private Sub UpdateConfig_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles UpdateConfig.Click
If Choice1Option1.Checked = True And Choice2Option1.Checked = True And Choice3Option1.Checked = True Then
PriceShow.Text = Prices(0, 1)
TextBoxProcessor.Text = Choice1Option1.Text

[code]....

View 2 Replies

VB 2010 - Creating A Simple Db - Overwhelmed With Choices

Aug 1, 2011

What is the simplest and most straightforward way to: Create a local dB with a table with 2 fields (a string, a number) Determine is string s is present in the dB Add a record into the table consisting of a string and number Delete a record based on the string Get the record for a particular string Get the record with the highest number

View 3 Replies

Add Item When Using List (Of)?

Jan 5, 2012

I created a class where i declared some properties.[code]...

This gives me an error about Index was out of range. Hpw can I properly access the properties in BlogPost class?

View 2 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved