Listen For The 'End Sub Event'?

May 26, 2009

This is my first post, so hopefully I'm asking it in the correct place.

Currently I have two subs where the first calls the second.

Sub Sub1()
'some code
Call Sub2(x)
End Sub
Sub Sub2()
'some code
End Sub

This means that Sub1 does not end until after Sub2 is complete.I need to have Sub2 run after Sub1 has ended. In my case Sub1 is triggered from an application event, so calling the two subs from another 'parent' sub would not work.Is there a way that I can listen for the 'End Sub Event' of a sub?I am currently working in VBA but will be heading to .net shortly so I'll take whatever flavour of code people can help with.

View 1 Replies


ADVERTISEMENT

Get An Object To Listen For Its Property's Event?

Dec 15, 2009

I have an object of type SomeObject, with an event StatusChanged. I have a property in SomeObject of type Status also with an event StatusChanged. Within a private function in SomeObject, I would like to run some logic (including firing the StatusChanged event) in the event that Status has fired its StatusChanged event. I have been away from events for a while so it's a bit cloudy to me. How do I do this?

I'm writing in ASP.NET/VB.NET EDIT Ok, in the event that I can't do the above, how would I get the outer object (SomeObject) to fire its StatusChanged event when the inner object (Status) fires its StatusChanged event?

View 1 Replies

TCP Listen On Any IP?

Mar 11, 2010

I am trying to make a TCP chat program, but instead of having people enter in the ip of the computer they wish to talk to everytime, i would like the program to be able to listen on all ip addresses, so that it will provide for a better user experience, and that i can have chat rooms with multiple people joining. I have the code working with entering in ips, however, when i use the IPAddress.any command it will not send messages.

View 3 Replies

.NET: Listen For Keypresses?

Apr 17, 2012

I found the code linked below on on of Microsoft's websites for listening for keypresses, however I can't seem to ge thte code to respond?

View 5 Replies

Listen To A TCP Port

Apr 27, 2011

I have a program running on a machine on the local network that serves data on port 23. I'd like to be able to listen for data on this port, and add the data to a listbox when and if it comes in. Idealy this would run async. I sort of gotten this to work using the following: [code]

View 6 Replies

Listen To IP On Network?

Dec 6, 2011

I have barcode reader work by rs232 , i using converter from rs232 to TCP/IP to make it connect by TCP/IP, Now barcode send data on this Ip "192.168.0.125" on local network and the IP port is 50000 How i can listen to this ip to read the data send to this ip?

View 8 Replies

Using TCP To Listen For Connections

Dec 17, 2010

I am developing an Application that uses TCP To listen for connections, and then when a message is sent to the server and then it alerts the IP that is running the server. (Lets say the server is on a iPhone, and some how the iPhone gets a text message, which alerts a tcp server running in the background via a .jar, it would send the owner of the iPhone a message on the computer telling it it has a text. This is just an example though, but I think it gets the general idea across. I've been trying to do this, and I can connect to a TCP Server (using 127.0.0.1:8888 for testing purposes, will move to a solid IP and Port later). I can start the server (its still buggy and under development) but i don't know how to connect to the server via an application, and when a certain message is received to alert the IP Running the server.

My Server Code is:
Dim serverSocket As New TcpListener(8888)
Dim clientSocket As TcpClient
Dim infiniteCounter As Integer
Dim counter As Integer
serverSocket.Start()
[Code] .....

Now I know that to connect you'd do something like
Code:
Dim clientSocket As New System.Net.Sockets.TcpClient()
Dim serverStream As NetworkStream
clientSocket.Connect("127.0.0.1", 8888)
serverStream = clientSocket.GetStream()
And I know I would have to use some sort of Byte() method to send/receive messages, but I am at a loss on how to set it all up.

View 3 Replies

Listen To A TCP Port Which Is Already Being Listened By Another App

May 19, 2011

I've a plugin which always listening to the port 6002, and i have an ASP.net application which sending messages to the same port and receiving the reply from the plugin on the same port,Sending is working fine, and the plugin sends a reply on the same port but i don't know how to catch this reply, when i try to listen to the same port using Tcplistener the start method throws this exception : Only one usage of each socket address (protocol/network address/port) is normally permitted,

View 4 Replies

String Or Textbox To Listen?

Mar 21, 2011

I would like to know if it's possible that when an event occurs, a string variable begins to listen (so when a key is pressed, its value is appended to the string) until another event occurs.

EDIT:I would like to make it other way:When the event occurs, I want a textbox to activate as if i double-clicked it (althougt it would be invissible, i olny want the textbox to make an event happen when the text changes using that text)

View 3 Replies

VS 2010 - Listen For On Certain UDP Port

Aug 6, 2011

I am doing a little project before I get onto some more complicated stuff and I am trying to become more fimilar with ports. Basically the issue at hand is that I am not too sure how to listen for on a certian UDP port.

View 3 Replies

Listen For Outlook Email Notification?

May 26, 2011

Currently I am doing a project that requires me to "listen" for new emails coming in MS Outlook. I have code that currently works to do everything else with the emails, but I'm not sure of the API/VB code (this is MS Access 2010 which uses VBA 7.0 running on a 64-Bit Windows machine) that will listen for new emails.

View 3 Replies

Listen To Events From A Windows Service?

May 10, 2011

Not surer if I know exactly how to ask or phrase this questions/discussion.I have a windows service that listens to a COM port for GPS data and send the information out through a UDP port to a listening application (VB6 app). I have a UI front end for the service that I would like to listen or watch the data and do some other things with the data.

The service raises an event in which I would like to have my UI listen to. Now I'm guessing that since my UI is on one thread and the service is on another, if I add a handler to the event, it may never pick it up.

Therefore, I am wondering how can I listen to the events from a sperate UI application. I heard a lot about Remoting, but my concern is configuration; our end users are not technical at all and not sure what is involved...and I'm not that familair with Remoting.

View 1 Replies

Listen To Left And Right Arrow Key On The Keyboard?

Aug 17, 2009

I am trying to use m.WParam to separate the event raised by left arrow key "<-" and right arrow key "->", but somehow m.WParam always = 0. How can i separate the event raised when the user press left or right arrow key?

[code]...

View 1 Replies

Make A Winsock Listen On A Particular Port?

Sep 12, 2009

This must be really obvious, but how do I make a winsock listen to a specific port (recieve data?)

View 2 Replies

Make An Application To Listen In On A UDP Port

Mar 29, 2012

I am trying to make an application to listen in on a UDP port - the issue is that there is something already there. Here is the scenario: On port 5060 is a SIP-based softphone, it is listening for incoming calls. The application I am writing is also listening on port 5060 to receive the packets (which will then be parsed to extract the caller ID and various other statistics)

[Code]...

View 3 Replies

RFC - Listen For Connecting Clients Using TcpListener?

Oct 8, 2011

I posted this code in another thread as an example of how to listen for connecting clients using TcpListener.it is a small part of a larger project, its all my own work,

Imports System.Net
Imports System.Net.Sockets
Public Class Server[code].....

View 2 Replies

Speech Recognition Dont Listen?

Mar 31, 2012

ok i want the speech recognition to listen to me but not do anything unless it hears a certain word or phrase

View 4 Replies

TCPListener - Listen To Particular IP On Specific Port

May 26, 2009

How can I ask my tcpListener to listen to particular IP on specific port? I want my tcpListener to listen to the local IP of the machine. I can get the ipaddress of the pc using Dns.GetHostAddresses(). But, if pc have multiple ip's how can I know which ip address is correct? From tcpClient class I am connecting to the server. So, I know the server ip and so I want to specify ipaddress to my tcpListener class to listen on.

View 1 Replies

VS 2010 - Application To Be Able To Listen For When The Esc Key Is Pressed?

Jan 30, 2010

I would like my application to be able to listen for when the Esc key is pressed, then close the application. I have been searching Google but all I am getting is when in texboxes and thing of that nature, not a global key press.

View 4 Replies

'Listen' To Microphone Input And Playback Simultaneously?

Mar 23, 2012

I'm developing a Public Announcement appplication with two main features:

1. Record audio and playback on event (I've achieved this)

2. Allow 'realtime' playback on event - no recording, just a live announcement

So, how can I cause the microphone input to be sent to the speakers simulatiously as the announcer speaks?

mciSendString("open new Type waveaudio Alias recsound", "", 0, 0)
mciSendString("play recsound", "", 0, 0)

View 2 Replies

Get VB 2008 To Listen To The Keyboard Key Strokes When In Another Program?

Aug 2, 2009

How do I get VB 2008 to Listen to the Keyboard Key strokes when I am in another program??

View 4 Replies

VS 2008 : DockManager - How To 'listen' To Form MDI Children

Jul 13, 2009

I'm trying to create a MDI DockManager component. Basically what it should do is take each MDI child form and turn it into a TabPage. Instead of showing the MDI forms, the main form then hosts a TabControl with each 'form' as a TabPage.I expect this to be quite a big challenge, and I know I will probably not manage to do it... But it would be a great control if I could!Well, for this to work I need my component to know when an MDI child form is added / removed. As far as I know, there are no events the form throws when this happens... The forms are not added to the Controls collection (are they?!) but the user merely sets the MdiParent property of the child forms.

The only useful event I could find was the MdiChildActivate event, which should fire when an MDI child is activated. I am pretty sure that is not enough for my idea. It might be enough to detect new MDI child forms being added, but if one is closed (eg, removed) there is no way I can detect that.So, I'm basically looking for a way to detect when an MDI child is added or removed from a form. Is that possible at all?

View 4 Replies

VS 2008 Close Tcp Connection Restart Listen?

Nov 1, 2009

How do i make it so when i close my client the server will restart listening and allow another client to connect.

View 3 Replies

Communications :: Button When You Clicked The Computer Will Listen To You And Print ?

Aug 12, 2010

I want to make a final project to the university there will be button when you clicked the computer will listen to you and print. what are you say in text box or in rich text box on the screen note: i'll start from zero i know nothing about this but i hope do this project or the project "save audio file in picture" but i like this one "computer listen to me". i'll use vb.net express 2008.

View 4 Replies

Get The User To Listen To Audio And/or See A Tooltip On Mouse Hover?

Sep 23, 2009

want my application to trigger audio files when the user clicks a word/sentence in a label, and show a tooltip on mouse hover. I use VB. I tried using TTS (SAPI 3.5), but can not know which language the user's operating system will have. Also, I was advise to use pre-recorded sound wav or mp3. I created the audio files, but am not able to link/connect/call.

View 1 Replies

Trafic - 'listen' To The Network Traffic To And From A WebBrowser Control

Mar 14, 2011

I want to 'listen' to the network traffic to and from a WebBrowser control. I'm not interested in the HTML.

View 12 Replies

VB Or C# - Run App In System Tray And Listen To Keyboard Input Without App In Focus

Mar 28, 2010

I want to make an app which on loading sits in the system tray and even after I open another program (say notepad or vlc or anything) i.e. even when the app is not in focus and if I press "G" on my keyboard, the tray icon should show a tool tip - "key G is pressed". I have tried several codes but nothing works when the app goes out of focus. I can use Register Hot Key [url] but it needs a modifier also (like Ctrl or Alt etc. along with my key G). So, is there any way I can achieve this? something which many tray icons do like antivirus apps, etc. and I do not want to use AutoHotkey application.

View 2 Replies

Listen To Recorded Material But Not Necessarily In Real Time - Copy File In Use

Oct 15, 2009

I have an application that continously records audio for several hours. I want to be able to listen to recorded material but not necessarily in real time. I have tried to just copy the file being recorded to a new file with overwrite and the copy obviously gets done (filesize changes) but when I try to listen to the copied file my player just 'blinks' and nothing more happens. If I however close the recording, the copy also gets playable. My idea is that copying a file in use just creates another file in use. If this is the case how can I close the copied file?

View 1 Replies

Use The BackgroundWorker Built Into VB To Create A Thing To Make It Listen For Incoming Messages?

Mar 13, 2008

I want my application to be able to communicate 2-way between the application on another computer and the host server which will be running on my computer.I want to use the BackgroundWorker built into vb to create a thing to make it listen for incoming messages, and also send out messages to the client.The client needs to listen and receive, same as the server, because both need to communicate with one another.I do not know how I can make it do either sending nor receiving.I would be using two different background workers to keep the code seperated and organized so that I will understand what code is for what.

I want the code to say that if i receive the message "Apple" without the "" and cap sensitive, then it will change Label1.Text = "That worked, word received Apple" or something similar to that. ( This is because I am ignorant and I want it to interpret the text sent through to figure out what the application is supposed to do, and last time I couldn't figure out how to make it do something when a certain text was received.

View 1 Replies

C# - .NET WinForms - Listen To Events For System LogOff - User Locked - Hibernate Started And System Resumed?

Feb 11, 2010

I want to listen to events in my windows forms .NET application for the following system wide events :

[Code]...

View 1 Replies







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