I am trying to get my 4 port USB relay board to work in VB.net using the COM PORT. I found some code from a poster who has the 16 port USB relay version. When trying his code i can only get it to turn on relays 1-3 all at the same time. The product can be found here: USB 4 port relay
"01+//" - Relay 1 is switched ON "01-//" - Relay 1 is switched OFF "02+//" - Relay 2 is switched ON "02-//" - Relay 2 is switched OFF
So i am confused as to how to separate each relay out with that code above and just be able to turn on any number 1-4 relay on or off independently from each other!
I am trying to get my 4 port USB relay board to work in VB.net using the COM PORT. I found some code from a poster who has the 16 port USB relay version. When trying his code i can only get it to turn on relays 1-3 all at the same time. The product can be found here: USB 4 port relay I was following what the guy in the post was doing to turn his on:
I am trying to capture a tv dvb-s signal via vb.net since a long time now.I have tried to get it work with the Microsoft examples, but no success till yet.I had success with analog tv tuning, but digital tuning is still far away, also I don't find any examples with dvb-s and vb.net or c#.
im new around here and also to VB.NET infact any aspect of programming, im hoping to be able to some useful stuff but at the momment im a little stuck i only have basic knoweldge so anyway here goes im programming in VB.NET 2008 Express edition, im also using inpout32.dll which is running ok and also controlling the parallel port fine.the problem i have is as follows the program so far is controlling the 8 outputs at the momment, i can turn each individual one on but when i try to turn multiple outputs on it will only turn on one and the other that was turned on goes off i understand its controlled in a 255 bit array but how to decode it is a little tough
currently doing a college project called Home Appliances System by using Voice Command.I have done the voice command part and now it comes to the interfacing between PC and relay board part. Currently I'm considering using USB port to send data(to trigger the home application). Does anyone know how to do it with VB.net?
I am trying to write a program to count the total seconds while the user is active (moving his mouse".. I have the following code
' Get the mouse's current position and see if it has moved since last time. private Sub mrCheckMouse_Tick(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles tmrCheckMouse.Tick Static done_before As Boolean Static last_point As POINTAPI Dim cur_point As POINTAPI
' If we have done this before, compare the ' current mouse position to the previous one.
I am trying to calculate a total cost from an elapsed time. Dependant on how long the time is, this will calculate the total cost. It has to be 3 to every hour. The elapsed time is displayed in label6 in "hh:MM:ss" format and the total cost needs to be displayed in label8.
I'm trying to develop a windows form app which will take a screen shot every 30 seconds for about 45 minutes. After 45 minutes, the user will click Finish, and these screenshots will be uploaded to a database. I don't want anything that simulates a PrintScreen key press, because I don't want to alter the users clipboard. The second issue is, for users with multiple screens, I'd like to capture the entire screen image, not just from the primary screen. I'm using Visual Basic .NET 2005.
Is it possible to capture the raw signal from a WiFi card in the same way you can capture the signal from a sound card? (I already found code for working with a sound card and for drawing spectrograms) I'm wondering because it would make a cool radio-type project. I'd prefer a solution that integerates well with .net (VB or C#).My basic goal is to capture the ambient radio waves and build a primative "telescope" of sorts. Using the built in computer hardware is just the easiest way to accomplish this. If you have any other suggestions about how to accomplish this goal in a different way please post it as an answer also.
I have one text box that contains a value for the "Start Time" and another text box that contains a value for the "End Time."Both of the values are expressed in a format for military time (i.e. 1200, 1300, 1430, etc.).When the "End Time" text box loses focus, I would like the "Elasped Time" (expressed in minutes) to appear in a third text box.Seems easy enough...right?Well the problem I'm having is since the first two numbers in military time are base 24 and the last two numbers are base 60, a standard calculation subtracting the "End Time" from the "Start Time" does not yield an accurate result.
Im using the express edition of VB.Net to do my project. I have several threads in my program which run fine. However, im stuck at this problem. I have a button in my form, which if I click I will call ThreadA (works fine), If i keep it pressed for more than 2 sec i need to call ThreadB (doesnt work), and if the time is more than 2 min, i need to stop and send a msg to the user. I have tried the timer to calculate the elapsed time, so the tick function would call the thread. BUT this doesnt work... Im not sure what do to.
display a Decimal (or double) to elapsed time [h]:mm:ss (hours:minutes:seconds)using vb.net?
if you were to type "1.34666666666667" into a cell in Excel then choose Custom Format [h]:mm:ss The result is an elapsed time of "32:19:12". Using the OADate function only runs on a 24 hour clock so this does not work for longer durations unfortunately...
Bit stuck on this one, have seen alot about how to do it just cant seem to get it right. I want to have 2 text boxes with times in them.. at the moment i have them on click events then it just runs a Now for the time and fills the boxes from the system time. But then i want the 3rd box to find the elapsed time from the 2 times in the previous boxes but i just cant seem to figure it out
Bit stuck on this one, have seen alot about how to do it just cant seem to get it right.I want to have 2 text boxes with times in them.. at the moment i have them on click events then it just runs a Now for the time and fills the boxes from the system time.But then i want the 3rd box to find the elapsed time from the 2 times in the previous boxes but i just cant seem to figure it out
I have a very simple StopWatch application in Silverlight. I have the following private properties in my MainPage class: _StopPressed (bool), _TimeStart, _Elapsed (string). I also have a "Start" and "Stop" button. The "Start" button calls a method called UpdateTime that constantly updates _ElapsedTime until _StopPressed is true. When I originally wrote it, UpdateTime would block the UI so I couldn't press the Stop button, so I updated my code to use System.Threading.ThreadPool.QueueUserWorkItem with my UpdateTime method so that it updates _Elapsed on a background thread. That works great at updating the value.However, if I try to set the .Text value of my TextBlock from within UpdateTime(), I get an UnauthorizedAccessException that has to do with one thread accessing the data in another thread.What do I need to do to avoid getting this exception and appropriately update the UI without blocking it?
How long it would take to generate all of the numbers between 1 and X randomly. X=1,000,000 took 6 seconds, and for 10,000,000 took over a minute. Does that sound reasonable?
Experiment stopwatch start count = 0 do while count < x select a random number between 1 and X inclusive have i selected this number before? no-add 1 to count yes - loop stopwatch stop display elapsed time
I made the Do Loop UI un-friendly and ran this from the IDE using CTRL-F5. My PC is 1.8Ghz and has 2GB of memory. I am using VB 2008, .Net 3.5 SP1. Looking for work - Zip 65101 [URL]
I'm creating a multi-threaded application (although it is not at the moment) which will be connecting to a large number of sockets. I've noticed when a connection cannot be made the connect timeout is rather large, so I am trying to make my own. Here is what I have come up with...
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click CreateSockets(2) AssignSockets(0, "192.168.31.2", 80, False, False) 'shouldn't connect AssignSockets(1, "192.168.1.1", 80, False, False) 'should connect
Looking at the timeoutOccured() sub, you can see I'm unsure of how to specify which index to set. Efficiency is important since this will be housing a lot of connections at once. Something else that just came to mind, would .theTimer.Stop reset the tick value on the timer?
This code countdown from 10 seconds to 0 second,then capture image and save to the specific folder,and than countdown to -1,-2,-3 etc,but I don't wont thet count to -1,-2,-3 etc..I would like to do that when it comes to 0 seconds,that the timer countdown again from 10 second countdown to 0 and overvrite the image
What i need to write is i get different signal from PIC16F877A and through serial port, i need to display diffrent text from different signal, Such as: Signal from portB.1 display 1, signal from portb.2 display 2. Between the microcontroller and serial port im using MAX232.
I have three sets of labels, lbl_seconds, lbl_minutes and lbl_hours. These labels have the default value of 00:00 and I want the timer to change that for each label. I have googled this but I cannot seem to find any good info on it. Do I need three separate timers? I have also noticed that the timers have their own tick event handler. I guess it's in this that I need to change the value of the label. But I cannot figure out how to do just that.
I have to write a program that does a count down on the number of seconds you entered in the GUI I have most of the code and it basically has to countdown the seconds i type in the txtStart. Attached is the program design..This is what i have so far with the code. It converts seconds to hours and minutes and seconds, but it doesn't do the countdown.[code]
I'm trying to make a rs232 serial data logging program, that accepts a 12 bit hex RFID tagID from an RFID module. My end objective is to save this RFID tagID into a database and assigned to a person for a personnel management system.I had to use button3 to add the value of the variable 'msg' into textbox1 because I was getting the following error "Cross-thread operation not valid: Control 'TextBox1' accessed from a thread other than the thread it was created on". It is a temporary workaround.When I do press button3, I get the incomplete hex number, instead of "4C00A2C82A0C", I get "A2C82A0C", and sometimes I get random digits like 1,A,C etc etc.
Public Sub OpenPort() Try If SerialPort1.IsOpen Then SerialPort1.Close()
I have a masked textbox (dd/mm/yyyy hh:mm:ss) and a textbox (hh:mm:ss). I want to calculate the difference of them both and put the result in an other masked textbox (dd/mm/yyyy hh:mm:ss).e.g.13/11/1979 10:00:00 - 15:00:00 = 12/11/1979 19:00:00..I already tried Date.FromOADate(CDbl(dec_time) , where dec_time stands for the difference between first and second part of the equation.
I tried Console.WriteLine(Cstr(DateTime.Now)) and it shows the time down to the seconds, ie, "5/26/2009 5:17:02 PM" But, is there an option to show the current time more detailed than seconds, ie, "5/26/2009 5:17:02.xxx PM"
Basically, my app has the main form and a windows form "splash". Let me explain, this "Splash" is a WINDOWS FORM, not a splash form; its just named splash because I want to use it for that reason.In my project settings, my main form is my startup, and the splash form is my splash. This splash form has been coded on a timer for 10 seconds, but when I set the splash form as the splash setting, the form shows up for 1 second and goes to the main form.What I need is to edit the splash setting time from 1 second to x# seconds (preferebly 10)
Searching about kernel32.dll and battery functions in it, I came across some interesting Public BatteryLifeTime As System.UInt32 The full declaration is: Private Declare Auto Function GetSystemPowerStatus Lib "kernel32.dll" ( _ ByRef lpSystemPowerStatus As SYSTEM_POWER_STATUS) _ As Integer Private Structure SYSTEM_POWER_STATUS Public BatteryLifeTime As System.UInt32 What I don't understand is, what measurement do the "BatteryLifeTime As System.UInt32" is in? I mean, is the Battery life Time in seconds or hours.. Or something else, so how can I convert it to something I can use..