How To Add String To A Text Box, Returned From Another Form That Has A List Box
Dec 15, 2011
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.
View 3 Replies
ADVERTISEMENT
Nov 22, 2010
there's a list-box with items, and say you want to modify an item in the middle of the list. You select that item and click "Modify" button and a new form appears with the previously selected item data from first form ready to be modified in a text-box. After modifying and clicking Ok the second form suppose to return that modified string to the first form and insert the modified string into the same spot instead of the originally selected item, so it looks like it was edited to the user.
View 2 Replies
Oct 18, 2010
What would be the fasted method of get a string list of all values within [] in a string of text? For example: [client_name], are you are doing today? My name is [my_name]. The list of strings would be:
[Code]...
View 6 Replies
Oct 17, 2010
I 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]....
View 3 Replies
Jul 24, 2009
I have a radio button control on a web form. The members of my ListItem collection are
assigned the following.
Text No
Value 0
Text Yes
Value 1
So what I need to do, is to readd a varchar value from my database and if the column value returned equals 'Yes' then I need to select the radio button that has the assigned value of 1. Otherwise if the value read from the database is 'No', then I need to select the radio button assigned a value of 0
So how can I set the value for my radio button? I experimented and could not figure it out. The 'Yes' or 'No' value is stored in my database in the field ds.Tables("employee").Rows(0).Item("answer")
So I tried something like this which is not correct:
RadioButtonList1.Items.FindByValue(ds.Tables("employee").Rows(0).Item("answer") = "Yes").Equals(True)
View 2 Replies
Nov 6, 2011
Im still doing some amatuer programming, but now in .net and Ive come here with a question that I cant seem to find an answer to... Basically, Ive got a program im writing to interface into my companies AD and return some values, which then trigger other events etc..
The problem Ive run into is trying to find and easy way to compare the returned value when against a list of possible combinations (16 possibilities to be exact), and if its one of them then all good continue on but if not then I need to throw an error and exit sub.[code]...
View 4 Replies
Mar 21, 2012
I have a problem with a For Each Loop that doesn't make any sense. The For Each Loop returns values from a list which are Memory Ranges for a given device. When I check the count in the list it returns 3. The For Each only returns 1.
Here's my code:
Private Sub DisplayDeviceResources(ByRef lvwResources As ListView, ByRef intClassIndex As Integer, ByRef intDeviceIndex As Integer)
Dim curDeviceClasses As New DeviceClasses
Dim lvwItem As ListViewItem
EnumerateResources()
[Code] .....
View 12 Replies
Jul 29, 2011
I want the Function to accept List(Of String), Array & String and similarly return List(Of String), Array & String respectively. The Function simply adds a string (month) to the input collection. I just want to use it for string, array and list with needing to think of conversions.
[Code]...
View 2 Replies
Jun 23, 2009
I am currently writing unit tests for an application near completion (before management looks at it and turns it inside out). I am testing the business layer and a method is set to return a datatable of all "GroupID"s, which are simply an integer to represent the group that a user belongs to.
I'm assuming the best way to assert on this unit test would be to assert that the correct groupIDs are being returned from a controlled test database. However, I'm not sure how to assert on a datatable. Is the only (and best) possible way to accomplish this to simply loop through the datatable until it's empty and add each value to an array of integers? How would one go about asserting on this test?
View 2 Replies
May 31, 2009
I was wondering how to add the text from a text file to a List(Of String), one line per item (in the list).
View 19 Replies
Jun 5, 2011
who can point me in the right direction with regards to auto generating a ruleset text string from a list of url's. I get a list of URL's in the format:
[Code]...
View 6 Replies
Mar 22, 2011
It seems simple enough, but apparently I cant figure it out. Theres more to my actual problem, but once I figure out this concept then I can do the rest. I want to search a list for a given string, and if it matches, then print it out. If it doesnt match, then it moves to the next item in the list. If if doesnt find any matches, it says "no matches found".
[Code]...
View 1 Replies
Jan 26, 2012
In my webservice I have converted the ado recordset to xml and returned a string.In my application I managed to convert it back to the ado recordset but now I need to convert that recordset to dao as I need to use some of the functions provided by dao that ado does not have.
View 1 Replies
Oct 15, 2008
Code:
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" ( _
ByVal lpClassName As String, _
[code]......
View 2 Replies
May 2, 2012
I'm trying to establish a connection to my SqlDatabase while getting the connection string from a function. This will eventually lead to dealing with the appconfig file, but for now I'm just getting the basics established.
Imports System.Data.SqlClient
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
[code]....
View 13 Replies
Jan 25, 2011
I have been having some problems trying to decrypt the string returned back from SagePay.I used their asp.net kit which included the encrypt and decrypt functions using base64 - sending the information to SagePay is not a problem but I am having a number of problems trying to descrypt the string.Here is the function I am using to descypt:
Private Function base64Decode(ByVal strEncoded As String) As String
Dim iRealLength As Integer
Dim strReturn As String
Dim iBy4 As Integer
[code]....
I don't think the web server is trying to encode anything as there are no + symbols within the url string and I have just glanced over the two to compair they are the same.This returns a blank string whereas when I use the sections commented out in the first loop i get a really weired string back and when I use their simpleXor function it just returns complete nonsense.
View 1 Replies
Nov 10, 2009
My program creates a array of numbers as entered by a user and then finally adds them up. The form should be able to display the numbers typed in by the user. I know how to put one of these numbers into separate labels and could display each number that way but I wanted to know if there is a simple way to display the string that is created as a list in perhaps a read only text box or similar?
View 6 Replies
Apr 20, 2010
Function runs fine on the listbox until i use the btnUp_Lanemgr click event
throws an exception in function (below in bold) "Unable to cast object of type system.string to type namespace.myitem"
what i can do to make this work?
'Button moves selected listbox item up
Private Sub btnUp_Lanemgr_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUp_Lanemgr.Click
[Code]....
View 1 Replies
Apr 15, 2009
simple problem Basically in form1 i have a line of SQL code in a rich text box called rtb_select
what i would like..This code to run under a connection string called strSQLSelectQuery in form2
I have been told someting like strSQLselectQuery = rtb_select.text would work however because rtb_select is in a different form in the same project it does not recognise rtb_Select
View 2 Replies
Dec 15, 2010
I got an object of List<List<string>>I need to bring this into a ist<string>I have no idea how to do this with LINQ.
View 1 Replies
Mar 15, 2012
I have a form with a text box and a form with a list box. I would like to be able to push a button on the form with the text box and have it be added to a list box.
View 3 Replies
Feb 5, 2008
I have an application that I'm trying to use a textbox to store a form name:
Dim strName as String = frmMain.txtFormClose
Dim frm as Form = strName
frm = strName
frm.show
or
frm.close
and I get an error stating a string can not be converted to a form or something.
I'm trying to open and close forms in my application, based on the string text in my open and close textboxes, but it's not working.
View 5 Replies
Nov 22, 2011
I am trying to add text from a text box into a list box when the radio button unseperated list is selected. i can do this easily. howeve ri now wnat to put text into the list box from the text box when the sepereated by comma radio button is selected
[Code]...
View 11 Replies
Sep 9, 2011
Is there a possibly way to add a string value into the Form Text Properties, so that I can have a customer name and job number display there? In other words... a variable form name. I have tried using an ampersand command and even even using quotes.
View 6 Replies
Mar 16, 2011
In an Word addin, I'm using
this.Application.ActiveDocument.Words;
to get a list of all the words in the curret document. Now when I parse this list, I found the ,, . and are also in this list. Why is Word considering these words? I also looked at the word count in the status bar and that was wrong too, as for 7 words in my document the status bar shows 9 words.
View 1 Replies
Oct 22, 2009
dim rownum as interger i need to extract "6" from the string
listviewitem {6} into the variable rownum
View 4 Replies
Dec 5, 2011
We're working on a big ASP.NETVB.NET website project. I need to populate three dropdownlists. To last two are independent of the previous ones. The population data comes from an SQL Server. I'd have no problem doing this with code-behind with post back but we don't want any PostBacks so I started to develop this in AjaxjQuery.
[Code]...
View 1 Replies
May 22, 2012
I'm trying to solve a problem regarding types of list. First of all I have a stored procedure in my DB which does a select of a single column and I try to proceed it in my app in VB. By making a method function I declared a DataTable that loads through the SqlCommand(with the CloseConnection behavior). After that I publicly declared a List(Of String) which needs to be populated with the rows/items from the stored procedure that is on the way. Below is my snippet of the code:
Dim dt As New DataTable()
Try
If conn.State = ConnectionState.Open Then
[Code]....
It's LPrefix = collection.Cast(Of String)() where I get an exception error telling me that I can't really convert it. The old fashion way is to iterate with for/for each loop but that's not what I want for best use of performance especially if the list will have thousands of rows from a single column. So basically, I want to insert those items from that DataTable to the List(Of String) without For/For Each loop.
Running on VisualStudio2010 Ultimate, .NET FrameWork 4.0.
View 2 Replies
Mar 27, 2008
I'm porting some source code (C/C++) formating macros from VS6 to VS2005. All in all it seemed to work fine after it was adapted to the VS2005 DTE objects. But I'm experiencing a strange error while setting a commented text to the current selection. The following sample procedure shows what happens:
Test procedure
View 3 Replies
Mar 25, 2010
I have the following code:
[code]...
The intention is to convert an IList of custom objects to a string equivalent comprising each element in the Ilist. Unfortunately I can't seem to find a way to get the underlying data of the custom object, and of course as in the above example, using object simply gives me a string of types definitions, rather than access to the underlying data.
View 2 Replies