Write An Application That Communicates With A Digi Watchport/D Sensor?
Jul 18, 2009
I am using Visual Basic Express 2008 to write an application that communicates with a Digi Watchport/D sensor. This is an IR sensor and I checked the manual for the commands to send to it. In order to get the distance, it say to send the sensor the command D<CR>. Here is my code so far...
Option Explicit On
Option Strict On
Imports System.IO.Ports
Public Class Form1
[Code]...
Every time when i click the button, I get the timeout exception error message.
View 1 Replies
ADVERTISEMENT
Aug 23, 2009
I am trying to write an app that communicates with a server that was written in C. Not knowing C at all so i have some problems understanding the messages in c-style struct format that i need to send from the vb.net side.
[Code]...
View 3 Replies
Nov 9, 2011
I Have a problem with vb.net. Basically I created an application that communicates via system.net.socket. on the server side of client connect, and a thread checks whether there are new incoming data. if there are data, puts them in a few tread declared variables, together with the "index" of the server. once this is done through "INVOKE" calls a routine that checks the incoming data andperforms an operation based on the data. I'll see what I do not work
Dim returndata As String = System.Text.Encoding.ASCII.GetString(data)
TextBox1.Text = ("DATA : " & returndata & "Socketindex =" & socketindex.ToString & " Index=" & index.ToString)
But that does not appear in the texbox, appears only "returndata", the rest c 'is same thing with the messagebox, individually, can display a messagebox with variable,but when I try to make a messagebox that displays them together, the texbox same thing!
And the same thing if I want to compare them with each other, for example
if index
= 0 then msgbox ("OK")
It does not work ...
View 2 Replies
Oct 12, 2010
I'm not sure if this is where I should post as to this is my first time on these forums. But, I am creating something that communicates to a server, and on the server part it's giving me troubles, and I am confused on how to fix it. I did rip the code off some where online.The line that I am getting the error "Warning2'Public Sub New(port As Integer)' is obsolete: 'This method has been deprecated. Please use TcpListener(IPAddress localaddr, int port) instead.[URL].. on is this line:
Dim tcpListener As New TcpListener(portNumber)
Imports System.Net.Sockets
Imports System.Text
Module Module1
[Code]...
View 1 Replies
Feb 24, 2012
I am hoping to get some advice on a project that I am wanting to work on. I have never done a web service/windows service or anything along the lines of what I am thinking so I would like some advice from some more experienced developers.I will be using VS2008 and VB.NET. My company currently mostly works in .NET 2.0 for our commercial application, but since this will be used mostly in house I would be able to use .NET 3.5 if suggested (am just not overly familiar with the additional features in .NET 3.5).What I would like is to have a server/service that communicates with multiple PCs. I want to create an application/web page (not familiar with web development so would probably start out as a winform app and possibly move to a web app to consume the service) that would query the web service/remoting service/whatever to retrieve information from each of the PCs (track the version of the application that is running, retrieve log files, push an update program to the PC (to be run manually)).
Not being too familiar with this type of scenario I was thinking something to the effect of:Each PC run a Windows Service that monitored the local PC. When something changes (software update installed?), tell the web service that the new version is installed.A service (web service? remoting server? other?) running on a PC that would be the interface to the windows service (not sure how the web service would talk to the Windows service without the Windows service initiating, though, unless it is also running a server) on the individual PCs. The service could request an update from the PCs (get the software version, request a file). The service would also be able to push an update program to the PCs to be run manually.
View 2 Replies
Dec 19, 2008
Basically, I have an app that communicates with a server. I need a way to monitor all the sent and received packets that are being transmitted through the app. I've been killing myself the past two days trying to figure a way to hook into ws2_32.dll to monitor these packets but I can't find a way!
View 2 Replies
Jun 5, 2009
I want to make a program that can communicate with other programs, Like a tcpserver/client.But i don't know where to start. I want the user to be able to submit several urls to pictures on the internet and for other users to be able to view those pictures. How can I do this?
View 1 Replies
Dec 7, 2011
How to access VB functions using C#? I am trying to create an interface for a sensor, whose files are given in VB format. How can i access themm and consequently make changes in the same?Ok! sorry for incomplete info. The files i have are .vbp and .frm format. I am trying to create a Form file(interface, with buttons etc.) using Microsoft Visual Studio2008, which has a included wrapper to combine C++ and C# and has console application. Now how do i call the .vbp files and to furthur work on the interface?
View 1 Replies
Apr 1, 2009
I am looking to create a VB 2008 Express programme which converts a data stream from a picoscope muscle sensor into a power output board which controls a mechanism.
In simple terms when the Muscle sensor reaches a value of 0.8 V or higher I want the programme to send a text file to the power output control programme, and likewise when the sensor is below 0.2 V I want the power to be zero.[code]...
View 3 Replies
Jan 15, 2010
I'm trying to get my hands on my ThinkPad T500 tilt sensor data.So the (unfinished, but works (i'll get three values, state,x and y)) code is:
Public Class Form1
Private Structure AccelData
Dim stat As Integer
Dim x As Short
[code]....
With debug.print I'll get the correct information, but as soon as I try to insert the outcomes to label.text I'll get error:
Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
So, how can I pull the information from dll to label text?how to use the sensor.dll to extract information?
View 1 Replies
Jul 28, 2009
I am using Telnet in VB to read a temperature and RH sensor. I don't know that the data is the exact same length every time. I have pasted the code below. This code does get the data back. I have also pasted the unparsed and parsed data as well.... Sometimes I get more or less data than the time before and I think this is because I am not reading the entire buffer. How can I make this code run a little better so that I can get the proper data every time? Below the code is a sample of several readings. You can see how I get bad data periodically.
Unparsed
" 24.4155 45.2235 11.7921 200.9005 45.2372 45.2235 -42.0242"
Parsed (replaced " " with , and then " " with ,)
[Code].....
View 2 Replies
May 3, 2009
I have been searching everywhere to figure out how to access the G-Sensor/Accelerometer in my HTC Touch Pro and other like devices. I've already created a number of app's for windows mobile but now I'd like to add some more customizations into my app's. I don't mind installing 3rd party app's but I'd like to add the same fuctionality into my own apps with regaurds to the G-Sensor/Accelerometer funtions. I got a hold of some code(Rhaakmeester)...
[code]...
This code helped a bit but only detects the change after a 3rd party app has already changed the screen orientation or if the KB was slid out. How do I access the G-Sensor data myself.
View 2 Replies
Nov 6, 2009
I'm new at VB therefore i need some guidance on how to go about doing e current project that i have. Currently doing on Light Sensor and Audio Announcement.
[Code]...
View 5 Replies
Sep 22, 2011
How is it possible to read the value of the sonar-sensor of my NXT through Bluetooth (and Visual Basic 2010)?
View 3 Replies
Jul 13, 2010
In my application, I've built an object that communicates with an OPC server and whenever the value of a certain OPC item changes, it logs all the OPC items to a database. This all works beautifully. However, I'm having a problem with disposing of the instances of this class. Whenever I want to remove an instance of this class from the application, I'm dereferencing the object (objDevice = Nothing) and letting GC take care of the rest. I've inserted breakpoints and am monitoring to ensure that the object is dereferenced (it is).
Problem is, even after the object has been dereferenced and is CONFIRMED to be equal to Nothing, the object is still logging data to the database. I'm still trying to get a handle on disposing of objects properly, but most everything I read tells me to dereference and let Garbage Collection take over.
View 5 Replies
Mar 21, 2010
measure distance using serial port (sensor)?
View 1 Replies
Apr 1, 2009
I am looking to create a VB 2008 Express program which converts a data stream from a picoscope muscle sensor into a power output board which controls a mechanism. In simple terms when the Muscle sensor reaches a value of 0.8 V or higher I want the programme to send a text file to the power output control programme, and likewise when the sensor is below 0.2 V I want the power to be zero.
So 0.8 V > = send text file (0O=100%)
0.2 V < = send text file (0O=0%)
so when muscles being senced move the device turns on and off. I think I am successfully getting the data stream from the Picoscope which is plugged in the usb. I am using codes and examples that the programming guide for the device provided. [Code] I just need to now how to get the data to be displayed or how to tell the programme to do something with the data. The device also came with an example of how it can record data to an excel sheet if anyone needs the code to gain a better understanding.
View 20 Replies
Oct 21, 2011
Is there a way to detect the motion sensor in the hard disk with visual basic .net?I know that hard discs has an acceleration sensor to turn the hard disk off when the computer falls from a height.I have seen one example of this in a game using this sensor.I want to detect the sensor so that my security program can alarm and email me if lets say someone nocks my computer to the floor while im gone.
View 1 Replies
Apr 1, 2003
I need to write multilingual application (two languages). That's means labels, buttons and other objects on forms display in language which user can select. This n-tier (3-tier) application with central database on remote machine.
View 15 Replies
Mar 4, 2012
I am currently trying to write an application that uses more than one thuread, but I have little experience of this and the more I read about it, the more confusing it is.I currently have one main prog (StartupForm) that has 3 items defined as tool Strip items io the menu. Upon selecting each item, it runs the relevant Click subroutine.
What I am trying to do is within each subroutine, getting it to launch a additional form (option1Form, Option2Form & Option3Form all running under running under ew threads and independent from the original programme. Hence when the original programme is busy, the sub forms are running their own code quite happily. The only interaction I require is that the Main Programme (startupForm) Updates an array. Which the the new thread / form can read. Can this be doe some how Byref
View 32 Replies
Jan 21, 2010
I've written a menu for a console application. It has three items. I want to keep the menu displaying until I press 3. How can I do that. My code below -
Sub Main()
Dim intInput As Integer = 0
Console.WriteLine("")
Console.WriteLine("Main Menu")
[code]....
View 4 Replies
Jun 10, 2011
using VB 2010 ,I would like to write an application that captures snapshots from my laptop webcam ,and save it.
View 2 Replies
Nov 20, 2008
I am looking for some API or OCX or any other method to copy the existing file from Hard disk to the USB storage device.for that i would have to perform the following checks :
1> Check for the plugged in USB devices.
2> Find out for the available space(2GB) on each.
3> Prompting a message to user on which drive he would like to write that movie file.(As At a time i want to give only 1 disk write only.
4> after selecting the Drive, and pressing OK, i just want to copy the selected file from HDD to that Device.
Now For achieving this , i just need a reference of any Available API or OCX or any other method available in VB.net?
View 2 Replies
Nov 3, 2009
Is it possible to write to an access database that is an MDE, from a .net application?
View 2 Replies
Jul 13, 2011
I bet someone already asked this but i cant seem to find it. Ok i need is a global settings that can be updated which will affect all users. I was using xml files in the program filestill now and I need to get around using this because the files can be delete or over written incorrectly. I started using the settings option and realized application level is read only and i cannot use user scope because then it wont be global settings. Is there an alternative to this.
View 5 Replies
Apr 4, 2007
I understand that I cannot use the System.Console to output information from a Windows Forms application because the standard input, output, and error streams are not run through the console in winforms apps. But I can't seem to find any documentation on where the standard input, output, and error streams are being directed to! Basically, I have a winforms app that accepts command line arguments and can be run in batch mode, however, I just want to direct some feedback to the user based on whatever method they're accessing the program. The app is used to redirect a client-server application from one server to another. In some instances, the user does it by hand (with a mouse), and other times they're doing it in batch mode (using SAS, command shell, VBScript, etc...). In those instances, I'd prefer NOT to use MessageBoxes because it will kill any processing they're doing.
View 6 Replies
Jan 30, 2010
I'm trying to get my application to read to and write from an Access database. I am running Windows 7 x64.
If I disable UAC, I don't the error. If I have UAC enabled, then the error occurs. Here is a screen shot of the error:
View 6 Replies
Feb 16, 2011
VS2010 VB.Net Windows Form (not WPF). Any Hello World level example for printing the text within a multi-line text box they can post? Ditto for a print preview? I need to write a simple envelope printing app and I need a good base to build upon.
View 3 Replies
Apr 26, 2010
I am proficient in Visual Basic, but I think I need to use .net and move with the times to achieve what I want.I am trying to write an application which extracts text from documents (.doc, .pdf, .xls etc. etc) using IFilter.I have found a very good example application in C# (Using IFilter in C# - CodeProject) which does what I want, but I am really struggling with C#.Does anybody know if there is a way to achieve the same results (i.e. extracting text from documents using IFilter) in VB?I have found a few examples on the web which do not seem to explain much - most examples I see are in C#.
View 5 Replies
Jan 11, 2011
i am in a middle of a crucial job and i needed to add a printing code that will be able to print records in a database. what do i do, someone should please help. your assistance is highly welcomed
View 2 Replies