Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
 
  HOME    TRACKER    Visual Basic




Interrupt Handler In Vb6


Is there a way to handle interrupts in vb6? I need to listen to IRQ11 generated by a data acquisition card. The card monitors 8 digital input channels and creates an interrupt when a channel is shorted.




View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread
Interrupt Handler In Vb6
Is there a way to handle interrupts in vb6? I need to listen to IRQ11 generated by a data acquisition card. The card monitors 8 digital input channels and creates an interrupt when a channel is shorted.

Interrupt
Many years ago, I used to write Assembly Language games on my C64. I used to call an interrupt routine to display for example a flying spaceship, so that it's movements were independent from, for example a weapon, that is controlled by a player.

What is the VB equivalent to an interrupt routine?

I'm sure DirectX has something like this built in, but is there something similar to this if I'm not using direct X?

Thanks,
Joe Barber

VB 6.0 Interrupt??????????
Is it possible to create an on interrupt event in 6.0???

Interrupt A FOR...NEXT
Can somebody tell me how to interrupt the execution in a FOR...NEXT or WHILE...END by pressing the Esc key?

Thanks a lot.

Demian

Interrupt
Hi,

I am doing a project involve controlling home light using manual switch and PC. I used interrupt function. I am quite confusing with the following code.

Out PortAddress,7 (00000111)
Out PortAddress,135 (10000111)
Out PortAddress,7 (00000111)

The most significant bit represent the interrupt bit connect to PIC (RB7) through parallel port(D7). Why the code indicate that we should send 0 first, then 1 , then back to 0 ??

Thanks

MSComm Interrupt?
Hi,

Just wondering if its possible to do a kind of interrupt in VB 6...
Basically, I want the VB program to be running, and when it detects a certain value using MSComm1.Input, it should run a function.

Any ideas how this is done?

Cheers in advance,
Rich W

RTC Interrupt Calls From VB5
Hi All,

I've been working on a helper app for my PVR (harddisk video recorder) project. It sits in the systray, checks to see if the main DigiTV* app is running then switches the TV's SCART over using a comm port.

I'd like it to be able to set the mother board's RTC alarm time so that the, powered down, PVR can be woken up a few minutes before a timed recording.

I cant find a 'set alarm' API call and I don't fancy peeking and pokeing the RTC registers (probably not possible while running win2k anyway). so, it leaves me wanting to call bios interrupts (1Ah and 1Bh if memory serves). Is there anyway of doing this from VB (or a simple ASM dll)?

TIA
Bill

*http://www.nebula-electronics.com

Interrupt An Dll-routine
hi there!

wrote an heuritic for solving a rather complex scheduling-problem. i implemented it in c++, compiled it to an dll and used it as a method in VB. in the VB-application the user can set several parameters for the heuristic. if those parameters are chosen gracelessly it can happen that the heuristic gets an endless loop. i have no idea how to prevent it by modifying the algorithm, so i would like to offer an abort-button in the vb-application.
but i got no idea how get such a function, which can be executed by the user, while the application is stuck in the solve-function....

any ideas?

i'm using VB6.0 and VC++ 6.0.

thanks in advance
dirk

Interrupt Code
Is there a way I can -at runtime- interrupt code if a condition is not met. I know I can do it with some If..Then or Case statements, but based on the way I have things set up, I was hoping there was an easier way out.


For example I have a series a Calls calling functions.

Call func1
call func2
call func3
If condition not met, go back to call 3
'stay in a loop here with call 3 until condition met
Call func4

Maybe someone will know what I am trying to do. Sorry for my lack of clarity.

Can I Interrupt The Program?
Hello!

I have a program that takes a lot of the computers capacity. It also takes a long time, about 1 minute. It searches for folders and then for different file types in the folders it found.

I want to show the current time on the form. But when the program starts doing it's job the time stops counting. I'm using a timer to uppdate the time.

Is there some kind of interupt funcktion I could use to get the time to continue counting on the form?


Thanks!!

VB Interrupt Concept HOW???
Hi, currently I am having lots of trouble with one of programs. Basically I developing a program to capture image from webcam and process the images to detect for movement.

When the program is running it's constanly processing through the motion detection code. Now what I am having trouble with is that I want to add a few more forms to do some other things such as sending email etc... But since the motion detection code running all the time how do design something like the interrupt concept in vb.

So that when I click on email button the motion detection code will stop what ever it doing and perform the email sending task and then continue with the motion detection task from where it left off.

Hope someone can help me out here! Thnk

Interrupt A Function
How can I stop another function in the middle no matter which line it's at? Can I use something like Exit Sub or Exit Function on another function? Thanks

How To Interrupt A Sub Routine
G'day,

The answer is so simple, but I am at a loss. How do I stop execution of this subroutine at the place indicated (*****). I have tried everything but the right thing.


Private Sub CalcPrice(ItemName As String)


( ... all sorts of code in here ...)
If .RecordCount = 0 Then
' we need to get a price

' this is where we call the txtCost InputBox shown below
' to obtain a price
txtCost_KeyPress


'**** The program should stop before here, or in the
' txtCost input box
' subroutine before continuing on to this next part
' In BASIC I would just add an INPUT statement,
' but how do I do it in VB?

.AddNew
.Fields!ccharge = WhoPays
.Fields!CFrom = txtFrom.Text
.Fields!CTo = txtDropOff.Text
.Fields!Item = lstListOfItems.Text
.Fields!Cost = Val(txtCost.Text)
.Update
End If
End Sub


Private Sub txtCost_KeyPress(KeyAscii As Integer)

If KeyAscii = 13 Then
ItemCost = Val(txtCost.Text)
Exit Sub
End If
End Sub

This looks very confusing when I read it back. Hope you can understand what I am saying.


BTW, all the formatting was correct, bur when I highlighted the code and clicked on the vbcode icon, this happened.



Peter

Call INTERRUPT In VB
I some old QB source code that uses CALL INTERRUPT (Assembly) and QB (Quick Basic) -- not sure how (or if you can) to make a direct Interrupt call to the correct register (AX, BX, CX, etc.) from VB.

ANYONE???

Loop Interrupt
I have a loop such as Do while ...... End Do on a Form
I want to interrupt the loop by pressing a button. But when the loop is executing, I cannot press the button.
How can I do that?

HARDWARE INTERRUPT
I've been making an electronic device (in a protoboard -to test it-) to simulate a remote Control for the DVD.
I input the codification of the keys through the parallel port. So, my "driver", checks periodically the port to see
if any key was pressed. Everything works great, but I just want whether anybody knows how to make a
HARDWARE INTERRUPT so that I don't have to check the port continuosly. I could use the IRQ 7 (the one
that uses the parallel port), but I have no clue how to detect the INTERRUPTION and proceed with the
decodification of the key that was pressed. Any idea would be welcome.

Interrupt Event
Hi,

I am working with TreeView. I use icons to represent the tree node. A mouse click will change the node state (ie change the icon).

My problem is when the mouse click is on the (+) (to collapse the tree node), 3 events will be fired
1 - collapse
2 - node click (if the final mouse position is on a node)
3 - click (obviously, the tree is clicked)

the second event give me an unexpected result. Since the user is doing collapsing, not node click, but node click event is fired anyway. So the icon of this node will be changed.

If you use a checkbox with TreeView, you can see the place the checkbox a little to the left, just enough that the second event will not be triggered. (the final mouse position after collapsing is always between the checkbox and the text).

So, my question is :
How do I stop the event? (like in Java, there is method, consume(), which will stop the event chain)

Hope I make my quesiton clearly.

thanks

Interrupt Event
Hi,

I am working with TreeView. I use icons to represent the tree node. A mouse click will change the node state (ie change the icon).

My problem is when the mouse click is on the (+) (to collapse the tree node), 3 events will be fired
1 - collapse
2 - node click (if the final mouse position is on a node)
3 - click (obviously, the tree is clicked)

the second event give me an unexpected result. Since the user is doing collapsing, not node click, but node click event is fired anyway. So the icon of this node will be changed.

If you use a checkbox with TreeView, you can see the place the checkbox a little to the left, just enough that the second event will not be triggered. (the final mouse position after collapsing is always between the checkbox and the text).

So, my question is :
How do I stop the event? (like in Java, there is method, consume(), which will stop the event chain)

Hope I make my quesiton clearly.

thanks

Interrupt Code
Hi all,
I'm fairly new to VB and I can't figure out how to interrupt a loop that is constantly running. The program I am writing is updating the current temperature every 3 seconds. I need to be able to exit this loop with a command button. Any help would be great.

Thanks in advance.

How To Involve Interrupt
Can anyone tell me how to involve interrupt instruction INT from VB ?
thanks

Accessing Interrupt
Does anyone know how to access all those low level call INT via VB ?

thanks

How To Call The Interrupt
I wonder which OCX file I should use to call the interrupt, such as "int 21". Thank you very much. By the way, where to download.

Interrupt Screen Saver
Hi two related problems/queries:

I have a program that notfies me when a file is found in a folder (a form opens and appears on the screen). This works fine but I'd like to get a couple of bugs sorted out.

First, it doesn't interrupt the screen saver - any idea how to do this?

Second, when it does appear as the active window it is easily dismissed to the background. What i mean by this, by example, is if i'm working in word when the notification appears it only stays in the foreground until i type something. Most of the time this results in a brief flash of the notification. I want it to stay on the screen until I have responded to it.

Thanks

Interrupt On Parallel Port
hi everbody ,
can anyone please tell me how to use the parallel port's interrupt (on the ack pin) and how to detect this interrupt using VB ??

thanks a lot.

Receive Interrupt Status
How can i read in the status of RI?
DCD, DSR and CTS is easy (MSComm1.CDHolding, MSComm1.DSRHolding and MSComm1.CTSHolding) but how can i do it with RI?

THX Massafaka

How To Interrupt MScomm Event?
Hi
I need help on this.
Currently my program runs and collects data from an external device thru comm port using the MScomm function.
I would like to have a "reset" button that will stop the serial communication between the external device and my programa at any time I want. I had tried to simply close the comm port using

MSComm1.PortOpen = False

but had an error which restrict me from juz closing the comm port while data is still transmitting. (when there's no data traffic,ie, no receive and transmit activities , I'm able to close it without error)

So is that any Mscomm command that can be used to do the interrupt while data traffic is in progress??

Thanks

Regards

How To Interrupt An Ongoing Process?
Hi,

Can anybody tell me please how to interrupt an ongoing process in VB? I mean when a process is going on say, updating a database for thousands of rows, the rest of the application doesn't respond till the time that process is over. Can anyone tell me how to work around this?

Thanks,
Dibyendu

How To Interrupt Windows Shutdown
Hi guys, long time no visit.

Re: http://www.xtremevbtalk.com/showthread.php?t=30002

I need to do this in an Access application. I'm hoping to make this work with VBA. Squirm's code has VB stuff that I don't think I can mimic in VBA. I copied the code that gdCrisp posted back, and it compiles just fine in VBA, except for:


Code:
Public Sub Hook(Lwnd As Long)
Dim uProcess As Long
WndProc = SetWindowLong(Lwnd, GWL_WNDPROC, AddressOf WindowProc)
End Sub
Error: "Expected expression"

Can I get there with VBA?

How To Interrupt Windows Shutdown
Background:
I am trying to write a program that detects when windows is attempting to shut down (ie. a user has selected shutdown from the start menu or pressed alt F4 etc, an clicked OK to shutdown). Once it has detected that a shutdown has been initiated I need it to abort the user activated shutdown sequence, run some other commands and then shutdown the system. I have had a look round the web and can find lots of examples of how to shut down windows from code but none on how to abort or detect that windows is about to shut down.

Question:
How can I get my program to detect and subsequently interrupt the windows shutdown sequence????

How To Un-Interrupt Code / Escape Key Off
Hello


when i press Escape Key it Interrupt my code, is there any way to make it Un - Interrupted


or is there any thing like SET ESCAPEKEY OFF in VB 6?

thanks

Generate An Interrupt At A Variable Value
I have this integer variable, call it Var that can be modified (it's usually incremented by one, i.e. it's a counter) from different parts of the program. I'd like to set a control visible the moment Var reaches a specific value, but I'd like to avoid having to test for its value at each subroutine where it can be changed.

Anyone knows an easier way?

Scanner Interrupt = Class?
Hi all
[vb6]
noob to more advanced vb ideas.
I have a program that uses a barcode scanner to read a barcode (suprise suprise) to a text field this will happen periodically without user interaction.
However the focus may not be in the text field, if not I will have barcodes going unread.
So I need an interrupt type action that any input on either USB or Rs232 Com port will result in the focus being set to the field and the data being read to it.
(ultimatly the text field can be done away with and the data saved straight to a var)
IE something like


Code:
Sub scannerPort_incomingDataEvent()
text1.setFocus
text1.text = scannerPort.data
'OR
someVar = scannerPort.Data


Anyobe have anypointers as to where to begin with this (as in I think I need to start by creating a class, but not sure)

Plus anyone know any good tutes, etc for using USB or RS232 Com ports?

Thanks all in advance, much appreciated

Interrupt SQL Query Programatically
Is it possible to interrupt a query that's taking too long,
other than using the CommandTimeOut.
I want to user to be able to stop a query that's taking too long,
like Query Analyzer, the thing is VB gets stuck until the query returns a result or times out.
So does this mean you need multi-threading.

Interrupt A Looping Or Class
Hi,
I have some question about developement in VB and hope can get some advice from you all, VB experts.
I have developed a main form and the main form I include 2 buttons and a label. One button is "Execute", the other is "Stop" and the lable is "Status". When I click on "Execute", a function will be called and do a looping from 1 to 100000000(what ever number) and will update the caption for the label. While the looping is running, I want to allow my program to stop the looping whenever I click "Stop", and I dont know how to do it.
Second way I tried is I put all the function in a class module. I create the class in my main form and execute the class function( class.executeFunction), but again I dont know how to stop it. I tried to stop it by set it to nothing, but didn't work.

Hope to get your advice.
Thanks


Regards

How To Interrupt DCOM Activity.
I have a thin client that makes calls to a middle tier via DCOM which in turn communicates with an alpha via winsock. My question is when the applications starts fetching data from the middle tier and the alpha I am unable to abort or interrupt the operation until all operations are complete. I get the switch to / retry MsgBox. I would like a way to abort or interrupt operation.

Thanks
Danny

Help! Interrupt Calls With Mscdex...
Hi, in the microsoft-kb article Q137813 I found
the information, how Win32-Apps can read CD-ROM
sectors in Windows 95.

for the article see: http://support.microsoft.com/support...S&SD=msdn&FR=1

My question is: how can I avoid writing the dll and the
thunk-script? I want do all the stuff in vb.
How can I access the MSCDEX from vb?
How can I do the simulation of Real Mode Interrupt calls?

Interrupt A Word Macro
Hi all,

is there a possibility (for example a shortcut) to interrupt a Word macro while it's execution?

Regards

Interrupt Operation On A Form
Say I have a few buttons on a form. When I press 'cmdGo', the operation starts (it will be a lengthy process), then I wish to pause it by pressing 'cmdPause'. How do I do it ?

Interrupt Delete Sheet
Can anyone please tell me how I can interrupt an attempt by a user to delete a sheet in excel, so that I can check the codename of the sheet and stop the deletion if it is a particular sheet which I want to protect from deletion (but the user must be allowed to work in the sheet). I would prefer to allow the user to rename sheets, move and copy etc..., so I do not want to protect the workbook structure. What event occurs when someone tries to delete a sheet, and how can I intercept it? (In general where can I get a list of events like this (for built-in menu commands)? I can't see anything like deletesheet in the workbook, worksheet or application object browser window.
Thanks for the help.

How To Interrupt Windows Shutdown??
Background:
   I am trying to write a program that detects when windows is attempting to shut down (ie. a user has selected shutdown from the start menu or pressed alt F4 etc, an clicked OK to shutdown). Once it has detected that a shutdown has been initiated I need it to abort the user activated shutdown sequence, run some other commands and then shutdown the system. I have had a look round the web and can find lots of examples of how to shut down windows from code but none on how to abort or detect that windows is about to shut down.
I think this should be possible to detect and abort a shutdown but am lost as to exactly how this can be achieved

Question:
   How can I get my program to detect and subsequently interrupt the windows shutdown sequence????

Timer Control Interrupt
Hello,

Can you help me how to pause a timer to allow user more time to a specific task then to resume the timer? Any help is appreciated. And Thanks!

NiteStone

Interrupt Handling In Windows Using VB
If I open a Notepad or Any editor and start typing the keys then my application should trap those keys and change those keys on some criteria before displaying on the screen,(te keyboard should work like phonetic or Remington keyboard depending upon our requirement.) That is , my application should stay resident in the memory and handle the Interrupts to change the keys.
Help me in developing this application. I want to develop this in Visual Basic and my Application should work on Windows platforms.
Thanx in advance.

Timer Woes, Time For An Interrupt?
I am writing a program that has a scrolling message & slideshow and I developed these programs separately and they work together fine when running as two separate processes.

Now I'm bringing them together into one application and the problem is while the slideshow opens a window or loads pictures or does anything substancial there is a major pause in the scroller. This just can't happen

I can't simply add a "DoEvents" everywhere to counteract this problem either. Some processing, for example "LoadPicture", "SavePicture" etc. can't have DoEvents during that procedure. Plus running a DoEvents during particular functions causes all sorts of mayhem.

Is there any way I can trap a hardware timer or get some low level interrupt happening so the processor *must* process events for the scroller? In the old DOS days you would setup a hardware interrupt, is there something like this for VB? ... and any ideas & sample code would be greatly appreciated

Performance Issue:Polling OR Interrupt
Hi everyone, I have the following problem:

I want to write a program (like an appointments manager) that will check for user appointments ..eg: if the user set the appointement to be at 12:00 AM then the program will alert the user at that time ..

What is the problem?
the problem is how can I check for the time .. what is the best way .. do I have to check (ALWAYS) for the time and if the condition is true then it will remind the user .. or is it better to use Interrupt (I do not know how) that will interrupt the user when the specific time occurs ..

I know this is a performance issue but it is really challenging me ..

I hope someone can help with an idea ..
by the way do any one have a program that do managing appointments (open source)

Make Msgbox *not* Interrupt The Program.
I've just discovered a nasty little bug in this client/server chat program I recently started reworking (out of an initial framework finished some 5 or 6 months ago).

The deal is this - the server has the option to require the administrator to validate all new accounts before the new account is allowed to chat. Since I want the program to be helpful, whenever a new player registers, I pop up a little msgbox saying something to the effect of "Would you like to validate this account now?"

However, whenever this msgbox pops up, the server stops dead in its tracks and waits patiently for the administrator to click "Yes" or "No"... meanwhile, the players are all wondering why their connection has gone dead. If the admin is out to lunch, the poor buggers could be sitting there for hours while the server just sits there. =)

In short:
Is there a way to call a msgbox that does not freeze the program in its tracks?

Interrupt The Words Default Dialog
Can we interrupt the MSWord's default dialog when double clicked on picture, shapes or any object (like Format Picture, Format AutoShapes) with our User-defined dialog or Userform.... So that different kind of input could be provided to the application.

Interrupt Driven Vs Polling Question
I want to send info to some server program, wait for a reply, send again and repeat until a 'stop' is received OR the user hits a button to halt the communication. How can I make this communication interrupt driven rather than polling with do while loops until a certain command is received or more importantly the STOP button is hit? I am doing something of the sort:

VB Code:
Dim stopMove as Boolean  Private Sub executeScan()'Synchronizes the scanning of each node by waiting until all give the command #nextScan    Dim n As Node    Dim cmd As String        Do While cmd <> "#ENDSCAN" And Not stopMove    'Synchronizes nodes until the scan is complete            For Each n In nodeCollection        'Waits for each node to finish moving            Do While cmd <> "#NEXTSCAN" And cmd <> "#ENDSCAN" And Not stopMove                DoEvents                cmd = n.getCmd            Loop        Next n                If cmd = "NEXTSCAN" And Not stopMove And cmd <> "#ENDSCAN" Then            'Nodes are done moving and scan is not finished            'Send command to move to next scan position to all nodes                        Call sendAll("#NEXTMOVE")                    End If    Loop        'If scan was interuptted, reset the stop flag and send cmd notifying all nodes of this stop    If stopMove Then        Call sendAll("#STOP")        stopMove = False    End If    End Sub Private Sub stopMv_Click()    stopMove = TrueEnd Sub

Interrupt Excel Code Execution
I have an application that can take a long time to run. Should the user want/need to stop during execution (press esc key), I would like to provide the option of saving certain parameters to a text file so the program can pick up where it left off and not have to start from the beginning. How do I go about attaching code to the esc key?
I am running Windows XP pro and VBA 6

If I can't use the esc key, is there another way for the user to interrupt the code execution?

Thanks for the help



Can Event Programming In VB Interrupt A TCP/IP Transfer?
Hello all,
If your program is doing a TCP/IP read from another program and you do an event like say a Button click.. will VC++ handle that event and the data that is being read from the TCP/IP be messed up? Ive seen this problem in a Visual Basic and was wondering if it is a language problem or a programming error.

Thanks!

Copyright 2005-08 www.BigResource.com, All rights reserved