Storing Multiple Words As One Variable To Use Instr() To See If Any Of It's Variable Words Are In The Text?
Jan 26, 2012
other than GML (Yoyogames.com Game Maker Language), I am new to the coding world. The only "major" project I have completed using VB is a computer calculator that exactly mimics the capabilities of Windows 7's calculator. Yesterday, I began a Chatbot program for my girlfriend. Lol. I have used the instr() function to answer most of the questions or answers which are typed into the textbox1. I find this extremely troublesome because when using the instr() function you cannot say instr(textbox1.
Public Class Form1
Dim fos As String = "Foster: "
Dim ash As String = "Ashley: "
[code].....
View 8 Replies
ADVERTISEMENT
Mar 12, 2010
i have a text file which contain 149000 Words 1 Word Per LineI want to Search Words Who end with "sd" or something else i am using a listbox in which i load all text and then search for it i don't want to know how to search directly from text file listbox method take too much time?
View 8 Replies
Jul 5, 2009
I am looking for a way to count words in VB My full code is as follows Public Class lblTranslator
[Code]...
View 1 Replies
Aug 11, 2009
I've got 2 RTB one is for input of text and one is output.The output one needs to read the words from the input and display it alphabetically and with their line numbers.I have partly done it and it currently reads it but here is my problem When the words are outputted let say for example there are 2 words the same on the same line e.g the word 'you' appears twice on line one,at the moment its coming up like this
[Code]...
View 18 Replies
Mar 11, 2010
I have the following code for part of an application I'm building and I need some instruction on how to store this value and carry it to the next part of the program. Private Sub dateEntryTextbox_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles dateEntryTextbox.TextChanged
[Code]...
View 2 Replies
Aug 16, 2011
Is it possible to use a string for string 2? cuz whenever i tried it would return a 0 instead of the position of the string. however when i hard code the string into the code it works
View 7 Replies
Jul 21, 2009
I want to assign the value of the integer returned from the InStr method to a variable. So, If TextBox2.Text = "The Apple Pie" And TextBox1.Text = "App", I want the integer returned, which in this case would be 5, put into a variable, lets say its called 'VarString'.
So VarString (would) = 5.
[Code]...
View 6 Replies
Aug 7, 2009
I have an application in VB.NET which gets string data from the database. This string has data which looks as below:
"This is the update: I have an issue with the application"
I need only part of the data, that comes after the new line i.e. "I have an issue with the application".
For this I am trying to search the position using InStr where the string has data in a new line. I tried many options, but they don't work.
I used "vbCrLf", Chr(13), "
", "
", "<br/>", Environment.NewLine, but none of them work.
How can I get the data I need?
View 4 Replies
May 30, 2012
On a textbox you can have auto complete but you can only have one word. Is there a way to have every word in the text box ask for auto complete?
View 7 Replies
Aug 14, 2010
I'm trying to send some words to an application I'm running (no webpage). To do this I run my vb program and minimize it, so that the application I want to send the words to have focus.Now I've tried sendkeys, but it seems sendkeys only sends my first word and does nothing with the other words. The code below is called 4 times by the main form [code]but this throws in a overflowexception was unhandled error at the apiSendMessage(hWnd, WM_SETTEXT, 0, "Hello") line.I've tried several things but I can't figure it out how to send multiple words to the application without problems.
View 1 Replies
May 20, 2009
attached is my project on making multiple words from 1 word
This solves the word and has an option to save. Or it solves and saves all words in a list. I tried to do it with jokers using the jokers as every letter but it slows the program down drastically.
View 19 Replies
Jan 23, 2010
i want to replace certain words each time they are detected in order to create a correct response. i have managed to replace the word"i" with "you" and "you" with "me" separatley but when both words are detected in the string it dont work....
ElseIf txtEnter.Text.Contains(" i ") Then
Dim ii As String
ii = Replace(txtEnter.Text, " i ", " you ")
[code]...
View 4 Replies
Jul 7, 2010
How would I output a sentence with VB.NET?
Example: Your program and Internet Explorer are open, your program outputs [URL] and presses "{ENTER}", and it will go to the page.
Example: An auto-talking bot for MSN.
View 1 Replies
Mar 3, 2011
I can't seem to figure out how to efficiently solve a problem.I have the following data represented like this:
Public Class WordWithSuggestions
Private _Originalword As String
Private _SpellingSuggestions As List(Of String)
[code].....
View 2 Replies
Mar 19, 2010
I'm using the code below to take a string and split it up into an array. It will take: Disney Land and make it two separate elements. If the string contains "Disney Land" then it is one element in the array. Works great, however it adds some empty elements to the array each time. So I just iterate over the elements and remove them if they are empty. Is there a tweak to the code below that will prevent those empty elements from occurring?
Private m_Reg As Regex
m_Reg = New Regex("([^""^s]+)s*|""([^""]+)""s*")
Dim rezsplit = m_Reg.Split(criteria)
View 2 Replies
Jan 15, 2012
searching a database using multiple words from a textbox showing in gridview.
<asp:TextBox ID="TextBox1" runat="server" Width="382px" AutoPostBack="True"></asp:TextBox>
<asp:Button ID="Button1" runat="server" style="height: 26px" Text="Button" />
[Code]....
It works fine, i click button and the gridview shows all the right records. The problem is when i use more then 1 word in textbox. it shows nothing. The record in the database field may have several words, so i need to search using all words in textbox.
View 2 Replies
Jun 3, 2011
I'm trying to make the autocomplete work on a list of items entered into a textbox separated by semicolons. I have a list of authors the user can choose from and it autocompletes as they type the name no problem, but what I'd like to do is after the user types a name followed by a semicolon, the autocomplete works on the next name and so on.e.g., Smith, John; Eastwood, Clint?
View 1 Replies
Mar 18, 2011
I recently had some problems with the performance of the Word object model. In an add-in that I wrote for Word I need to parse through all the words of a document and replace some of them or ask the user for the ones that have multiple replacements. I know that it is faster to ask Word for all of the document text content at once and then process it and put it back all at once again, but this is not suitable for my add-in because I need to have access to the range objects that represent the words that have multiple replacements so that I can somehow mark them in the document and present the user with a tool tip from which he can select the replacement he wants.
So for the moment the single great speed improvement that came in my head was multithreading since most people already have dual core or better. The problem is that all the things you find on Google say that multithreading in Office is a very bad thing to do.
So is there any one who managed to do this in a manner that worked in most of its usage? By this I mean if it also worked on other PCs then the development one?
View 1 Replies
Aug 30, 2009
I have been trying to figure out how to do this program for a few days. Here is the question.Write a Windows application that allows the user to enter a seven-letter combination corresponding to that number in a multiple line TextBox when the user clicks the Generate Words button.Avoid phone numbers with the digits 0&1.
I got some help from my instructor but I can't get anything in the listbox?
[Code]...
View 11 Replies
Apr 22, 2011
Ok so basically heres what i need to do: Extract text from the webpage that meets a certain criteria. There will be a ton of these on 1 page and i would like to add them to a rich textbox on sperate lines.
I know that it needs to be in a loop and its needs to Parse the wepage(Dim web1 As String = Me.WebBrowser1.Document.Body.InnerText)
The criteria is: Starts with 1 to 4(random) integers, Followed by "my" then 13(random) numbers and letters. Or if it starts with "167my" + 6(random) number and letters.
Edit: Also im going to try to make it loop through a list of webpages to do this.
View 5 Replies
Mar 28, 2011
i have this error in the line of with xl.active......Object variable or With block variable not set.
Dim xl As Object
xl = CreateObject("Excel.Application")
With xl.ActiveSheet.QueryTables.Add(Connection:= _
"TEXT;C:Documents and SettingsUserDesktop429MEDICA2.TXT", _ Destination:=xl.Range("$A$1"))
[code]....
View 4 Replies
May 18, 2011
I am trying to retrieve a 'tag'(Is it called that?) from an XML webpage. Once I make a post request from my vb.net app it sends a command to my online webserver and redirects me to a page that has entries that change each time. The page that im redirected to that changes each time looks something like this:
<mainpage> <id>hello</id> <random>176</random> </mainpage>
What vb.net code would I use to retrieve the id (In this case 'hello') and store it in a variable.
View 1 Replies
Jan 29, 2010
Ok, Im developing a scripting tool for the program "FPS Creator". The scripting uses of course commands which are split into to groups (Action and Condition)
Anyway to the point :
I need the Actions and Conditions to be coloured so the user knows when the command is correct or incorrect.
View 2 Replies
May 23, 2012
i am trying programming a program that open a txt file then get specfic data from each line then put the data1 in a textbox1 and data2 in textbox2.[code]and for each time i don't now the username or the password i want the programe to search in line 1 the word between "user=" to "" and the word between "password=" to "".I created the text reader and i hope that same one can help complete the project.[code]
View 14 Replies
Jun 25, 2010
I need some assistance because I still coming up empty on how to open up a text file and replace some words then save it as another name.
View 3 Replies
Nov 30, 2010
I am trying to update a table in SQl with a description field. The description may contain syntax words and when it does it I get an Incorrect syntax error.
example - if I insert the string "...with a sweet flavor that is..." The "with" messes me up.
View 1 Replies
Mar 1, 2009
I am wondering how I can go about replacing certain words in a rich text box with different ones.
Say I have 2 textboxes a button and a rich text box.
I want to have Text1 as the box where I would enter the word being replaced.
Text2 would the the box with the word I am replacing it with.
View 4 Replies
Apr 14, 2010
I am using the following code, but cannot get this to work. I have got it to work if the replacement is just of one word. So if the word test is replaced by mouse and the only thing in the file is the word test, it works.
How can I replace like this:
CH_IPVOD_filename.mpg > replace the CH_IPVOD_ with nothing for the result of:
filename.mpg
?
I would like to replace every instance of ch_ipvod_ with nothing.
Public Class Form4
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim fso, inputFile, outputFile
Dim str As String
[Code] .....
View 6 Replies
Jul 27, 2011
I have a text file like this:
name=xyz
user=asdfjklas
etc...
i need to have a string called name with "xyz" in it, and a string called user with "asdfjlas" in it.
View 2 Replies
Sep 30, 2009
i'm working on a code that i want to start creating new classes with but i want to know if there's a more direct way to send the variables used in the form to a new class for storage.
for example i've got this on a form...
Dim ClassID As String
Dim ClassName As String
Dim Grade As String
[Code]....
you know? so what would be my most direct route to get this? how should i start?
View 15 Replies