Search results for query: *

  1. T

    RichTextBox Find

    Rich Text box Find Thanks for your reply. I tried it but kept crashing! I did some work and came up with this. It seems OK. ' This method demonstrates retrieving line numbers that ' indicate the location of a particular word ' contained in a RichTextBox. The line...
  2. T

    RichTextBox Find

    Hello. I have this code for finding a string in a RichTextBox - Public Sub SelectMyString() rtbWord.Find(TextBox1.Text, RichTextBoxFinds.MatchCase) rtbWord.SelectionFont = New Font("Verdana", 12, FontStyle.Bold) rtbWord.SelectionColor = Color.Red End Sub- how can I...
  3. T

    Math for a random number

    Hello. There is no special code for that except pure maths. Sorry I can't help you further with the maths but that would take me back a few years! Work out a formula as, for instance: x = someMaths then put it in code as this: Dim x As Integer = someMaths
  4. T

    Math for a random number

    Hello again. I forgot to say that at the very top of the code put: Imports System.Random Also try having the event as a button_click and using Rnd. and instead of 'Debug' use 'Console'. Good to have variations.
  5. T

    Math for a random number

    Math for a random number. Hello. Try this: In the Form_Load event put this:- Dim i As Integer For i = 1 To 12 Debug.WriteLine(rand(i)) Next Then This:- That should? give random numbers between 1 and 12, but never 12. See how you get along with that.
  6. T

    How to ignore case.

    Thankyou Friends they work lovely. TW.
  7. T

    How do you find all rows of the same string in ListView?

    Hello. I have this code to find the first instance of a string in a ListView:- Dim item1 As ListViewItem = ListView1.FindItemWithText(TextBox1.Text) If Not (item1 Is Nothing) Then MessageBox.Show("Found " & item1.Text)...
  8. T

    How to ignore case.

    Hello. I am working on a program that checks to see if the string put in a TextBox is already in a ListBox. If it isn't, then the string is added to the ListBox. But the trouble is that the program will accept a word if the case is different to one spelt the same in the ListBox. How can I...
  9. T

    Can't use network printer.

    Hello. Sorry. I misread you. I can't get anything to print from the laptop. I am certainly learning somethings about computers I didn't know before. I just cannot see how it can't connect with printer.
  10. T

    Can't use network printer.

    Hello. The printer prints anything I want printed from my desktop computer. ie from Word, WordPad , NotePad, VB.Net, Paint, ArcSoft. Would the trouble lie in the Port? It seems to me that it wants to print but can't get to it! I have tried different Ports but I would not know what to put...
  11. T

    Can't use network printer.

    Hello. Thank you for your interest and help. To help let me start again. I have desktop (with Windows XP) connected to printer by USB and it prints ok. I connect laptop(with Windows XP) to desktop by crossover cable from RJ 45 to Ethernet on desktop. Then switch on. I check Windows Firewall...
  12. T

    Can't use network printer.

    Hello. I suppose this might be related to programming because I want to print my code in VB.net that I am working on from my laptop which is connected to my main computer (away somewhere) by hard wire. There are two things that pop up when trying to sort it out: One is that the names that I put...
  13. T

    textbox query

    TextBox Query. Glad to help. Try this:- Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress If e.KeyChar < "0"c OrElse e.KeyChar > "9"c Then If e.KeyChar <> Convert.ToChar(System.Windows.Forms.Keys.Back) Then If...
  14. T

    textbox query

    Hello. Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim A As Integer = CInt(TextBox1.Text) TextBox2.Text = CStr(A * 3) End Sub OK.
  15. T

    Coin Toss Help Please

    Hello. Double-click the form to display the Form_Load procedure. In it, type Randomize This randomize statement is added to the program and will be executed each time the program starts. Randomize uses the system clock to create a truly random starting point for the Rnd statement. Now it won't...
  16. T

    How to get started programming with VB.Net

    Hello juggernot. I found that with lecturers. Try em out with a catch question.
  17. T

    How to get started programming with VB.Net

    Hello Freddy Boy. If you haven't already, join the Public Library - it's free! Get books out on VB and have a go through them to see what sort of style you like. Some authors may suit you - others not. If your local library hasn't got what you want just ask and they will get it for you. When...
  18. T

    Simple Listbox Question:

    Simple ListBox Question Hello Bean. Dim objItem As Object For Each objItem In ListBox1.SelectedItems MsgBox(objItem) Next objItem OK.
  19. T

    open file, get variables

    open files get variables It is up to you what you do. I always go for the simplest way instead of elaborate solutions where one can get bogged down on routines that the more experienced programmers are conversant with. For my money's worth(Not-A-Lot!!) I'd build basic to start with and have a...
  20. T

    open file, get variables

    open file get variables I'm not quite sure if I got you right? Give a different .rtf file name for each person as you add:- RichTextBox1.SaveFile("person1.rtf") RichTextBox1.SaveFile("person2.rtf") and so on You need only use one RichTextBox. The person's username is entered and in the...
Back
Top