You are not logged in.

Search results

Search results 1-8 of 8.

Sunday, February 27th 2011, 11:40am

Author: Dr_Acula

What is a good program structure?

Ok, I have something working here. * Put a timer on Form1. Tick every 100ms. Enabled = True. * Put a tabstrip on form1. Create two new usercontrols. *Create a global variable for passing messages in Module1 Public GlobalMessage As String * In usercontrol1, add a button with this code Source code 1 2 3 Public Sub Command1_Click() GlobalMessage = "Test" End Sub * On Form1 in the timer Source code 1 2 3 4 5 6 Public Sub Timer1_Timer() If GlobalMessage="Test" Then TabStrip1.SelectedIndex = 2 GlobalM...

Saturday, February 26th 2011, 11:55am

Author: Dr_Acula

What is a good program structure?

event handlers of controls have to make sure that they don't spawn follow-up events. Yes, I agree! I've had all sorts of bugs in code where you set a richtextbox to autoupdate things, that then spawn other autoupdates. eg I have some code that does syntax highlighting in color. I found it was simpler in the end to just add a button "update color". I agree about trying not to have global variables. Ok, so I am doing some experiments with tabstrip1. I have a tabstrip and I want to detect when the ...

Friday, February 25th 2011, 8:36am

Author: Dr_Acula

What is a good program structure?

init() sounds interesting - I'll check that out. Tested global variables - that works well too. Declare a global variable in the main module. With a separate usercontrol for each part of the tab code, it gets very complicated to code. For instance, if you put a button on one usercontrol and want to change the tab to a different tab, how do you do that? The tabstrip1 exists on Form1, not on Usercontrol1. So Usercontrol1 can't see Tabstrip1, so it can't do something simple like Tabstrip1.SelectedI...

Thursday, February 24th 2011, 5:00am

Author: Dr_Acula

What is a good program structure?

In this folder C:\Program Files\Jabaco\Samples\ControlDemo is a very good demonstration program. It shows how to get a menu working, a toolbar, and how all the controls work. I would like to take this further and have two richtextboxes. Each richtextbox will almost fill the screen, and I want to be able to switch between these. 1) In my version of VB5/6 I don't seem to be able to find a Tabstrip. Maybe it was an add on?. So back 10 years ago, I was putting two richtextboxes on Form1 and then hid...

Thursday, February 24th 2011, 4:29am

Author: Dr_Acula

Serial Port

Vielen Dank für deine Hilfe. ********** SUCCESS! *************** I have got it working! It finds one parallel port, and three serial ports (two hardware, and one is a $2 USB to serial device). Some of the answer came from here http://mango.serotoninsoftware.com/forum/posts/list/14.page 1) Put the .dll files in this directory C:\Program Files\Java\jdk1.6.0_21\jre\bin The dll files are a) RxTxParallel.dll and b) rxTxSerial.dll The "jdk1.6.0_21" part will change as Java is updated from time to time...

Wednesday, February 23rd 2011, 1:27pm

Author: Dr_Acula

Serial Port

Thanks for the advice. This is turning out to be extremely complicated. There are many variables so one has to work through them all: 1) I found this on wikipedia These files can also include a Classpath entry, which identifies other JAR files for loading with the JAR. This entry consists of a list of absolute or relative paths to other JAR files. Although intended to simplify JAR use, in practice it turns out to be notoriously brittle, as it depends on all the relevant JARs being in the exact l...

Wednesday, February 23rd 2011, 6:28am

Author: Dr_Acula

Serial Port

Thanks for the quick response A1880! When I get this working I'm going to write this up as a "step by step" guide as this is a little complex. I've added the file, and I've added the folder. With this code I get an error in the last line Source code 1 2 3 4 5 6 7 8 9 10 11 Option Explicit Import javax#comm Public Sub Command1_Click() Dim cpi As CommPortIdentifier Dim ty As Integer Dim s As String = "" MsgBox("start") Dim en As java#util#Enumeration = CommPortIdentifier.getPortIdentifiers() ' thi...

Tuesday, February 22nd 2011, 5:05am

Author: Dr_Acula

Serial Port

I have just downloaded jabaco and this is a very impressive program. I am trying to add a serial port. I have read through this thread, and found the rxtxcomm program I have extracted this to C:\Program Files\Jabaco\serial\rxtx-2.1-7-bins-r2 and this directory contains several other directories, and it contains RxTxComm.jar Next I have the code posted earlier. Source code 1 2 3 4 5 6 7 Option Explicit Import javax#comm Public Sub Command1_Click() Dim cpi As CommPortIdentifier but I get an error ...

WoltLab Burning Board