Serialport VB2008.net - Input Variable And Output Variable Of This Terminal?
May 14, 2010
I am using vb2008.net express,I test vs2005term it work, can any tell me what is the input variable and output variable of this terminal?how to catch the input and output variable to a textbox1 for sending and a textbox2 for receiving when I press send button? is that possible?
View 1 Replies
ADVERTISEMENT
Feb 1, 2010
I am using vb2008.net express, I test vs2005term it work, can any tell me what is the input variable and output variable of this terminal? how to catch the input and output variable to a textbox1 for sending and a textbox2 for receiving when I press send button? is that possible? I attach the example of my question this is a a good source, but it is not relate to my problem: [url]...
View 1 Replies
Mar 25, 2010
I am getting the error:"Range variable 'sender' hides a variable in an enclosing block or a range variable previously defined in the query expression."for this
Imports System.Data.SqlClient
Imports System.Linq
Public Class Form1
[code]....
I can select any other item from the table without the error. "sender" has the same properties as "receiver" in the SQL table.
View 2 Replies
Mar 11, 2010
where I should declare my variable when using forms and the scope in my test code.
In my code below I have declared variable x in my form1 which can be printed in form2.
But when I create a structure in form1, initialize an array of the type protorec and try to assign values to cards(1).firstname etc... I get a "declartion expected" error.
Why does it work for x but not for cards(x) my array of records?
Public
Class Form1
Public Structure protorec
[Code]....
View 16 Replies
Jul 15, 2009
I want to set a variable as the output of my code, do i do this by using the microsoft.visualbasic namespace? Or will there be another way of doing it? (I have only just learnt about this and i'm still unsure what a namespace actually is) This is what i have so far (i have tried to put it in context):
Next j
Dim indashoneTmp, getWinTemp As Integer
Dim indashone As String[code]....
It is a do loop that is putting calculated values into an xml output file.
View 8 Replies
Mar 18, 2010
For some reason the following code is not giving me all the data I need using the streamreader.
Dim myprocess As New Process
Dim StartInfo As New System.Diagnostics.ProcessStartInfo
Dim strOutput As Stringg?
[code].....
View 2 Replies
Apr 30, 2009
I am trying to create a program that solves the rubiks cube and ive started, I made a program that asks for the variables, now I want to output them using my function writeline(). I am trying to use a for each statement to read and output every variable for each object "face". but I am not sure how to go about it.
Heres the code
Module Module1
Dim Top As New Face
Dim Left As New Face
Dim Front As New Face
Dim Right As New Face
Dim Back As New Face
[Code] .....
View 1 Replies
Aug 23, 2011
I receive the error -
[Code]...
View 10 Replies
Sep 29, 2011
So I created a loop that collects data from the user that runs for a time dictated by the user. It then stores all the data in excel and outputs a graph.The problem I am having is that I cant seem to figure out a way to set the range of the graph for the points taken.since it runs on a loop i have i = i + 1.where the the output into the excel file sequentially writes to the next cell [code]which doesnt seem to work like I would have hoped.Also, there is one other thing that my program keeps doing that I cant seem to figure out.One of the outputs to the excel file is decimal number, it shows perfectly in the textbox, but when I export it to excel it rounds it to the nearest whole number.[code]
View 11 Replies
Mar 16, 2009
I'm using VB2008 and I have ZedGraph on a form. I want the graph control to display the value of a constantly changing variable. How do I do this in code?
View 1 Replies
Nov 27, 2010
Im trying to add a variable that shows amount of tax deducted in a list box among other output variables. If anyone can help I would like to know how to code the lstResults.Items.Add("-$ " & Tax & " Tax") bracket to display the amount of tax deducted from the total salary wages.
Public Class Form1
'Decalirs Variables
Dim Hours As Integer
Dim Overtime As Integer
[code]....
View 3 Replies
Aug 4, 2011
I have a stored procedure that requires a DATETIME variable to display the results in crystal reports. How would I create an input text box and pass the variable to the procedure? Is it even possible to program in vb or C# in crystal reports, or do I need visual studio 2008?
View 1 Replies
Mar 9, 2012
I simply just to declare a variable as a string that is = to the user's input, and I thought that was done by this:
dim xxx as string =("skdlfjaofhhwa")
But it's not working?
View 1 Replies
Feb 18, 2011
Any time I need to store input from a textbox ( ie. "Textbox1.Text" ), I get errors claiming that this is not declared or inaccessible. [Code]. This happens whenever I use Textbox commands.
View 1 Replies
Jun 14, 2011
I've tried to make a program whereby the input affects a variable.
If Label1.Text = "1" Then
store.number1 += 1
End If
[Code]....
I was just wondering if anyone knew of a better way of doing this, as I have to go up to 6 labels, each containing 100 numbers.
View 3 Replies
Apr 12, 2012
Say I've got the following variables:
Public Shared x As String = "100"
Public Shared y As String = "text"
Public Shared z As String = "something"
[Code]....
But this doesn't do what I want, naturally. What I want is that my function giveVar returns the value of the variable that holds giveVar. For example I call giveVar("x") I want my function to return "100".
Of course this can be done by a Select Case but thats not what I like to do. Is it even possible to call a value based on a string?
[edit:]
Namespace i18n
public NotInheritable Class Settings
Public Shared LanguageCode As String
[Code]....
I think this works so far, BUT I get the following error on the CallByName(Me, varName, vbGet) at the Me : "me is only valid within an instance method"
View 5 Replies
Dec 1, 2010
I'm wondering whether its possible to have a function's return type and input arguments as a variable.
For example this function:Private Function MyFunction(ByVal argument1 As VariableType) As VariableType
[Code]...
View 6 Replies
Feb 1, 2010
peoples The User of my application will enter Hexa values in text boxes (00h to FFh). I need to send these values through the serial port, but so that EACH text box with values 00h to FFh ONLY generate ONE transmitted byte, exactly the value placed in the text box.
Just found examples of this application in VB6, using the following command:
MSComm1.Output = (Chr(Val(txtText1.Text)))
In VB2008, you use the component "SerialPort", and one of the methods for transmitting data to the output buffer is "Write". So I did it this way:Dim As Integer ValHex
[Code]...
View 3 Replies
May 18, 2012
Public Class Form1
Dim x, c, number(0 To 19) As Integer
Dim s As Integer
[CODE]...
The variables in the brackets [example] do not actually have brackets in them in the original code. These are where the issues are. For both variables, it says, "The type for variable [variable] will not be inferred because it is bound to a field in an enclosing scope. Either change the name of [variable], or use the fully qualified name (for example, 'Me.[variable]' or 'MyBase.[variable]')." Now, I'm not entirely sure if this is a stupid question or not, as I'm used to VB '98 because that's what we use in my programming class at High School. let me know why this won't work.
-Note: The intention of this program is to continually loop the generation of numbers for this list until I tell it to stop. Button1 ends the program, Button2 generates the list one time only, Button3 is supposed to loop the generation of the list, and Button4 is supposed to end the loop, but not the program.
View 9 Replies
Jan 10, 2011
Say that i have the following code that parse about 20k records from the DB.
Code #1
vb.net While reader.Read()
list.Add(If(Integer.TryParse(reader(0).ToString, 0), Integer.Parse(reader(0).ToString), 0))
End While
And then another code which does the very same thing but it seems to be a little cleaner.
Code #2
vb.net While reader.Read()
Dim storeowner As Integer = 0
Integer.TryParse(reader(0).ToString, storeowner)
list.Add(storeowner)
End While
This is what i am confused about; does the compiler creates a new variable automatically when i use the if statement without strictly declared variable? What approach is better in sense of performance?
View 2 Replies
Aug 24, 2009
I am looking for a good resource on variable naming conventions to illustrate variable type and where variables are declared. So I will have public variables, Private variables, private or local variables. I also may want to declare variables with the same name in different class code (i.e. in the code behind different forms). I am assuming good coding would dicatate a prefix for declaration location.
View 4 Replies
Mar 28, 2011
i have this error in the line of with xl.active......Object variable or With block variable not set.
Dim xl As Object
xl = CreateObject("Excel.Application")
With xl.ActiveSheet.QueryTables.Add(Connection:= _
"TEXT;C:Documents and SettingsUserDesktop429MEDICA2.TXT", _ Destination:=xl.Range("$A$1"))
[code]....
View 4 Replies
May 31, 2012
Now I have the need to get a current value from a bindingsource in a property of a user control.In a previous thread I had tracked down the "Object variable or With block variable not set" to the return in the Get block of a property. At the time I was only using the Set so I just commented out the offending code until I needed it.
[Code]...
The error does not occur during a system compile, only upon saving the container object of the user control. As I said the Set works correctly, only the Get causes the error.I would like to know what I am missing/misunderstanding and am open to other suggestions of handling retrieving the current value of a bindingsource in a user control.
View 2 Replies
Sep 5, 2010
Using Visual Basic 2008 Express. I need to pass a variable to another form. Or else make the variable visible to both forms.
View 4 Replies
Sep 17, 2011
I have the following code that I am using to parse out a test file. I am getting variable conversion error in Sub Main() when I assign file = Read(). The return value of Read() is a TextFieldParser type. How do I assign the proper variable type to "file" so I can write the output to a text file?
Function Read()
Using MyReader As New FileIO.TextFieldParser("C:UsersColinDesktopParse_Me.txt")
Dim currentRow As String
[Code].....
View 3 Replies
Apr 5, 2010
i'm using the AppendText(serialPort.ReadExisting) method of the SerialPort class. i'm sending to the serial port a 12 byte frame. however in the TextBox control streams printed seem choppy as if the ReadExisting method is exiting too quick to grab all 12 bytes so i can display them at once.
View 3 Replies
Mar 19, 2009
I have the following code but I get blue squiggly line in cnn and when i point my mouse pointer on it i see this message "Variable 'cnn' hides a variable in an enclosing block"
Private Sub BtnLockUnlock_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnLockUnlock.Click
Dim IsLocked As Boolean = FpSpread1.ActiveSheet.DefaultStyle.Locked
[code].....
View 3 Replies
Feb 1, 2012
I have the following code passing a dataView variable to a function and I am getting the following warning:"Variable 'cl' is passed by reference before it has been assigned a value. A null reference exception could result at runtime."
Function Editclass()
Dim cl As DataView
Bindclass (SqlConnection2, cl)
[code].....
View 1 Replies
Sep 26, 2011
i had a class called Tag with a structure like:
public class Tag
private _members
public properties
public shared database_methods
end class
this class was tailored for mysql database. i'm currently adding access 2007 support so i split tag into tag and tagdata with structures like:
[Code]...
View 2 Replies
Apr 25, 2012
I'm having trouble tracking down what is wrong and causing the above error. This only occurs when saving the design view in VS 2012. The code builds and runs fine.Full error text:Code generation for property 'CompanyValue' failed. Error was: 'Property accessor 'CompanyValue' on object 'ContactViewUC1' threw the following exception: 'Object variable or With block variable not set."
CompanyValue definition in ContactViewUC:
Public Property CompanyValue
Get
[code].....
View 6 Replies