I have two textboxes (TB01 and TB02) and one button (Button1).Then i have written the following [code]I made a loop to get each line and append them to TB02. The strings should be split in three parts (cutt off at the |) so i can later recall them. However it just wont work. I played around a bit but just cant get it to work.
ive been trying to get ths workign but cant quite do it, i have a rtf field, and once the users entered the text, on the save button, i want a small function which will change the font color of certain lines. So for instance the user enters this:
I was getting weird results when doing multiple splits on a string, so I decided to make a simple test to figure out what was going ontestString "1234567891011121314151617181920"If I wanted to get whats between 10 to 20 in Javascript I would do this:var results = testString.split("10")[1].split("20")[0]Which would return 111213141516171819However when I do this in VB I get 111Split(testString,"10")(1).Split("20")(0)It seems the 2nd split is only recognizing the first character no matter what I put.
I'm pulling data from my DB, adding it to a DataTable and binding that DataTable to my DataGridView. Before I bind the data, I need to change/remove some data. When I loop through the rows and use a Select Case, just for this column, it doesn't work. But if I use an If, it works fine. [Code] In the example above, the "Pass_Flag" row works just fine, but the "FailureCD" does not. But after the Select, with the If statement, it works. In the example, I'm casting the row as a string first and then an integer. I tried casting to an integer in the select case and it doesn't work either.
I'm extracting the source code off a site using httpwebrequests and need to split some text off it, What I mean is that I want to keep only a part of the code. As an example, I download the source off this site : click here, and I want to keep ONLY the part that contains the "h" : "d80ad7c4f008cfa3ca4c9004b057346a" }; (Note, I don't want the code to be working only for this page, in other pages the number after :h: is randomized). I've tried a couple of methods using regex but couldn't actually succeed.
Basically, I'm trying to do some string manipulation to edit directories. I found some code to try and edit the directories, but when I use it it doesn't recognise 'right' as being a function and only recognises it as a right property, thus producing an error.
I was wondering if there's something I haven't imported or if perhaps 'right' is an obsolete function that was used in VB6 but replaced with something. The code I have is as follows:
I was trying to use TextInfo.ToTitleCase to convert some names to proper case. it works fine for strings in lowercase and mixed case but for strings with all characters in Upper case, it returns the input string as is. Nothing about this behavior is mentioned in MSDN documentation, any insights?
I'm trying to split an image into 9 smaller images; the code I wrote works fine for an image with dimensions that are evenly divisible by 3 (i.e. 150x150), but seems to cut stuff off for images with dimensions that are not evenly divisible by 3 (i.e. 800x800). While some distortion is understandable, the result I got looks way to bad to simply be bad resizing/cropping/etc.
vb.net Dim picGroup() As PictureBox Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load picGroup = {Me.pic1, Me.pic2,
I cannot make the code work when it gets to consonants. I cannot get the consonant part correct.
Code: 'Date of last Modification: 4/11/2009 'Pig Latin Converter: Takes and English words and converts it to Pig Latin 'Rules stated in comments within calButton click event procedure
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
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.
I need to split a string into parts to insert into a table (Data Grid View).
The string is as follows map: mp_shipment num score ping guid name lastmsg address qport rate --- ----- ---- -------------------------------- --------------- ------- --------------------- ----- ----- 0 0 7 719f826a9a7ee795ed3c43********** Not Yourself^7 0 127.0.0.1:28961 30793 25000
As you can see its for a game (Cod4) I am making a rcon tool. It is all going well apart from splitting the string. What I need is putting the (num, GUID, Name and address) for each person (I am showing only one) into a DGV.
Problem with splitting, i was able (with help) to get a text from html tagname, the thing was that there are different text with the same tagname and the only way i can to receive each one was with this:
CODE:
With that i get this text:
CODE:
So i want to remove the </a , how can i do it?
So now i have in textbox2 the text but have a lot of unnecessary html so i used 2 split more
CODE:
That work perfect but just for one and i need the others, how can i "integrate" that 2 split function more for get a clean text for each one. If in the first code i use this
CODE:
All texts are in a new line but then the second code doesnt work :/
I have textbox that the user will be able to write to.Say it looks like this:Hello my name is lolCause i don't know this.Then i want to split it by lines, so for exampleline(0) = Hello my name is lol.line(1) = I waline(2) = Cause i don't know thisAnd user should be able to write as many lines he wants, so i think i have to use a For Each thingy.(??)And then with the click of a button, it should write those lines in a string like this:
I have a large tab delimited text file to process each day (usually around 25 mb) consisting of usually well over 100,000 lines. The file is actually made up of about 9 or 10 reports separated by "END OF REPORT". I'm wanting to write each individual report to it's own text file. Some values may have trailing spaces or even contain nothing but spaces, so I am wanting to trim those to only the data, or be left with null. Ultimately each report will be imported into sql server tables. The code I have below runs successfully to completionwithout error although each text file is empty. The script is also extremely slow and seems to use quite a bit of memory. The arguments are ad
VB.NET While 1 = 1 Dim localRecv As New StreamReader(localClient.GetStream) Dim aString As String = localRecv.ReadLine localRecv.Peek() MsgBox(aString) End While
Basically "aString" will keep updating if new data arrives to the server. This way does work, and keeps MsgBoxing every time I get new data, but I don't wanna use While, I need something else, because It won't run any other code, just keeps looping that. :/
I can use the below code snippet to clear the text from each textbox on a form. For Each ctl As Control In Me.Controls If TypeOf ctl Is TextBox Then ctl.Text = "" End If Next
But if I want to use it to ensure that all radiobuttons in a group of radio buttons are unchecked then it doesn't work i.e. For Each ctl As Control In Me.Controls If TypeOf ctl Is RadioButton Then ctl.checked = false End If Next I'm assuming it is because the checked property is not common to all controls.
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?
I am calling a Fortran dll from vb.net. It works when I call it it one time only. When I put that in a loop, it works for the first time and second time it quits the program. How can I run this in a loop?
I created this ASP.NET Web application and I can't get the amoritization table(MonthlyPaymentBox) to loop correctly. I think the problem is somehow in my code I am setting the TotalLoan = 0, but I just can't locate where that is happening. I assume this because instead of of starting the current balance at the users input, it starts at 0.
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb" Inherits="WebApplication1._Default" %> <!DOCTYPE html PUBLIC "-W3CDTD XHTML 1.0 TransitionalEN" "http:www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Basically what i need is for something to look at the items in a list box then compare it to the contents that is in the database. The issue is that the listbox can have more than one of the same item. For instance, LstBox_Order.items(0) could be the same at any position in the listbox. This code works, but it is slow if there is like 10 or more items added.
My loop that needs to count and accumulate the numbers from a list box does not work. When I debug it reads the first line of the Do While loop then jumps to the code where it would average the numbers. Here is my code:
'calculate average 'get first item in list box lstListBox.SelectedIndex = 0
Public Class MortgageDetailsCalculatorForm Private Sub CalculateButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CalculateButton.Click