Add To List Box On Different Form?
Nov 4, 2009I am having a problem getting a series of regex matches to post over to a list box on a different form.[code]...
View 7 RepliesI am having a problem getting a series of regex matches to post over to a list box on a different form.[code]...
View 7 RepliesI need to get a string from an items collection in a list box on one form to a list box on another form in VB 2008. Here is the code (I've tried a couple ways in the code to get the values over).
Public Class frmPrintBooks
Private Sub btnClose_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) _
Handles btnClose.Click
[Code]....
I have a main form with datagridview containing a list of contacts:
VB
Public Class Form1
Private Db As New DataClasses1DataContext
Private Sub Form1_Load
[Code]....
After saving, I get the correct message ("Saved"), and the DataGridView in the first form gets updated in real time.
But... when I take look at the data (or close and reopen the forms) the data in the database (SQL server) have not changed! What happens!
I'm doing an assignment with VS 10 that involves making a program for calculating orders but got stuck in trying to link the "invoice" listbox on the invoice sub form to the one in my main form. The list box on the main form is where the user adds, edits and deletes products. It's working perfectly fine it's array and select codes.The receipt form also has a list box, which should display all the products entered in the main form's listbox. My question is, what is wrong with my code? The text boxes seem to be working fine:
Public Class BillForm
Private Sub BillForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
lstBikesBill.Items.Add(DavidBicycles.lstBikes)[code]....
When I enter some data into the main form's list box and then click on the bill, the other list box shows up as empty.
I am having trouble adding a list box to a form that I have added during run time.[code]...
View 3 RepliesI have the following code which takes input from a text box and then writes everything to a file...
[code]...
now because it's not convenient for me to type one by one the words in the text box...what i thought i could do is to find a way to feed a list of the words and then choose with the arrow keys which word it should be written to the specific file.
Dim FILE_NAME As String = Environment.GetFolderPath(Environment.SpecialFolder.Desktop) & " ext.txt"
Dim i As Integer
[code].....
I have this VB.Net form and I need to know the names of all the controls on it. I would suppose that Microsoft keeps a list of all the controls on any given form I just don't know how to access it.
View 4 RepliesI am creating a text editor in Visual Basic .Net 2005. I want to get the list of filenames dragged into the MDI form. I can't figure out the proper code to do that.
View 2 RepliesI have a form with over 60 items. These are a combination of lables, text boxes and combo boxes.I am using Visual Basic Express 2010.Is there a way to print a list of all the items on the form?I mean the names of the boxes.
View 2 RepliesSo I'm doing an assignment with VS 10 at college that involves making a program for calculating orders but got stuck in trying to link the "invoice" listbox for the receipt to the one on my main form.
Let me illustrate my example:
This is the "main menu" is where the user adds bikes, edits existing ones and deletes if needed.
This is my receipt form, it opens perfectly fine and even shows the totals that are stated in my main form:
However, the listbox in my receipt form doesn't link or take in the information stored in my main form, which in this case, would be all the bikes. Here's my
Public Class BillForm
Private Sub ReceiptForm_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
[Code]....
What is wrong with it? The text boxes link up, but the list box always shows up empty when I try to add some bikes in on the main form.
I am trying to populate a form from a list of values. I am fetching data into a recordset. I have a textbox that displays the date, however, when I try to assign a date value I am getting the error message that I cannot set the textbox value to a textfield. Is there a way to assign the date value to the textbox?
lForm.txtFromDate = dgvRequests.CurrentRow.Cells("leaveStart").Value
Is there a way to print a list of all objects on a form? I have lots of textbox boxs on a form and i would like to print a lit of them.
View 10 RepliesI want have a print procedure and I want to print items from my list box in a form. The code I have doesn't print the items from the list box. Could any ones show me how to do it?
My printing
Private Sub PrintText(ByVal sender As Object, ByVal ev As PrintPageEventArgs)
'Create a headingfont so that the same piece of code doesn't need to be typed in multiple times
[Code].....
I've searched and searched for an answer to my question, but as of yet, have yet to find a solution to what I'm looking for. My background - 6 months out of College (Computer Studies)
Right now I'm working on a program that is going to be used to handle database information (Access 2007). On the main form the user can select 3 pieces of required info from drop down list boxes. Those are required. Then after that they are able to enter a first name and a second name. They then add that name to a list box below. They can add as many names as they want to a list box. Then from there they have the option to either just save the info, or if required (which will more then likely be the main option) print each person in the list their own certificate. I have designed a separate form laid out the way required for the certificate.
The trouble that I'm having at this time is that I am unable to make the printing process show all of the certs that are going to print in a print preview. I have been able to get it to only show one. The form is set to load where hidden = true.
i have this In a txt file
118.97.75.226:8080,
218.14.227.197:3128
118.96.151.110:8080
[Code]...
How do i get this in an array! and then how do i display each line seperately (using a variable e.g 1 would display line 1 and 2 would display line 2) this simple project is going on forever!
One displays a list of contributors for a charity and the amount given in a text box.However iv created another button but i need this to sort the list of names to just display the names and in alphabetical order.
[Code]...
i want to exclude some form fields when processing a postback. I done the following but having some issues:
Dim rtnValues As New StringBuilder
Dim arrJoinValues As String = String.Join("|", _setFormValues.ToArray)
Dim arrSplitValues() = Split(arrJoinValues, "|")
[Code].....
how to add a string item to a text box, returned from another form that has a list box?
I have two forms. on the first form I have a button which calls another form that has a List Box.
When I select the value from the list box and click on the apply button then the value should be
passed to the first form that will also have a text box. The text box should contain the value of
list box.
how can I all the import and declare item into a list and use it on every form?
View 1 RepliesOkay, so I have been developing my own MP3 player recently, and now I thought I would make the player remember what songs were in the playlist when it shut down. It now remembers the playlist file that was used last, but I would still rather make it so that it remembers all the songs without saving the playlist.
I've been using a setting to save the playlist file, but when I try this:
...it doesn't work. The savedSongs is a System.Collections.ListArray. Heres the code at Form_Load I'm using at the moment.
Dim loadSongs As New System.Collections.ArrayList
loadSongs = ExperimentalPlayer.My.Settings.savedSongs
lbl_songname.Text = ""
[Code].....
Should I use some other kind of variable to save the filepaths? Well, the other option is that I use a text file for that, but I'd rather make it like this.
As you can see from the screen shot I have managed to get MDI Parents / Child forms working, and managed there to be a menu option on the Parent form that displays all the Child forms opened at the time. What I was wondering, and as of yet through research haven't discovered, is there a way when the list of windows is created, if a user highlights any child in the list it opens a sub-menu from its name (eg. Rename Window, Center Window, etc).
View 4 RepliesMDI Child Form List / Sub-Menu Options
View 12 RepliesIs it possible to bind a listview on a windows form to a list of?? [code]
View 3 RepliesI have squiz my mind out for this but no luck I have a Windows Form with a list box that gets data from a MS access Database table(table1).The table fields are NAME,SURNAME,AREA.In the list box i see the recors of AREA(for example:NY,Chicago,L,...).I want to do this,when a user selects a item from the listview and click OK Button to open a new form with the selected records(with all the table fields).How can i do this
View 4 RepliesI am trying to program my application in VB.Net so that when a user goes to my 'FTP Out' page, the page straight away loads with a list of the files that are on my FTP site.I know I will have to get a connection going with my FTP site but how do I actually go about getting the list of details to show on my form?
At the moment, all I can think of is calling 'Methods.Ftp.ListDirectoryDetails'
I've got a TCP Listener running on a separate thread. I want to have it log the incoming and outgoing messages in a list on the form instead of in message boxes. I've been reading about multiple threads, and I know there's something extra I need to do because form controls are not thread safe.
Unfortunately I've tried several tutorials on delegates and invoking but it still doesn't seem to insert the log items to the list. I even spent $60 on this Mastering Visual Basic 2010 book to "Build Rich Client and Web Applications with Visual Basic", but there isn't a single chapter on how to handle multiple threads.
My problem with AddNew. It really is somewhat simple, but I can't figure out the solution. I have a form where I show a list of my rows with a given a table. The user can then select a row and press clone, which then will try to make a copy of that row.
Here is a snippet:
Dim rowToCopy As cmaDBDataSet.cmaPropertyRecRow
Dim originalID, newID As Integer
rowToCopy = CType(CType(Me.CmaPropertyRecBindingSource.Current, DataRowView).Row, cmaDBDataSet.cmaPropertyRecRow)
originalID = rowToCopy.id ' id of row to be copied
[CODE]...
.... and continue to copy the rest of the data to the newrow...One of the items in the row is obviously a primary key called id. I can not copy this data since I am creating a new row. My problem is, how do I set that value!? or atleast retrieve the value for the newly added table. I need that value so that I can call another form to actually allow the user to modify this newly cloned data. I tried using EndEdit, UpdateAll, no worky. THen I thought I could assume that the newly added row would go at the end of the table so I used MovedLast then got the currentRow id from there... That worked well until we did some deletes within the table.
I'm building a form with just a combo box in it that contains a list of other forms that I made. I want to program the combo box so that if a user opens it and clicks on "Web Browser", that form with the combo box will close and the web browser that I made will open. Another example is that if a user selects "Media Player" from that combo box, the form with the combo box will close and the media player that I made will open. How would I program the combo box to do this?
View 3 RepliesI am trying to create a list that will add information each time someone submits the form. I keep getting the error:Index was out of range. Must be non-negative and less than the size of the collection. Parameter name: index..I know I am getting the values passed from the Class since I can output it to a message box. But when I try to create the index it crashes every time.[code]
View 1 Replies