'Declare variable
Dim dteResults As Date
'Get the current date and time
dteResults = Now
MessageBox.Show("Modified: " & dteResults.ToString("dd / MM / yyyy"), "Date Demo")
...Sub DataReceivedEventHandler(ByVal sender As Object, ByVal e As IO.Ports.SerialDataReceivedEventArgs) Handles objSerialPort.DataReceived
'**************************************
Dim spTemp As SerialPort = CType(sender, SerialPort)
Do While (spTemp.BytesToRead > 0)...
...listview. I checked items.count property and it says count=30.
Instead of this I changed the code which was post with the code below
'******************************
Dim intIndex As UInt16 = 0
'******************************
'lvwDisplayData.BeginUpdate()...
The problem with my code is listview.items.clear()
I have created a form that uses ListView. How do I clear the contents of the listview so that I can update the data?
If I use clear keyword this causes strange behaviour I mentioned before.
Dear ousoonerjoe ,
I applied your suggestion on my code, but unfortunately it didn't work.
On the web I found same thread, they said DoubleBuffered solved this issue, but I don't know how to apply it on my code.
...scrollbar of listview down and when it flickers, scrollbar goes up to its default position.
The procedure below is called cyclically
'******************************
Dim intIndex As UInt16 = intStartingAddress
'******************************
'Clear Listview...
When I put a breakpoint at Do While and wait for a second,
everthing works fine. I think I need a wait function to wait on that position for a while.
Do While (InputBuffer = Nothing)
Application.DoEvents()
Loop
...code ignore the second part. Below is my code
Private InputBuffer As String = Nothing
Private Function ReceiveSerialData() As String
'**************************************
Dim strReturn As String = String.Empty
'**************************************
If...
Hi,
I have a variable named x and it has a value in hexadecimal format but type of x is string.
Dim x as String
x="AF"
I want to convert this string (actually hex) to binary equivalent. Like this
x="10101111"
is there any function in .Net to do this convertion?
Thanks in advance.
Yes, ETG100 is a device from Schneider Electric. I did the cable again , complied standard color coding and it is working now. So, when I use pairs the cable start working properly.
Thanks for help
Link lights at both ends are lit, but I used Straight Ethernet Cable. Should I have used Crossover cable? By the way I didn't care color codes.
You said: If you do not use pairs, 'link' can work, it is DC, but AC-like data may fail.
What is DC and AC?
Thanks...
Hi!
I have a device (named ETG100) which has an Ethernet port and it is connected to my PC through a Ethernet switch. When I ping the IP address of the ETG100, ETG100 relies. So everything is ok. But if I put my ETG100 to a different place where almost 30 m far from Ethernet switch and use...
If you have a look, these are not same.
The result of thread222-1456934: String - Float Conversion
is number , but for this one the result must be consist of numbers as well as variable(z)
Hi!
I have a string which consists of a numbers and a variable(z).
Like this,
“2*(z^(-1))*3*(z^(-1))”
The result must be as follows,
“6*(z^(-2))”
Is there any way to do this in vb.
Thanks in advice
Hi!
I have a string(a) which consists of a number(5) and a variable(z). I replace z with 2 using replace function.
and I want to get 7 as result(x). Is there any function to get right result.
Dim a As String
Dim x As Long
a = "(z + 5)"
a = Replace(a, "z", "2")
x = Val(a)
Thanks..
Hi!
I need to connect a remote computer using web, because in this way i will be able to connect to the network of this remote computer. In this network there are some devices which has an ethernet port and a program in them.When i accomplish to connect to this remote computer i will be able to...
Hi
For a project I am working on,I need use a specific font file.I copied this font file to windows fonts folder using this code.
FSys.CopyFile App.Path & "\FUTRFW.TTF", "C:\WINDOWS\Fonts\", False
But when I open my project I see my text is on default font, not on the font I copied.
When I...
Use double data type
Double - 8 bytes
-1.79769313486231570E+308 to -4.94065645841246544E-324 (negative values)
4.94065645841246544E-324 to 1.79769313486231570E+308 (positive values)
Hi
I am trying read data from serialport.
The data comes correctly to my Buffer variable,but
in that code (TextBox2.Text = Buffer) vb gives an error.
error is:Cross-thread operation not valid: Control 'TextBox2' accessed from a thread other than the thread it was created on.
How can I get rid...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.