|
Wow! Luc, thanks again. Lots of great advice. I'm in for some modifications to this code. As I said I'm new to VB (about 6 months) and it is a whole different animal than embedded controllers. The comments in caps are a bad habit I picked up in the 8 bit era of computing. Hard to get rid of...
I think the quick solution before polishing the code as you point out is to do 4c. My circuit uses a PIC with internal hardware UART and PWM so it doesn't take much time to push bytes to the internal buffer (200 bytes) or set the duty cycle, so my software will be free to do the actual work (mostly delaying byte output.) I'll keep it at 9600 baud for now. I'll up the speed once the code is polished and convert everything to text values as you recommend. My bytes insistance was just because I'm used to do it that way when I have chips talking to each other and their peripherals (translation: I don't know better!)
I will keep learning more about VB. It is fun despite being huge compared to what I knew about the BASIC language (used to know all instructions of the top of my head.) Lots more going on with .NET and Windows. Thanks for all the help in getting my application going.
Best,
Juan
|
|
|
|
|
Hi Juan,
you're welcome. And good luck with the project.
FWIW: I once did a 9600Bd serial port plus a separate 9600Bd CAN-like protocol on some PICs (16F84 = 64 bytes of RAM, no UART), all four comm channels in software, and without interrupts (too slow!); together with two Macs, they were controlling my digital railroad setup. So, yes I know there is a huge difference between PCs and small embedded systems...
|
|
|
|
|
Hello !
I'm working on vb.net 2010 .I have a form with some labels : Label1,Label2,Label3.....and i want to access a label using name as string.i'm using the code :
For i=1 to 31
DirectCast(Me.Controls.Item("Label" & i) , Label).ForeColor=Red
Next
But this code produce an error : Object reference not set to an instance of an object.
What can i do ?
Thank you.
|
|
|
|
|
Not sure, however I would suggest you try
DirectCast(Me.Controls("Label" & i) , Label).ForeColor=Red
|
|
|
|
|
This error occurs when you are accessing an attribute of an object when the object itself does not exist.
alejx wrote: Me.Controls.Item("Label" & i)
Ensure that the values you are trying to access here exist.
|
|
|
|
|
I would loop through the controls from the forms collection and check each controls type to see if it is a label and then change it color as shown in the code snippet below
For Each Control In Me.Controls
If TypeOf Control Is Label Then
Control.forecolor = Color.Red
End If
Next
or you could do it like this
Dim l As Label = DirectCast(Controls.Item("Label1"), Label)
l.ForeColor = Color.Red
Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch
|
|
|
|
|
Hi I want to scan from ADF (Feeder) in my scanner. How to make this?
modified 9-Jan-12 13:20pm.
|
|
|
|
|
Have you checked to see if the scanner has any SDK's? that would be my first place to check
Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch
|
|
|
|
|
I want to scan with all scanners not only in my scanner.
|
|
|
|
|
Take a look at the response to this question[^].
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
I'm using vb2008
Is there is any suggestion to create guitar tuner using Vb.net
|
|
|
|
|
Here's a C# article on the subject but I don't think it would be to hard to convert.
FFT Guitar Tuner[^]
C# Conversion Article[^]
Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch
|
|
|
|
|
I'm working on vb.net and I don't know how to use C#.
thank you for your help!
|
|
|
|
|
The second link is about converting C# to VB.NET
Also have a look at this Code Converter[^]
Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch
|
|
|
|
|
Thank you. but I'm confusing, I don't knwo how to use it. any sugggestion ?
|
|
|
|
|
Seriously?? It was spelled out to you step-by-step. All you had to do was come up with the full path to the solution file (.SLN) and type that into the last command line!
|
|
|
|
|
Please I want to make sign up & Lodin form
to my program with VB.net
I make program linked to database MySQL.
I want password saved in database is Encrypted
Thanks for All
my email
taherhamdy_76@yahoo.com
|
|
|
|
|
Without wanting to sound rude.
What have you tried? what are you having trouble with? I got alot of hits from google
vb.net login form tutorial[^]
Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch
|
|
|
|
|
Hello everyone. I have a simple request. I need a simple source code sample of how I would make a p2p style multi player game in Vb 2010. I know it would use a network stream and everything streamed would be in a class. But Ive never worked with network streams before so a very simple code sample would help me a lot. A simple input box, type in IP, connect type sample would be great. Thanks in advance.
|
|
|
|
|
Yes, you will need to do some stuff with network streams. The only network games I've written were over LANs (my home network). That's a lot easier, since you don't have to worry about security issues (at least at my house ), and you don't have to worry about dynamic ip addresses and all that...
It is possible, but a little tricky. First, it's a good idea to do all of the network communications asyncronously (such as with a backgroundworker. I have a link to a vb source code I wrote to help me with developing a couple of network programs I wrote a while ago. It basically encapsulates all of the details of the network stuff in a class. You can take a look at it and how it works.
You can take a look at http://lance.mckendree.edu/~klschaefer/temp/NetworkHelper.vb[^]. As the name suggests, it makes doing network stuff a little easier, but feel free to learn how it works and expand on it. If you haven't done any network stuff at all, I would suggest making a simple chat program just so you can get something under your belt.
I would consider what I've done to be a server/client program, so one of the machines is designated as a "server" and the other as a "client", although beyond initially setting up the connection, that designation pretty much doesn't do anything: both can send and receive exactly the same.
Anyways, I hope this helps!
|
|
|
|
|
thanks, its looks great. Ill have to play with it some.
|
|
|
|
|
am dev. a school man. so i need to computer student performance but the problem is how to get the highest in class base on their percentage
i have ther percentage but som have thesame perc so how to know who is 1st,2nd 3rd ....
am using vb.net
just a clue i need
|
|
|
|
|
Not enough to really give you a good answer. Are you calculating the percentages on the fly?
If you are using a generic list then have a look at this
MSDN Sort Method[^]
if you are using a dataset then use
Dataset select method[^]
Lobster Thermidor aux crevettes with a Mornay sauce, served in a Provençale manner with shallots and aubergines, garnished with truffle pate, brandy and a fried egg on top and Spam - Monty Python Spam Sketch
|
|
|
|
|
You need to define a new parameter which can be measured and used as a tie-breaker when 2 or more students have the same percentage. For example: Attendance.
OR
First try using more decimal places in your percentage calculation, maybe there will be a difference.
Good luck.
|
|
|
|
|
i hav calculated their percentage. but don wana include attendance.
the db table is lik
sn,studid,class,totalmark,markObtain,percentage.
the query is "select * from tb_exam where class 'classA' order by percentage asc".
wanted to get the highest base on per. but its not workin
so how to conditon it to match with the total student in that class and geting their positon base on their percentage.
thanks
|
|
|
|