I have made quite a nice and tidy little game. Its based around space invaders and works quite well. however because i have finished my college project almost 2 weeks ahead of the assignments release date, my tutor has asked me to tweak my project and make it better.So far i have added a full main menu to the game and a full splash screen. I would like to add in a section for recorded high scores but have no idea how to attempt this at all.
Basically I am doing a weekly assignment for unit 7 where I have to use Data bases.... I have everything going fine I used VB studio to set up most of my relationships between the Data base and VB.I have a text box called txtLast4OfSSN.Text that I need to get the last 4 of a social security number.
Now this should be simple I have another box ( a Masked Box for SSN) that has the SSN in it... This box is called m_SSN.Text....... Now I figured it would be easy, and that I could just use the Substring(7, 10) to get those numbers :*( However its not working and I am getting an error as follows:"Index and length must refer to a location within the string. Parameter name: length".Here is my complete code with my two buttons its mostly in the second event procedure that I have the code specifically for getting the last 4 of the SSN:
Public Class frmInstructorTable
Private Sub StudentsBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles StudentsBindingNavigatorSaveItem.Click[code]....
Private Sub prices_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles wholeprice_input_new_item.KeyPress, dozenprice_input_new_item.KeyPress, detailprice_input_new_item.KeyPress, costprice_input_new_item.KeyPress
I want to validate all the characters. How I can make the event keypress validate all characters in a text box?
In my debug folder I got this "Full English Dictionary" .txt file which I use in my program. But I don't want to send the whole folder, I just want to send the .exe file.. So is there a way to somehow "add" the dictionary file to the .exe file? Like get it inside it or something?
My "Learn Welsh" application is now near completion, I only have a few things left to add / fix then I will share it with the world. Here's a screenshot of it so far :
As you can see by the picture above, I have created a simple feature in my application to pronounce letters from a word to assist users to learn the welsh alphabet. What I would really like to do is make the program pronounce full words. I already know how to make use of the system.speech reference in vb, here is a quick sample of code:
Dim speak As System.Speech.Synthesis.SpeechSynthesizer = New System.Speech.Synthesis.SpeechSynthesizer Dim word as string = "hello" speak.Rate = 1 speak.Speak(word)
Now what I'm looking to do is make use of a welsh based voice and make an application like the one below:
I have an SQL database, and 50 text files, and Visual Basic 2010 Premimum,I need to find a specific line of text in the text files and then take the next 37 lines of text and save them in my database. I need advice as to point me in the right direction
I have a wrapper class created around TextBox, and I want to find out if there is any way to test if the vertical scroll bar is at the beginning (the very top) of the text box and at the very end of the text box.Alternatively, I will be happy if only I can find out a way to check if a scroll bar is enabled or not in a textbox (note: it's not a RichTextbox).
By enabled, I mean that scroll bar is actually enabled i.e. you can use the scroll bar to scroll the control, not just visible (I know we can check visibility by GetWindowLong)
I'm adding a method to find and select text in my text editor. Everything worked fine, including the ability to find all instances of the text. My problem came when I tried to make it more user-friendly (doesn't it always?). Originally I had only a menu item with a shortcut( Ctrl + F) which invoked an input box.
Then I added a textbox and a button (similar to that seen in a web browser's Find() method) that calls the method in the same manner as the Find/Replace menu option and displays the desired text in the textbox. Everything works fine except that the text is not selected. I have MessageBoxes displaying the values of required variables in 3 places (marked ***FOR DEBUG ONLY***) to make sure that no values are being changed, but all variables are the same. The method still locates the text, but it is not highlighted.
I think it could have something to do with which object has focus. (When I click the button, the selected text loses focus?). But if I click everything with the menu items, it still works...
Here is the
*****code with [code] tags in the 4th post on this thread**** Public Sub FindText() 'Make sure there is text in the textbox...If txtTextbox.Text <> "" Then'Find the end of the current selection... Dim curSelectionEnd As Integer =
How can i find how many word in rtb1.text are same with tb1.text?
kinda like search...
you type in something like "hi", and it tells you how many times it has been used in rtb1 label1.Text = rtb1.Text.Contains(tx1.Text) 'the above returns - true or false - how can i do tht but with it actually telling me how many times it has been used??
I have a little question about txt-files...This is the case: I am going to make a small software for editing particular parts in text files, so you don't have to do it by hand. In this program, i need to find several words in a text file and retrieve the text or number that is after the the "="-sign, and then replace that info. Then, I want to use the information it retrieves to add some text in the end of the file.
P.S. There are 36 differet words to search for, and some of them will occur in several places, so i want the data from those words that occur several times in an array. And the data i want to retrieve is AFTER the searchword and a "=", so i dont want the searchword or the equals-sign included. Can someone explain to me how to do this?
I have a table with fields "username", "Password" and "initials"I have this filled with data.I also have a login form "the login part works fine" but what I also want is depending on what username the user puts in I want the relevant initials displayed in a textbox.
I would like to find text in a richtextbox. I know the code to find a string, but.My find button is in a context menu.I thought it would be a good idea (which usually turns out not to be so good to have a text box in the sub-menu. So, the person would click on "find" and the side menu would open (with the text box), one would then type the search string into the textbox and hit <return>, upon which time the search would be executed.I'm not sure how to implement it. I'm starting to think there might be several issues since the menu system opens the textbox automatically etc. How will I get the string since the textbox won't be "called" by the find button.Can anyone give me some help as to how to procede with this method, or if this method seems daft, then perhaps point me to an alternate or 'standar' approach for this?
I'm attempting to the file the user has opened and find the text the user searches for in a MsgBox.It works fine as far as finding the text, however if you the user will click cancel it will just say "Text Not Found".I'd rather just have the box close like you would expect it to instead of bringing up the box.
Here is the current code that I have. Private Sub ToolStripMenuItem8_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ToolStripMenuItem8.Click Dim a As String
I am trying to find all text from a slightly older application. The thing is, the old scripit from windows NT finds the text I need no problem, but I cant seem to get it myself.
I find the main window, and cycle through its children, but must be looking at something wrong. I am missing 2 things: The title of the app has the name, and then some status information, the status information does not show up on the window title info. The text in the application itself does not reveal itself to me either
Here is a code snippet of how I try to get the info out:
Private Sub gettext(ByVal hd As IntPtr) Dim Hwnd As IntPtr = hd 'Alloc memory for the buffer that recieves the text
I see a page with a specific link in it [URL] So i use webbrowser.document to see its source.Id like my app to get that link without anything else, and put it into a textbox.I cant find any way to do this. I thought and tried remove all text until "www." but it didnt work as page uses facivon and other stuff.
So say that I want to find the word "Hello, world!" on a webpage. It has the ID "Text". Using a WebBrowser named WebBrowser1, is there a way return true if that text exists on a webpage, or if it doesn't exist, it will return false? The URL would be EXACTLY the same either way.
Edit: The HTML path to get to it is very long, so I'd need to find the text on the page.
I have a code, which when a user selects a few options on one form, then clicks enter, it creates a new tab on my main form, with a text box containg the options chosen and a button to edit the options.
My question is how to somehow search the text of this textbox so that when edit is clicked, the form the user selected the options from reopens with the options they had selected originally.[code]...
Have a final and last question :P I have a Config.txt file used for a program im making. Now i am making a editor in VB for that file. Now i need to know how to read the TXT file, and find the variables in it. The config looks like:&TestValue1=value&Value=Test&blabla=lol
So i need to get the values from the = to the & (At the end of the file there's no &!) how to do this?