Serial Program Hangs After Short Time

Sep 9, 2011

I'm writing a simple program to retrieve data via the Serial Port. I have a piece of hardware that returns its 14 byte status every time vbCr is written to it. The program works fine except after a few hundred requests the program begins to hang, off and on. Some times for a second some times for longer. I need to update every 25 milliseconds so the hanging sets in quickly. This faster the interval the quicker the problem sets in but no mater how long the interval the problem eventually starts.[code]...

View 8 Replies


ADVERTISEMENT

Program Hangs When Closing Serial Port?

Feb 15, 2009

I have a VB.Net 2008 app that I have converted from VB6 which reads data from a weight scale connected to a serial port. I am able to read the received data and display it on the screen, but when I go to Stop the reading and attempt to close the serial port, the app hangs.

Private Delegate Sub ShowWeight(ByVal tWeight As String)
Private Sub comScale_DataReceived(ByVal sender As Object, ByVal e
As System.IO.Ports.SerialDataReceivedEventArgs) Handles

[Code]....

View 10 Replies

SqlDependency Hangs When Setting Up Second Time?

Nov 8, 2010

What I am trying to do is allow for my objects to know when their data has changed on the database (so they are able to raise an event to let the user of the object know about the change).After following several tutorials on how to get SqlDependency working, I have finally managed to get it to let me know when something changes (although it also appears to let me know when I make the initial connection to it too, but that isn't a problem as I can work around that).The function that I have which sets up the SqlDependency is;

Public Function getMembers() As List(Of User)
Dim conn As New SqlConnection(_connectionString)
Dim sql As String = "SELECT UserGroupUserID, UserID, GroupID FROM dbo.xtblUserGroupUsers

[code].....

View 9 Replies

Convert Short Time To UInteger Format

Feb 25, 2010

How can I convert a Short Time to an Unsigned Integer?

View 1 Replies

VS 2008 DataGridView Format To Short Time?

Jul 25, 2009

My stored procedure covert two integer column Hours and Minutes to varchar data type and after concatenation the result looks like HH:MM (1:05).In DGV form I have problem to display same values. The EmpTime column is dispay time like (1:5). The column's coding is:Me.DataGridView.Columns("EmpTime").DefaultCellStyle.Format = "HH:mm".

View 2 Replies

Asp.net - Website Hangs For A Long Time Then Displays Nothing

Mar 10, 2009

Occasionally, my website will stop functioning and anytime an ASP page is accessed, the browser will hang for many minutes before bringing up a correctly formatted HTML page with nothing in the tag. It seems to happen whenever more than one person attempts to access an ASP page, but I'm not positive it's isolated to those conditions.

Let me emphasize that the issue does not arise when accessing directories/HTML pages/other files. Only ASP pages are the problem. I am using lunarpages as a host.

View 1 Replies

Macro For Game - Long Spells In Short Time

Apr 19, 2011

I'm trying to make a macro for a game, so I use long spells in a shorter amount of time. I'm having trouble with a lot of things. For starters I get the when I start the programs timer: "A call to PInvoke function". (I'm calling it a hack, but it's not a hack because it doesn't hook into memory addresses, only sends keys when the correct combo are pressed)

Option Strict On
Public Class Form1
Private Property hEnabled As Boolean
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vkey As Long) As IntegerPrivate Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If (hEnabled = False) Then
[Code] .....

View 5 Replies

VS 2008 Count A Large Amount Numbers In Short Time?

Nov 23, 2010

I need to count a large amount numbers in short time.As a result the CPU jumps to 40-60% on 4-core PC.Which is extremely high.I have any idea that will lock up the thread for some time, but not actually slow or reduce the amount of files that are allowed to be counted per a giving time period.

Vb.net
Application.DoEvents()
Threading.Thread.Sleep(1000)

View 9 Replies

Messagebox Hangs Program?

Mar 30, 2009

The messagebox shows properly but will not respond to mouse click and every is halted.. Comment out the messagebox event everything proceeds. No error is generated, things jest stop at themessagebox and willnot proceed. Code as follows:

[code]...

View 2 Replies

Program Hangs On Loop

Jul 25, 2011

my program seems to just freeze whenever I press this button. I need to be able to use this because I'm reading values from a joystick as i'm making a human interface device.

Why is this freezing?[CODE...]

View 3 Replies

Program Hangs For A Few Seconds Before Closing

Mar 23, 2010

When I close my compiled application, it will always hang for a few seconds before closing. It isn't something to do with my PC, I've got a quad core with 4GB of RAM -[code]...

View 4 Replies

Program Hangs When Fonts Are Changed?

Apr 12, 2011

I have a strange problem that I can't seem to find any answers on. I wrote two programs in VB2010. Both work great, install and uninstall no problem and I have done this on 4-5 PC's and laptops, all running Win7. A friend saw them and asked if he could use the programs, but when he installed them neither of them would work. All the prereq's were there and he is also running Win7. For some reason all of a sudden his enlarged font reset itself and VIOLA! both programs started working. I have retested this and it fails/works every time.

So my question is, how do I fix this or is it fixable? Is there somewhere in VB where this has to be set to be 'flexible'??

View 8 Replies

VS 2010 Program Hangs In Vista?

Aug 4, 2010

I have a heavily timer tick driven application that seems to randomly just stop on vista/w7 while minimized, sometimes it goes on for hours sometimes just minutes but the end result is same just stops for no apparent reason, the moment i unminimize it it keeps going. This never happens on xp tho where it works perfectly so what might be the problem?

View 1 Replies

Freer Use Program Short-cuts / Hotlinks

Mar 11, 2011

I am trying to make it so that my form application can have hot links to any other program on your computer by simply having the user input the target path of the program and also save that so the user does not have to do it all over again every time.

View 14 Replies

Write A Short Program - Structure The Code?

Feb 2, 2009

I'm trying to write a short program to for work but I'm not quite sure how to structure the code. This is what I currently have;[v
I'm pity sure this is majority the wrong way to structure it as at crashes with the IF/ELSE field going up to around 50000, but it does work (if a little sluggishly) when set to 5000.[code].....

View 13 Replies

VS 2010 Program Hangs On Client Computers?

May 5, 2011

I've created a multithreaded application that copies data from one directory to another, and I'm having trouble getting it to work properly on clients' computers. All computers running the software have Windows 7 and the .NET Framework 4.0 Client Profile installed, which is what I've compiled the program for. I have two threads: one does the actual copying, and the other updates the UI on the program. Whenever I run the program on my computer, even if I'm copying 45 GB, for example, it runs fine. However, if I run it on another computer, it will sometimes freeze the entire computer, so then I have to manually shut the computer down in order to use it again. I have been trying to find out why this occurs, but I cannot. Does anyone think he/she can provide me with some ideas as to why this happens and how I can prevent it from occurring?

View 4 Replies

Acrobat Hangs After User Manually Exits Program

Jun 4, 2012

I'm currently having an issue with VB.Net and Adobe Acrobat. The issue comes from exiting Acrobat but the Windows Taskbar still states that there is an Acrobat.exe process open. I have tried using Marshal.ReleaseComObject(), but it still hangs there. I do not want to have to rely on the "End Process" option on the Task bar in order to remove it.

Below is a snippet of the code that I am try to using:
Try
'Tries To Close Acrobat Application
acrobatApp.Exit()
System.Runtime.InteropServices.Marshal.ReleaseComObject(javaScriptObj)
[Code] .....

Although I am not sure if this could be a problem - I run a javascript saveAs script on the Acrobat side in order to make a copy of the file. This also could be a reason why it is hanging, but I ruled it out based on basic knowledge of saving files and exiting from other Acrobat/Microsoft Programs. Acrobat only closes when my application ends. (Currently) I am trying to make it consider the case if a user manually closes the Acrobat application.

View 1 Replies

Program Hangs During Debugging At A Breakpont Set At A Subroutine Call

Jul 5, 2009

My program hangs during debugging at a breakpont set at a subroutine call. It hangs on breakpoints anywhere inside the subroutine also. But does not hang otherwise at other locations where I have set breakpoints.

[Code]...

View 4 Replies

Program Hangs After Leaving Screen Saver Or Locking Computer?

Nov 15, 2011

Our program works fine, until someone locks the computer or the screen-saver pops up (but not ctrl+alt+delete). Once the computer is unlocked/the screen saver is closed, the application stops drawing everything except the title bar, and stops responding to input - it displays a mostly-white window which can't be moved or closed.(Example of application freezing - the mountains are from my desktop background)If we let it sit for about 5~10 minutes, it comes back to life, and doesn't hang again (even after locking the computer/screen saver popup) until the application is restarted.

View 9 Replies

Speed Up Algorithm - Sieve Of Eratosthenes - Program Hangs On Really Large Values Of N (try 10 Million)

Aug 17, 2009

I've written an algorithm that I believe to be correct for computing prime numbers up to n with the Sieve of Eratosthenes. Unfortunately, this program hangs on really large values of n (try 10 million). Here is what I've written...

Protected Function Eratosthenes(ByVal n As Integer) As String
Dim maxValue As Integer = Math.Sqrt(n)
Dim values As Generic.List(Of Integer) = New Generic.List(Of Integer)

[code]...

How might I speed this algorithm up? Where are my bottlenecks?

View 12 Replies

Make A Program With First Form To Enter The Serial If Correct Just Continue To Form2 If Incorrect Just A Popup Say Like "Serial Incorrect"?

Aug 13, 2010

i just want to make a program with first form to enter the serial if correct just continue to form2 if incorrect just a popup say like "Serial Incorrect" how i can make it ?

View 2 Replies

PhpMyAdmin MySql Database - Program Hangs In The For Loop Before The Variables Are Assigned Values From The Data Table

Jan 5, 2012

I am using vb.net with phpMyAdmin MySql database. While running the piece of code below, the program hangs in the for loop before the variables are assigned values from the data table(dt)...

'Check for appraisal period-----------------------------------------------------------------------
Dim sqlCheckDate As String = "SELECT * FROM tblappraisalsetting where appSetID=(select max(appSetID) from tblappraisalsetting);"

[CODE]................

View 1 Replies

Add Serial Key On 2005 Setup At Installation Time?

May 14, 2009

How can i add serial key at the time of installation when i install vb.net 2005 setup on any system like windows to proceeed installation you must enter the related serial key.

View 4 Replies

Read Data From Two Serial Ports At Same Time?

Aug 8, 2009

I am still new in programming. I am an electrical engineer. I have to read the time from GPS from one serial port apend this time to a data got from other device serially.

View 1 Replies

VS 2008 - Using Excel Serial Time Values

Aug 31, 2009

I have a bunch of serial time values, like these:

0,475694444444444
0,463888888888889
0,54375
0,584027777777777

Is there a function in vb.NET that can convert these values to hh:mm:ss, or something more readable than those values?

View 4 Replies

.NET And Displaying Real-time Received Serial Data On GUI?

May 24, 2010

I'm having a bit of an issue receiving a stream of serial data and displaying the data real-time in my GUI. I am fairly new to VB.Here's what I'm trying to achieve: I have an I2C device (bank of LED's) connected to my Arduino. Using the VB.NET (2010) GUI I request which LED I want on (via buttons) and the I2C device then sends a reply confirming which LED actually turned on (basic feedback). Ok, sounds great right? Here's where I get issues. Well when I try to read the serial data sent to VB and display the real-time stream on the GUI, a) I get a bit of a mess as an output (values are ok, just spewn across GUI) and b) when I select a new LED to turn on, the GUI data does not refresh to this change. The stream being sent from the Arduino is ok, I looked at the data in a serial monitor.

[Code]...

View 2 Replies

VS 2010 Displaying Real-time Serial Data In GUI?

May 24, 2010

connected to my Arduino. Using the VB.NET (2010) GUI I request which LED I want on (via buttons) and the I2C device then sends a reply confirming which LED actually turned on (basic feedback). Ok, sounds great right? Here's where I get issues. Well when I try to read the serial data sent to VB and display the real-time stream on the GUI, a) I get a bit of a mess as an output (values are ok, just spewn across GUI) and b) when I select a new LED to turn on, the GUI data does not refresh to this change. The stream being sent from the Arduino is ok, I looked at the data in a serial monitor.

Public Class Form1
Dim ticktock As Integer
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles

[code].....

View 4 Replies

Create A Serial Key/number For Program?

May 18, 2011

i am making a program in visual basic 2008 and when the program first starts up on acomputer/device i want it to come up with a screen that asks for a serial key. i also only want the serial key (that i give to the person i am giving the program to) to be accepted once.eg. if he copies the program and gives it to another person who takes it home, they have to enter a new one (that i would have to give them). if they enter the same key as person 1, i want to deny access.

View 4 Replies

Make A Serial Code For My Program?

Jul 24, 2010

I am having my app available for 30days free trial, but after that you have to purchase a serial, how can i make my app only recognize a specific type e.g NumberLetterLetterNumberLetterLetterNumberNumber-NumberLetter-Letter:NumberNumberNumberNumber?

OR what would be the easiest way to have serials recognised?

View 8 Replies

Make Program Have To Enter A Serial?

May 17, 2012

im wanting to make my program have to enter a serial and you dont have to enter anymore (Only once) if you want the full version, i have some code here, but i cant seem to get it to work properly, this is the last piece i have to do and its finished.

Code:
Private Sub KryptonButton1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles KryptonButton1.Click
If KryptonTextBox1.Text = "" Then

[Code]....

View 6 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved