|
ya.., using serial port control is very easy, in the net u can get code samples for the comports using windows APIs, these are very good.
choose the controls as per your requirement, using APIs code u can get very fast communication
Rajesh B --> A Poor Workman Blames His Tools <--
|
|
|
|
|
You're looking for the SerialPort class, here[^].
|
|
|
|
|
hello everybody i have one doubt
anbody in forum help me
how to perform incremental search with a checkedlistbox in vb.net
|
|
|
|
|
use a temp. variable and increment the variable from 1. use that variable name in checkedlistbox index or in Item.
|
|
|
|
|
can you please elaborate on howto achieve this.
|
|
|
|
|
Hello,
What practice is best if you are trying to save coping and pasting thousands of lines of reusable code. Currently I have all the code in a module. I have included an example. The problem I'm having is; I cannot retrieve any information from a calling sub in a form.
I'm trying to have a combo box with the size listing and I want to retrieve a specific piece of information when selecting a size. Like the "HEIGHT". I have to use Class Library's for my projects to create dll files that will work with my 3D modeling program. I've read some about creating class objects but not sure about how to accomplish that or if it's really what I need to do. If someone could shed some light on my dilemma, I would really appreciate it.
Module Module1
Public Function RMT(ByVal RMTSize As String, Optional ByRef WIDTH As Double = 0, Optional ByRef HEIGHT As Double = 0, Optional ByRef WALLTH As Double = 0, Optional ByRef OUTRAD As Double = 0) As Double
Select Case RMTSize
Case "3 x 2 x 3/16"
WIDTH = 3.0
HEIGHT = 2.0
WALLTH = 0.1875
OUTRAD = 0.375
Case "3 x 2 x 1/4"
WIDTH = 3.0
HEIGHT = 2.0
WALLTH = 0.25
OUTRAD = 0.5
|
|
|
|
|
use an enum to extract the specific piece
public enum Sizes
[width]
[height]
wallth
outrad
end enum
public function rmt(rmtsize as string, iSizes as Sizes) as double
select case rmtsize
case "3 x 2 x 3/16"
select case iSizes
case sizes.height: return 2.0
.
.
.
end select
.
.
.
end select
end function
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous
'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous
|
|
|
|
|
It looks like you are trying to parse the string?
You can make a class that contains the information from the string:
Public Class RmtInfo
Private _width As Double
Private _height As Double
Private _wallThickness As Double
Private _outerRadius As Double
Public Sub New(size As String)
Dim s As String() = size.Split(New Char() { "x"C, "/"C})
_width = Double.Parse(s(0).Trim())
_height = Double.Parse(s(1).Trim())
_wallThickness = Double.Parse(s(2).Trim()) / Double.Parse(s(3).Trim())
_outerRadius = _wallThickness * 2
End Sub
Public ReadOnly Property Width As Double
Get
Return _width
End Get
End Property
Public ReadOnly Property Height
Get
Return _height
End Get
End Property
Public ReadOnly Property WallThickness
Get
Return _wallThickness
End Get
End Property
Public ReadOnly Property OuterRadius
Get
Return _outerRadius
End Get
End Property
End Class
Example:
Dim info As New RmtInfo("3 x 2 x 3/16")
MessageBox.Show("The height is " + info.Height.ToString())
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hi please some body help I am unable to Write this line of code into VB.Net.....
picImage.PSet (r, c), RGB(clrr, clrg, clrb)
where picimage is a bitmap and r,c can be any points and Clrr,clrg,clrb are the RGB colors
if I am writing the above code in Vb.net like this...:
picImage.SetPixel(r, c, New Color(clrr, clrg, clrb))
then it Gives this Error:
"Type System.drawing.color has no Constructs"..
Please any body can Guide me...
|
|
|
|
|
This isn't a post a question get a immediate response. Members check and respond to the questions when they get to them. You already asked this question below so stop spamming the boards.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
Read the error message, use objectbrowser
|
|
|
|
|
I am making a app that searches for some fles and i need some help finding the right commando. i am using VS 2005
Can someone guide me?
modified on Wednesday, November 12, 2008 1:28 AM
|
|
|
|
|
I'm the commando you're looking for. I'm fluent in WB.NET, and I can find flees like nobody's business.
|
|
|
|
|
The JZ wrote: I'm the commando you're looking for. I'm fluent in WB.NET, and I can find flees like nobody's business.
Classical. Amazing.
|
|
|
|
|
Look at the System.IO.Directory , System.IO.File , System.IO.DirectoryInfo and System.IO.FileInfo Namespaces.
Steve Jowett
-------------------------
Real programmers don't comment their code. If it was hard to write, it should be hard to read.
|
|
|
|
|
I have a datagridview which is bound by a typed dataset. On the initial binding typed dataset is empty. There s autoincrement column specified on the typed dataset. The grid is readonly. But whenever I click on header the autoincrement column increments. It should have occurred only if I add a new row through the code.
Can anyone tell me what is happening here?
Thanks.
|
|
|
|
|
In visual basic net I want to move highlight from row to row
|
|
|
|
|
i heave made a skin with Codejock skin builder and, i want to use it in my app. can someone help me?????
|
|
|
|
|
Have you looked through the documentation on Codejock? Surely they'd have something there.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
I am working with VB.Net 2005, I have a double that is coming up as .025 and I need to round it correctly. So it should show as .03 once this is done.
I currenlty do this and it doesn't seem to work...
Dim DisTest As Double = 2.5 / 100
Round(DisTest, 2)
modified on Tuesday, November 11, 2008 11:15 AM
|
|
|
|
|
You can use the overload function Round(DisTest, 2, MidpointRounding.AwayFromZero)
|
|
|
|
|
I tried....
Dim DisTest As Double = Me.TermDiscPct / 100
Round(DisTest, 2, MidpointRounding.AwayFromZero)
and it didn't make any difference
|
|
|
|
|
The Round method doesn't change the value that you pass to it, you have to take care of the return value:
DisTest = Round(DisTest, 2, MidpointRounding.AwayFromZero)
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Thanks Guffa, I caught that earlier (stated it further down in the posts).
|
|
|
|
|
Function RoundMyDouble(ByVal r As Double, ByVal places As UInt16)
Dim off As Double = Math.Pow(10, places)
Return CInt(r * off) / off
End Function
|
|
|
|