Jump to content
Xtreme .Net Talk

gnappi

Members
  • Posts

    13
  • Joined

  • Last visited

Everything posted by gnappi

  1. Why do I get a not declared error when I try to send a string to a textbox? In form load I declare something like: Dim person1, person2, person3, person4 As String person1 = "Guy1" person2 = "Guy2" person3 = "Guy3" person4 = "Guy4" In a checkbox procedure I use: Private Sub CheckBox1_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles CheckBox1.CheckedChanged TextBox2.Text = person1 I block copied in error, above is the correct code snippet
  2. I have a program that samples the serial port continually based on a number the user provides. Ive been trying to get an event to STOP the loop with a button without success. For example: While stop_button = false for user_count = 1 to variable_number serialportx.readline ' here I want to trap an event that sets user count to 20 or stop the for loop ' from executing. next end while Any ideas? I never can get the following when the loop is executing. 1. A button click event to return a TRUE 2. a status of the button (TRUE or FALSE) to print to a textbox. 3. Any user control to be visible or not visible What is it about the loop that I'm missing? Any help would be appreciated. Thanks, Gary
  3. Been there. I found that page straight away, but there's not much help there. It looks like you have to drop a serial control into your code for each serial port you want to use, and enumerate them yourself. Oh well, I already got out the big hammer. :-) Thanks anyway, Gary
  4. I just installed the new vb.net 2005 and found the new serial port control. Does anyone have any details on how to use it? Thanks, Gary
  5. I have a variable length string that I need to manipulate. It's 20+ characters long, but I only need the first 3 and second three for example: abcdef 12.5,.76m4---L7,8724... I can get the strip out all but first three (ABC) , and shift them to upper case, but can't find a method to extract the second three or the characters def. Here's my code: str1 = (str1.ToUpper) trimmedString = (str1.Remove(3)) Any ideas? Thanks, Gary
  6. Thanks for the replies, but I finally came up with a solution using the following syntax. TextBox2.AppendText(vbCrLf + ("linetest1 ")) TextBox2.AppendText(vbCrLf + ("linetest2 ") + (speaker_status))
  7. I'm trying to make a multiline scrolling textbox but with TextBox (Multiline=True) or RichTextBox (Multiline=True) the last string overwrites the text. What am I missing? Thanks, Gary
  8. Is there a way to reboot a machine on my network remotely using vb.net 2005? Thanks, Gary
  9. The default (IIRC) is 500 milliseconds, pretty tight. I would imagine that the default would cause a false FAILURE rather than a false pass. If that was the case, then setting a longer timeout "should" allow a pass where it wouldn't pass with the default.
  10. I downloaded the VB 2005 express edition and went right to work checking out the MY namespace for networks. The My.Computer.Network.IsAvailable returns an expected true, so hooking up to the newtork I went about making an applet to ping machines on my network. All appeared to be OK, I can ping with network AND machine up and connected, it seems to work fine. Disconnect the network, still fine. BUT shutting off the target machine STILL doesn't generate any error. Heres the code from MSDN: If My.Computer.Network.Ping("198.01.01.01") Then MsgBox("Server pinged successfully.") Else MsgBox("Ping request timed out.") End If I presume that the method is determining that a return did occur. When I PING from the command line, I get the correct "Request Timed Out" response. I think their method has a bug. Has anyone else used this method with success? Regards, Gary
  11. I'm using VB.net 2003. I looked and can't find out if .net 2005 is required to run the 2.0 Framework?
  12. I need to detect the presence of a machine on my network every minute or so. At the command line I can simply ping the address, how can I do it in vb.net? Any help would be greatly appreciated. Thanks, Gary
×
×
  • Create New...