Jump to content
Xtreme .Net Talk

joe_pool_is

Avatar/Signature
  • Posts

    512
  • Joined

  • Last visited

Everything posted by joe_pool_is

  1. Here is something basic: MessageBox.Show("Do you want to continue?", "Info", MessageBoxButtons.YesNoCancel) If DialogResult.Yes Then ' // Do the Yes part ElseIf DialogResult.No Or DialogResult.Cancel Then ' // Do the "other" part End If Unfortunately, my code always follows the DialogResult.Yes route. What am I missing here?
  2. There are two methods I can use to end my program: "End" and "Me.Close()". Is one better than the other for terminating the application?
  3. I am about to build a new PC, and I have found that ASUS's P4C800-E board has an 800 MHz FSB and uses "Dual Channel Memory". I also found Corsair's 1G TWIN3200LL (two 512k paired 400 MHz chips) to pair with it, along with an Intel 3GHz processor. What are the general thoughts about "Dual Channel Memory" setups? Will this be worth the extra money? I keep finding that Visual Studio .NET is slow to load up, slow to open my programs, and slow to start/stop the debugger. I want something that sizzles!
  4. Splice, Were you able to come up with anything from the code example that I posted above? The program is going to monitor "always on" systems, so the COM port will have to be open all the time. Am I just out of luck?
  5. Code is attached Absolutely! I had to zip it up using WinZip because it was too large. Everything is included. switchertester.zip
  6. Thanks for the suggestions *and* for taking the time to digest my code well enough to provide a good reply. You two are probably wondering: What is this for? I work at a Closed Captioning facility. Here, we have several Studios where captioning data is sent out by Live Captioners (Stenographers). The switchers are in each individual Studio, and they allow the Captioners to select the source of the data. The program enables the engineers in the Command Center to monitor the settings in the Studios and (if need be) make a data selection when a Captioner forgets. Again, thanks for the help! http://www.ncicap.org
  7. I have a program that is monitoring remote systems via the COM Port using Microsoft's Rs232.vb class. Currently, my program feels like it is moving through thick tar: It is very slow. The system seems to freeze between timer tick events. Does anyone know what might be causing the program to run so slow? Is there a way to make the timer and serial port "do their thing" in the background while the rest of the program is running?
  8. I probably could if I were a little better at that debugger. I've got a watch set on it, and it looks like the integer called Studio is set to 13 after the Form Load. I haven't even accessed the value Studio yet at this point!
  9. Does this only work when the array is innitialized? I've tried: dataout = {0, 1, 2, 3, 4, 5, 6} dataout() = {0, 1, 2, 3, 4, 5, 6} The first one gives me "Expression expected." at the first curley brace. The second attempt gives me "Number of indices is less than the number of dimensions of the indexed array." and "Expression expected." like before.
  10. Attached is the entire project, entitled SwitcherTester.zip. I had to delete the bin and obj folders to conserve space.switchertester.zip
  11. Hey Jay, I gave that a try, but now for some reason my code is incrementing my integer i to 13, and now 13 is outside the bounds of my array. Grrr! Anyone: Is there a way to cause my program to Break when i > 12?
  12. I have tried to innitialize an array all in one step, like this: intArray() = {1, 2, 3, 4, 5} or intArray = {1, 2, 3, 4, 5} or many other methods similar. Nothing seems to work. The only way I have managed to populate the elements of the array is: intArray(0) = 1 intArray(1) = 2 intArray(2) = 3 intArray(3) = 4 intArray(4) = 5 Is there a more elegant method?
  13. I have an integer that is used to index an array. The array has 12 elements in it, so I want to access it with different loops (for, case, while, etc.). Somehow, my program is setting this integer value to 12, which causes problems on a 0 to 11 array. I can't find anyplace that sets the value to 12 in the code, either. I've been stumped on this for a couple of days. 1. Is there a way I can limit the variable's values to only 0 - 11? 2. Is there a way to set a flag so that as soon as this variable is assigned a value above 11, my debugger can stop program execution?
  14. Wow. Great information! I'm printing this out and sticking it in my favorite VB.NET book right now! ~Joe.
  15. PossiblyDamp: Thanks for the reply. So this returns events from the system, not necessarily from the form itself. Right? The DirectCast() function is new to me. After playing with it just now, I see that I can also gather the FormVariable's name, which is something I have been trying to do for some time. vb: Private Sub Button1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Button1.MouseDown, Button2.MouseDown Dim b As Button b = DirectCast(sender, Button) 'convert sender to correct object type b.Text = "clicked " & e.Button.ToString() TextBox1.Text = b.Name End Sub /vb In the example above (using your code), TextBox1 will show me the name of the button I clicked. Is there a preferred method of doing this? I am interested in learning the elegant method if it exists, rather than using brute force with it. P.S. How did you get your code to show up like that? Mine looks like garbage.
  16. Newbie Question: Could someone tell me what "sender" and "e" could be used for? Example: Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ' How would code use sender or e? ' If changed to Handles x.Click, is there a big difference? End Sub Thanks for the assistance.
  17. Newbie Question: What is Mdi? How would I use it? A short and simple answer is all I'm looking for. Thanks!
×
×
  • Create New...