Hello everyone,
I am writing a program which communicates with a device(Energy Meter) via com port of my computer. I am using a RS232/RS485 converter. Because the device that I want to communicate with only supports RS485 communication media.
I have two different brand of converters
1) Moxa...
Hi,
I am using Listview control on my project. I add items to the listview control cyclically. I mean I fill the listview with values and then after a time period I refill the listview with the new values. I do it with the code below. But everytime I refill listview it flickers. For example I...
Hi,
I am using System.IO.Ports.SerialPort to communicate with a device. I sent a command to the device then it sends reply to this command. I get the reply from device using DataReceived event of the serialport object. But reply comes with two parts (not everytime but sometimes it comes with...
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.
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...
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...
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...
Hi!
I am new at vb.net
I am trying to use contextmenustrip.My code is:
Private Sub Panel1_MouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Panel1.MouseClick
ContextMenuStrip1.Show()
End Sub
When I click on the panel,ContextMenustrip...
Hi!
Following code convert ascii desimal data to desimal data
char ascii_array[10]="65535";
unsigned short int datax;
sscanf(ascii_array,"%u",&datax);
result is: datax->65535
-----------------------------------------
char ascii_array[10]="65536";
unsigned short int datax...
Hi!
char ascii[13];
short int datax;
datax=10;
sprintf(ascii,"%6d",datax);
result is: ascii-> " 10"
Is there any way to convert int data to binary array.I mean,
short int datax;
datax=10;
function(ascii,datax);
result is: ascii->"0000000000001010"
Thanks in advice
char asciihex[5];
short int datax=10;
sprintf(asciihex,"%4X",datax);
As you know, result of this code is : " A"
Is there any function to reverse this operation.I mean,
asciihex[5]=" A";
datax=function(asciihex);
result is :datax=10
Thanks in advice...
Hi
I have a batch file (compile.bat).It works correctly.
But I want to run this bat file using VB.
cmd = Shell(App.Path & "\C51\BIN\compile.bat")
I tried the code you can see above, it can run the batch file,but the batch file doesnt work correctly.
When I double click on batch file it works...
Hi!
I have a label control.The DimensionS of label control are
height=480 and
width=384 for per letter.I mean that the height of the label control is fixed but width of the label control can change.go as follows
label1.width=len(label1.caption)*384
But depending of the font I have...
Hi!
I created a specific file using file system object
Set tstream = FSys.CreateTextFile("C:\selim.svr", True)
The extension of my file is *.svr.But this file hasn't any icon.I want to assign a icon to this file.Has anyone tried this job?
Thanks in advice.
Hi
I am trying to copy a file to an another folder
Dim FSys As New Scripting.FileSystemObject
FSys.CopyFile CommonDialog1.FileName, App.Path & "\pics\pattern", True
But it gives an error
Run time error '70'
Permission denied
I couldn't find what is the problem
Thanks in advice...
Hi!
I have a problem with mschart.I didn't know whether there is a solution about this problem.
For i = 1 To 30
MSChart1.Column = 1
MSChart1.Row = i
MSChart1.Data = fifo(i)
Next i
Yes,it works,but when new values are transfered to data property of mschart,mschart...
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.