Visual Basic/VB >> Circular problem with receiving data from another app

by matt » Thu, 02 Oct 2003 23:13:10 GMT

I have a field in the farpoint grid that is called Quantity. I fill
it from the database when the form first opens. The user can type a
number into this field if they want, or they can use a digitizer to
calculate a value that is then "returned" to my program, in the active
control. This works. However, I have a problem in that the value
returned from the digitizer needs to ADD to whatever was already in
the field. The digitizer clears out what was already in the field, so
I must hold onto the "original" quantity, then add what the digitizer
sends me.

Therein lies the problem. I don't know all the time what the
"original" quantity should be. Initially when I load the form, it's
easy -- it's the same as the current quantity. However, if they type
in 0 or 555 into the quantity field, I SHOULD update the original
quantity variable. But, when the digitizer sends me the new quantity
(to add to the original) it first clears out the field, sending
numlock, 0, numlock, numlock, value (sent as individual characters
just like the others of course), F9, numlock. Where I'm hitting
problems is the 0 in the 2nd character that the digitizer sends to me.
I can't distinguish between a USER specified "I want to put 0 in this
quantity" vs. the digitizer "I'm sending 0, well, I'm not sure why but
I'm going to anyway". If I update the original quantity variable to
mirror the quantity field on the keyup event, I will replace what is
already there with a 0 when the digitizer sends. So, if I ignore a 0
entry, then the user can't 0 it out for himself.

Can anyone see a solution to this dilemma? Did I explain it well
enough?

Thanks for any and all responses.

Matt


Similar Threads

1. Client App No Longer Receives data

I have a client and server application connected via asynchronous sockets. 
The connection works perfectly almost. If I open a particular secondary form 
and then close it I no longer receive data on the socket. I can still send 
data without a problem. I have turned on socket tracing and no errors appear. 
The client just stops receiving any more data. I have the ability to 
disconnect and reconnect the socket in my application. If I do that I start 
receiving again.

I am baffled as the socket shows it is connected however the receive data 
subroutine just stops working after I close that secondary form.
-- 
Bob Harrison

2. vb6-winsock-data receive problem - Visual Basic/VB

3. Help on data structure (similar to a circular buffer)

I wonder if anyone has ever implemented a circular buffer in VB6. I 
would like to write a circular buffer to store generic objects(so maybe 
the container should use variants? - I don't know enough about VB6 to 
decide the best data type to hold the stored elements.

For those who may not be familiar with the concept of a cicular buffer - 
A circular buffer or ring buffer is a data structure that uses a single, 
fixed-size buffer as if it were connected end-to-end.

Basically, I would like to create such a class and then use the 
instantiated object to store data - more crucially though, I will need 
to be able to do the ff:

1). Iterate through the list of items stored
2). Be able to support 'push' and 'pop' operations on the class


I would be grateful for anyone who has written some similar code

4. Circular Reference Problem - VB.Net

5. Visual Basic .NET circular inheritance problem

Hello, suppose I have a VB project which has two classes:

Namespace NS
    Public Class ClassA
    End Class
End Namespace

Public Class ClassA
End Class

Which can be compiled without errors. However, if I want NS.ClassA to
extends ClassA:

Namespace NS
    Public Class ClassA
        Inherits ClassA
    End Class
End Namespace

The compiler will complain that ClassA cannot extends ClassA. Isn't it a bug
since the two "ClassA"s are belong to two different scopes? I know a
workaround for this is to specify the super class name with the implicit
default namespace name, that is:

Inherits WindowApplication1.ClassA

But what if the project is set to have no default namespace? Thanks for any
suggestions.


6. Problem in adding circular references - VB.Net

7. data access problems with VB6 created apps(PDW probably)

I have encountered the following problem running an 
application created using Visual Basic 6 and installing it 
in several PCs through PDW,
in a table filled with contents of a database these 
contents cannot be displayed allthough these data can be 
exported in some files used in the application. This 
problem pops up only in some PCs in which the particular 
application has been installed while in the PC that the 
application was developed no such problem appears.

8. C# COM object doesn't receive OnIdle when it's called out of a vb6 app