How To Question On Listbox Outputs And Arrays
Jul 11, 2009
I a program that you can store stocks in,such information as name of the stock, price of the stock when you purchased it and so forth.This is stored in a file that is read and can be changed.My button that displays the information is giving me some problems as I have it setup and it will read my original file but when I add files its not going to display the new files.I need a way to make it output to my list box the new files as well as the old ones.right now my listbox outputs 5 lines, and each line has 5 records now the amount of records per line will not change but the number of lines I have will.I cannot pre write lines for something that has not happened, and I am stumped on how to fix this problem..
I am still learning and new to code so for me to write code that writes other code seems like some fantasy out of the terminator so I am sure there are much much simpler ways to do this than that.I am guessing using a loop and a variable in my array than the actual number something a long the lines of csvData(i)However I am just not seeing what syntax to use and how I would go about putting this together... Never came across anythign like this in the past.[code]any thoughts for ways to attack this problem and the type of syntax that would have to be used?
View 1 Replies
ADVERTISEMENT
Jan 3, 2010
I am making a project (Waiting List) where I am using arraylist(2) therefor I am entering 3 pieces of information.The information in the arraylist is then sent to a listbox
[Code]...
View 4 Replies
Jun 5, 2009
I have an app that the user picks items from a checkbox list. I have the items selected saved to a seperate db table. I want to be able to have the selected items repopulate as selected if the user reopens the web page.What I've tried:I've pulled the items selected previously back to a hidden list box which works but I can't figure out how to compare what is in that list box with all the items contained in the checkbox list (this is being populated by another seperate table in the db)I've tried just a straight query and used reader but keep getting errors about cast and if I switch it to a GetDecimal, when I try to see what it's pulling, it's not the data but maybe the index: See below:Does anyone out there have a sample of can help me figure out how to just have this stupid checkbox list reselect the items that the user previously selected and saved to the db?
[code]...
View 1 Replies
Oct 12, 2011
I have a form that has 1 listbox and multiple textboxes. I need to write an array code to beable to select on an item in the listbox and then display different data into the multiple textboxes due to what is specifically chosen in the listbox. Im having a lot of trouble figuring this out.
View 5 Replies
Sep 7, 2010
I have a very strange thing going on...I got a lot the CheckErrorStatus (Int32) error...and so I started to dig into my created functions. At the end I found what gave that error and so I added a new breakpoint on both computers where I want to run it (one is the developping computer, the other is the clients computer).
Developping computer : Windows 7, VS2008, .NET Framework 3.5SP1
Clients computer: Windows XP SP3, VS2008, .NET Framework 3.5SP1
the code of the function is a follows:
[Code]...
how it can that with the same input this function gives 2 differents (of which one is fault) output?
View 10 Replies
Jul 24, 2010
About the following code:
Dim vDeletedMessageSubject As String = oMessage.subject
oMessage.Delete()
System.Diagnostics.Debug.WriteLine("Message with subject: {0} deleted.",
[CODE]...
Why the different outputs?
dp.SyntaxHighlighter.ClipboardSwf = '/dp.SyntaxHighlighter/Scripts/clipboard.swf'
dp.SyntaxHighlighter.HighlightAll('3ab83152232341d6a1b8a6f4a3419500')
View 3 Replies
Feb 20, 2012
Could someone write me a Class structure for passing the data array below.
Function function1(Byval input1 as Double, Byval input2 as Double, Byval input3 as Double)
'code'
data.data1=value1
[code].....
View 4 Replies
Oct 7, 2008
I've got a little code that just reads and displays all the folders in a particular directory. What I want to happen though is for the program to pause 1 second after adding a new folder to the listbox. When I have Sleep(1000) it simply freezes completely.
Code:
Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
[code].....
View 4 Replies
Dec 8, 2010
Is it possible to create a VB function with multiple outputs. Note: I am not looking for an array containing me three outputs or a variable using delimitters
View 3 Replies
Sep 12, 2010
I started programming 6 months ago, Visual Basic is kind of easy and I made lots of programs. Now I am confused now. I have a serious problems about DLL's but I didn't made them but I knew how to make use of them. Okay I have 2 programs and one was having a problem and other one has no problem, they have the same framework, same code, but they have problems.url...
View 12 Replies
Aug 2, 2010
i recently discovered a nice feature called overloading, now the question is can i also do that for outputs? for example i want to call a function that would automatically return the datatype i assign the function toright now im geting an error saying "blabla and blabla cant overload eachother because they only differ by return types
View 3 Replies
May 12, 2010
I'm doing a school project with arrays and I want it so that I input a part number and it outputs a image, price, and name for the part. I need to accomplish this using the array. We've only ever done arrays where you input a part number and one thing comes back out, not multiple.
View 1 Replies
May 1, 2009
[Code]...
Loop 'Bottom of Main Program Loop 'Close the files when you are done with them
readerInputFileA.Close()
readerInputFileB.Close()
writerOutputFile.Close()
Else 'Path/file for one or both input files does not exist - message
[Code]...
View 1 Replies
Feb 20, 2009
I would like to build inputs and outputs interface board (if you have schematics for the hardware or where I could purchase such thing) I need 9 inputs and 8 outputs, 24 volte DC for the inputs and I want to build a form in visual basic that utilizes the serial port so for example when I press Button1_Click it will make output number 1 goes high in the board and when input 9 goes high in the board label9 or Button3 will change color in the form.
So basically the IO interface and the form will only be used to energize relays and monitor these relays. I am not worrying at this moment about if this input is high make this output high but if this is possible in visual basic currently running Visual Studio 2008 Express.
View 7 Replies
Jan 30, 2012
I have created a service that updates dictionaries and outputs an xml file of the contents. It will do it fine first time round, but then I get the following exception when it tries to do it the second time
system.argumentexception an item with the same key has already been added
Is there anyway I can set it so that the dictionary contents are overwritten each time?
View 1 Replies
Dec 1, 2010
I've made some good progress with my first attempt at a program, but have hit another road block. I'm taking standard output (as a string) froma console CMD window (results of dsquery piped to dsget) and have found small rectangles in the output. I tried using Regex to clean the little bastards but it seems they are related to the _ (underscore), which I need to keep (to return 2000/NT logins). Odd thing is - when I copy the caharcter and paste it into VS2K10 Express it acts like a carrige return?Going to try using /U or /A CMD switch next..
View 2 Replies
Oct 18, 2010
i'v started learning visual basic on a software development college course and i have to make a program which outputs a price of something into currency only when i click on my calculate button it only comes out as a whole number so instead of �1.00 it just says 1, this is my output code.
qty = txtQty.Text
money = 100
If lstItems.SelectedIndex = (0) Then
[Code]......
View 3 Replies
May 9, 2010
In VB6 I load a recordset containg all of the records (6 fields per record)in a table into an XArray and then manipulate the records in the array and then write them back to the original table. The array issorted by the first field (1 to maybe 8000 or more) I need to find records in the array by an ID field and then move them (because of some external criteria that happens many times) from say number 400 to number 375. Then all of the other records between 375 and 399 were renumbered up 1 to fill the gaps left by the move.
The XArray worked well as it could find and also move to a next record easily to facilitate the revisions to each record quickly. Everything is done in VB6 in code and nothing visual needs to be shown to the user until say 2000 of these external changes are complete. What is the best, most efficient way to do this in the .Net framework in VB2010. Datasets, Dataviews. tableadapters, arrays. enums ?
View 3 Replies
Oct 15, 2010
I will be using .Net to communicate with a small unit that outputs data via a serial port. I have used an application that monitors the data between an application and this little box. What I see is functions such as IRP_MJ_CREATE, IRP_MJ_READ, etc. At first I thought I needed to build functions and I would send these via the serial port (a novice thought) now I see that the above functions are part of the Windows Driver Kit. So is it true that I call these functions in my code and then the underlying drivers communicate to the serial port and the approppriate data is seen at the serial port. So for .Net (VB) I need to find and use the appropriate functions and communicate to the serial port.
View 1 Replies
Mar 12, 2010
I am attempting to create an app that receives text input on a form and outputs to printer but I haven't any idea where to start for the coding. the form was relatively easy, now how to code. I have labels that give questions and 16 text boxes 5 list boxes and 10 check boxes to receive input from users how can I arrange the input into a paragraph and output to printer?
View 5 Replies
Dec 10, 2009
My assignment is to have a user enter in big integers using what i think is two parallel arrays. I got this far but now im stuck. I think i need to actually convert the text box input into an array but i do not know how to do that. I am all over the place in this project.
'Created/ Revised by: Jessica Falcetta
'Cap 204 Final Project: Big Integer Project
'Project Purpose: To calculate large integers through parallel arrays
[CODE]...
View 5 Replies
Feb 2, 2010
I have a VB.net console app and I am opening a function in a dll written in fortran. I am passing 3 arrays through the function by reference. When they come back out the otherside they ahve all tunred to arrays of only one element And that element is 0.I read on the internet somewhere that when doing this kind of thing it is a good idea to only pass the first element of the array into the function.I tried changing my function declaration to accepting single elements rather than single dimensional arrays, and now the arrays are the same length before and after the function call, but they don't seem to be changing at all, so i'm not sure that this is working
View 1 Replies
Oct 30, 2010
the statement Dim state(49) As String and maintain a list of certain states. The list of states should always be in alphabetical order and occupy consecutive elements of the array. The buttons in the program should give the user the following options: (a) Take the state specified by the user in a text box and insert it into its proper position in the array. If the state is already in the array, so report. (b) Take the state specified by the user in a text box and delete it from the array. If the state is not in the array, so report. (c) Display the states in the array. "
Private Sub states_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
state(0) = "Alabama"
[code]....
View 1 Replies
Feb 12, 2011
I'm trying to do is make a program to where when you click an option, a text outputs for each button clicked, the general design looks like this:
That's just a beginning, since the whole rest of the thing will be the same concept pretty much, and what I want to have it do is, like stated earlier, once the option is chosen, a text output, like this:
I know there is an alternative to solving that, but it will take me 10x more time, and that is, creating a new textbox, setting the visibility to False, and typing what I want outputted in that text box, then putting: RichTextBox1 = TextBox1.Text
I know that works, and gives me my output, but I just wanted to know if there was any other way but that.
View 2 Replies
May 3, 2010
I was wondering if anyone knows a built in method ( LINQ say or a LAMBDA expression or other way ) that you can compare2 arrays - collections that would be valid for an equivalent 3rd array - collection which is a combination of the 1st two.
As an example consider;
* * *
A L E
[code].....
View 17 Replies
Oct 13, 2009
How can I sort three arrays so they are sorted together (the other two arrays are in sync with the first)?unsorted unsorted unsortedarray1]CODE]....
View 9 Replies
Jul 21, 2011
I'm creating an application that will have 3 streams of audio. I can get 2 streams playing easy enough using DirectX AudioVideoPlayback and setting the balance for each Audio Instance. However, I need a 3rd Audio instance to play out of another output such as the Rear or Centre. An alternative would be to be able to select a different sound device in the machine to play the 3rd audio stream.
[Code]...
View 1 Replies
Jul 21, 2011
I'm creating an application that will have 3 streams of audio.I can get 2 streams playing easy enough using DirectX AudioVideoPlayback and setting the balance for each Audio Instance.However, I need a 3rd Audio instance to play out of another output such as the Rear or Centre.An alternative would be to be able to select a different sound device in the machine to play the 3rd audio stream.I've been searching the net for 2 days now trying to find a solution, but have so far been unsuccessful. I've tried a few alternative libs such as DirectShow.Net, DirectSound, BASS.Net, QuickTime and OpenTK.Some of them do what I need to do, but they are either too difficult to use and therefore impractical or they are missing some other essential features such as Events which are required to make the rest of the application work. Would anyone oppose to me posting this same thread on other forums?I will of course post a solution if one is found elsewhere without advertising external websites.
View 4 Replies
Nov 19, 2009
If I set a ListBox.Height = ListBox.PreferredHeight when the control is hidden and IntegralHeight = True, then set it visible:
a) Actual Height reduces by typically 3-5 pixels after redraw (but not 1 pixel per item).
b) PreferredHeight does not not appear to give the correct integral of item heights.
Is there a way to make ListBox calculate the correct integral Height before the ListBox is made visible, so it can be correctly pre-positioned from bottom edge?
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
ListBox1.Visible = False
ListBox1.IntegralHeight = True
[CODE]...
View 4 Replies
Feb 17, 2011
This code bellow to compile a single listBox on form1 to listBox on form2 then listBox on form3.
I want to modified this code to compile 169 of ListBoxs on form1 to 169 listboxs on form2
and 169 listBoxs on form3.Try this code,not need the new coding.
Original code from JoOl and modified by John Anthony oliver
[Code]...
View 1 Replies