Add Strings And Keep Their Values After Closing?

Aug 17, 2010

In my program, I require to have an essentially unlimited number of strings that I can keep their values after the program has closed.

View 6 Replies


ADVERTISEMENT

Forms Retaining Values After Closing

Jan 4, 2011

Throughout our program, forms are opened like this[code]...

The problem is that when forms are closed, they seem to not really be closed, only hidden - if I add some text to a textbox and close/reopen the form, the text is still there, rather than the textbox being cleared like normal. This is presumably because the form always uses the same instance.

Is there any easy way to fix this other than going through the entire program and creating a new form instance for every ShowDialog() call (there are hundreds)?

View 4 Replies

Save Listbox Values When Form Is Closing?

May 23, 2012

How Do I Save Listbox Values When Form Is Closing? and how do I load saved listbox values when my form opens again? Listboxes just don't seem to want to save. I suggest trying it out before posting unless you know the answer because simply using property binding in the applications settings doesn't want to work.

View 3 Replies

Compare Values Of Two Different Strings?

Oct 4, 2009

how to compare values of two different strings.

View 2 Replies

Checking For Duplicate Values In Strings?

Aug 5, 2009

am new to VB.NET and i was wondering if anyone here knows how to check for duplicate values in strings?

View 11 Replies

Way To Concatenate List Of Strings Into A Comma-separated Strings, Where Strings Are Members Of An Object?

Oct 16, 2009

Say I have a List(Of Tag) with Tag being an object. One member of Tag, Tag.Description, is a string, and I want to make a comma-separated concatenation of the Description members.Is there an easier way to do this than to read the Description members into a List(Of String) and then use the Join function?

View 2 Replies

Adding Values To Array And Accessing Strings

Aug 23, 2009

I have my app that does some complicated function and adds some values to an array, but then later I need to access the strings, I have the index number but not the string so how can I find that string again?

View 2 Replies

.net - Convert Resultant Values To List Of Strings In Linq?

Oct 1, 2010

I'm having issues with returning a list of strings of the .Value of a Linq query:

Dim details = <Details>
<Vector size="5">
<Item>Syntactic Structures</Item>
<Item>Introduction</Item>
<Item>The Independence of Grammar</Item>

[Code]...

Is correct in that it returns the list of XElements I want (items 1 - 4, base 0), but I really just need a list of strings for the .Value of those XElements. Maybe I'm just dense here, but anything I've tried in the chapterTitles query isn't working (appending with .ToList.ToString, etc.). details.<Vector>.<Item>.Skip(1).Take(4).Value just returns the first XElement's value.

View 1 Replies

Reading XML Elements And Assigning Values As Strings / Ints

Jan 4, 2011

I'm trying to read the XML I generated. Here's my writing code:

'XML EXPORTATION BEGIN
'Create the file
Dim myXmlTextWriter As XmlTextWriter = New XmlTextWriter("C:Simple TimerProfiles" + timer_name + ".xml", System.Text.Encoding.UTF8)
'Choose Formatting
myXmlTextWriter.Formatting = System.Xml.Formatting.Indented
[Code] .....

View 9 Replies

Chopping Up DatabasTable Values Text(30) To Multiple Strings Variables?

Mar 9, 2012

Anyone know right off hand a cleaver way to chop up a Text value from a table... Scenerio is this I have one table with a name (Smith, Timmy Alan) in a table text(30) format. I can pull the value to a string in VB but I want to only take the last name for one string and the first for an other string.

View 4 Replies

Closing Application Via X Button Without Closing Forms Inside Mdiparent Causes Exception Error

May 3, 2010

Form1 is a mdi container. It has a bunch of forms that can load inside of it as mdi children. If I close each open form inside the form1, and then click the red X at the top right, application exits fine.If I click the red X without closing the forms inside I get: An unhandled exception of type 'System.CannotUnloadAppDomainException' occurred in mscorlib.dll

Additional information: Error while unloading appdomain. (Exception from HRESULT: 0x80131015) However I can break from it. How do I get the application to not show that error? What must I do to fix those inside forms or close when the red x is clicked?

View 1 Replies

VS 2008 Closing All Forms When Program Closes Vs. Closing All But Main Form

Jun 4, 2010

Dim frm As Form
For Each frm In Forms
Set frm = Nothing
Next frm

The above code is what I used in VB6 to close all forms associated with my programs before my program closed. I have been searching for information on how to make sure all forms are closed when closing a VB2008 program.

I have seen info on using the Project Property Shutdown mode When startup form closes and I currently have this set.

Is this all that is really necessary? Will the garbage disposal close everything else to free up RAM?

Also, if I have several forms open and want to close all from the main form without closing each one individually, what is the best approach? Is there a collection like in VB6, go through the collection, compare it to the name of the main form and close it if it is not the main form?

View 4 Replies

Closing Child Form Without Closing The Parent?

Apr 27, 2011

I have the following code to close a form which is a child. The problem is that when it closes, it closes the MDI parent too.

Private Sub frmTransaction_Closing(ByVal sender As Object, ByVal e As System.ComponentModel.CancelEventArgs) Handles MyBase.Closing
If ListView1.Items.Count >= 1 Then

[Code]....

View 4 Replies

MySQL And FTP - MySQL Databases Exists For Saving Values As Strings (text Only)

Sep 22, 2009

MySQL databases exists for saving values as strings (text only). Is there any way that i could store files with the same speed as a mysql command ? I know that it depends on the file size but lets say that the file is "Avatar.jpg" 50KB... I ve tried FTP but this is not what im looking for. e.g. You want your users been able to upload a file like the [Add This Attachment] button does in dreamincode.net and you dont have any background on PHP/HTML/Javascript/ASP.NET just VB.NET and the basics of MySQL plus you dont want to use it for a website. How do you accomplish this? Something silly that ive tried was opening an image as text then update the mysql server with that text but it didnt work backwards after i wrote the text on the file and oppened it ...it said that the image was corrupted.

View 7 Replies

VS 2008 Send An Object Instead Of Strings Which Includes Multiple Unsigned Integers And Strings

Aug 13, 2009

I am working on a UDP Client/Server, and currently i have them sending back and forth strings, which i convert to bytes, and then open the bytes to read. I want to now send an Object instead of those strings, which includes multiple unsigned integers and strings.

View 39 Replies

Prepend A String To All Strings In A List Of Strings?

Aug 5, 2010

I have a list of strings. For each string in that list, I want to prepend another string. I wrote a method to do it, but I was wondering if there was something already in .NET I could use to do this. It seems like something that could be built in, but I was not able to find anything.

Here is the method I wrote:

Private Function PrependToAllInList(ByRef inputList As List(Of String), ByRef prependString As String) As List(Of String)
Dim returnList As List(Of String) = New List(Of String)
For Each inputString As String In inputList
returnList.Add(String.Format("{0}{1}", prependString, inputString))

[code].....

It works, but I would rather use built in functions whenever possible.

View 5 Replies

VS 2008 Using List Of Strings Or Array Of Strings?

Oct 16, 2009

I'm migrating from VB6 to VB.NET, in hence my questions below:

I have to write a function that returns array of strings.

How can I initiate it to empty array? I need it since I have to check if it's empty array after it returns from this function.

Is list of arrays better for this purpose? If I use a list - Is it empty when it firstly defined? How can I check it it's empty?

View 3 Replies

Find Strings Inside Strings?

Aug 15, 2011

I have been looking for examples to find the string between two strings. This top one works fine;

Public Sub ReadData(ByRef keywordStart As String, ByRef keywordEnd As String, ByVal filename As String)
Using reader = New StreamReader(filename)

[Code].....

Now the first one is fine - Ext_Volume is result of the string between the strings <Volume> and </Volume>. <Volume> and </Volume> are unique so this is straight forward.

However the second one - "^FDExp:" is unique, but "^FS" is not unique. There are occurances of "^FS" before and after "^FDExp:".

How do I get the string to search AFTER the occurrence, not before etc?

View 5 Replies

How To Extract The Strings Out Of An Array Of Strings

Jun 24, 2011

Dim str As String
Dim str2 As Array
str = "blabla duhduh"
str2 = str.Split(" ")

View 2 Replies

Use Regular Expression To Get Strings Between 2 Strings?

Apr 6, 2012

Say the string is something like

bla bla bla bla (cat) bladfdskdfd dsgdsdksf (dog)
dfdshfdskdskfsdfkhsdf sdkfhdsfkdf (kathy) fdsfhdskfhdsfkd (doggy)

I want a generic.list (of string) containing

cat
dog
kathy
doggy

How to do that with regular expression in vb.net

Later I want to do something more complicated like getting all strings between "url":" and ", from this strings

[Code].....

View 1 Replies

VS 2010 Finding Strings Within Strings?

Jan 8, 2012

Is there an easy way to find a certain string within a string and then return the strings that you find as an array?I have written this:

Public Function FindStrings(ByVal strSourceString As String, ByVal strStartString As String, ByVal strEndString As String) As String()
Dim StringStartposition As Integer
Dim StringEndPosition As Integer
Dim Currentposition As Integer = 1

[Code]...

View 16 Replies

VS 2010 Separate Strings Into Other Strings?

Jan 16, 2011

I have this string called time. It's value is in this format: HH:MM:SS The numbers change, but the format stays the same. I want to separtate the code into 3 strings Hour, Minutes, Seconds.

View 2 Replies

DataGridView - Convert Nulls To Empty Strings And Display It In The Grid As Empty Strings

May 14, 2009

I have a DataGridView that has some columns with dates. It binds to an in-memory Datatable which gets loaded from an string array of data passed back from the backend Some of the rows returned have nulls for the date columns. Solution 1: If I define the Date column in the DataTable as "string" I can easily convert those nulls to empty strings and display it in the grid as empty strings (desired results). However, if the user clicks on the date column header to sort by date, it doesn't order the rows as you want. You get a purely string sort order. Not acceptable

[Code]...

View 2 Replies

Puts The Strings From Text Box 2 Between The Strings In Text Box 1?

May 17, 2010

Here's the weird problem I am trying to solve but cannot get my mind around it. In a text box 1, the user enters 2 or more strings separated by comma. then in text box 2, the user enter 1 or more strings separated by comma. The output then puts the strings from text box 2 between the strings in text box 1

Example:

TextBox1 = visual basic, java, perl
TextBox2 = is better, compared to

[Code]...

View 1 Replies

Read The Latitude And Longitude Byte Values From The DEM File (retrieving Binary Values)?

Mar 23, 2009

I have a DEM file(Digital Elevattion Model File) and I am trying to open the file,where we have Latitude and Longitude values inside the DEM file.And, Now I have opened the file using Filestream and Read the file using BinaryReader.But, I am having a trobule in getting the values of Latitude and Longitude.I am getting Byte values randomly as 1,202,31,271 etc.But, we dont have latitude and longitude values more than 180,and also I am not getting 16 bit UInt values.For example, the values should be like Latitude 20.00416666666667 and Longitude 39.99583333333333.So,read the correct Byte values of the DEM file.The code I have used till now is:

Dim fs As FileStream = New FileStream("C:UsersadminDesktopHeader and DEM fileE020N40.DEM", FileMode.Open, FileAccess.Read)
Dim rd As New BinaryReader(fs)
Dim convertDB As UInt16
For i = 0 To rd.BaseStream.Length

[code]....

View 14 Replies

(VB2010) Save The Values To A File Which Loads The Values In The Specified Labels On Startup?

Jun 2, 2011

lets say I have a form (form1) with lables a-z which are all designed with default text "0". So they all show 0 on program startup. which is fine. I also have a dialog with 2 TextBoxes; I want my program to update the default text/value on (only)form1 labels x, y and z to whatever was put into the textboxes when i press the OK button on the Dialog, so these specified labels show the 'new' value on next startup. Is it even possible or should I save the values to a file which loads the values in the specified labels on startup?

View 5 Replies

Exclude Multiple Values In Sum Depending On Values In 2 Columns In SSRS 2005?

Apr 21, 2009

I have simple columns and their respective sums. However, I exclude 1 particular value from each sum, like so [code]...

Now I need to exclude another value ("Awaiting Progression") from a second column called "PROGRESSION".

Since I already exclude value based on 1 column called CATEGORY, how do I change my =Sum(Code.ExcludeOthers(Fields!CATEGORY.Value,Fields!ACTION_PLAN_NEW.Value)) to exclude a value from the PROGRESSION column if it's = ("Awaiting Progression") ?

i.e. How do I exclude multiple values, depending on values in 2 columns in SSRS 2005?

View 1 Replies

See If The Values A User Inputs Into 2 Textboxs Equals The Values Assigned To A Picture?

Apr 21, 2010

I want to be able to see if the values a user inputs into 2 textboxs equals the values assigned to a picture. I put these values in the picture's name and tag. Also the picturebox is getting the image from a random function correlating to an imagelist. How would i go about thisI thought of maybe using a checkbox and coding

If picturebox1.image.tag = ("12") _
and textbox1.text = 1 _
and textbox2.text = 2 Then
checkbox1.checked = true

unfortunatly when i debug it says the picturebox1.image.tag = Nothing

View 3 Replies

Closing A Different Application

Jun 2, 2012

I am wanting to close an application called SecondCut. How do I close this application when clicking on a button in another application.

View 2 Replies

Closing A Form With Yes/no?

Jun 11, 2011

I a suppose to when the user closes form1 display a messagebox. The messagebox should ask the user if they are sure. If they click yes let them close the form otherwise do not let them. This is the code I have

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim result As DialogResult

[Code]....

View 6 Replies







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