Hello guys,
Right now I have run into a problem. In my windows application I wish
to run a function called waitForClient(), which waits for a clients
connection using WinSock. Anyway, within the button click event, I
have inserted this function. The only problem is that when you click
the button, it freezes the whole windows application. This is because
it is running an infinite loop and isn't properly running the rest of
the button code.
What I was wondering was if there was anyway to run a function in the
background. I'm looking for an easy way out of this, though if I have
to I will use threads. Thanks in advance. 4 2971
On 26 Mar, 08:10, "ADT_CLONE" <spell_d...@hotmail.comwrote:
Hello guys,
Right now I have run into a problem. In my windows application I wish
to run a function called waitForClient(), which waits for a clients
connection using WinSock. Anyway, within the button click event, I
have inserted this function. The only problem is that when you click
the button, it freezes the whole windows application. This is because
it is running an infinite loop and isn't properly running the rest of
the button code.
What I was wondering was if there was anyway to run a function in the
background. I'm looking for an easy way out of this, though if I have
to I will use threads. Thanks in advance.
Threads is the (only?) way to go. Ask again in
microsoft.public.dotnet.languages.vc and they will be able to help you
with that. Perhaps they can also tell you a way to avoid using a loop
in waitForClient() if you describe what it does.
--
Erik Wikström
On 26 Mrz., 08:20, "Erik Wikström" <eri...@student.chalmers.sewrote:
On 26 Mar, 08:10, "ADT_CLONE" <spell_d...@hotmail.comwrote:
Hello guys,
Right now I have run into a problem. In my windows application I wish
to run a function called waitForClient(), which waits for a clients
connection using WinSock. Anyway, within the button click event, I
have inserted this function. The only problem is that when you click
the button, it freezes the whole windows application. This is because
it is running an infinite loop and isn't properly running the rest of
the button code.
What I was wondering was if there was anyway to run a function in the
background. I'm looking for an easy way out of this, though if I have
to I will use threads. Thanks in advance.
Threads is the (only?) way to go. Ask again in
microsoft.public.dotnet.languages.vc and they will be able to help you
with that. Perhaps they can also tell you a way to avoid using a loop
in waitForClient() if you describe what it does.
--
Erik Wikström
There's also a way to handle sockets in asynchronous mode. You should
read through the MSDN documentation to find out how to use them on
Windows. Look for WSAAsyncSelect, which sends Windows messages to your
application has pending incoming data or connections.
On Mar 26, 7:44 pm, "exylum" <exy...@gmail.comwrote:
also check the winapi settimer function:http://msdn.microsoft.com/library/de...ary/en-us/winu...
although i think that the asynchronous mode posted by
Alexander Block is the best way.
Thanks guys, I'll look through these. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Arun |
last post by:
Hi,
This is a scripting question, but since I am writing the script in
python I am posting this question here:
I have a python script that runs a simulator (that was written in c++,
so I use...
|
by: Si |
last post by:
Hi Guys
I am using this code to execute an Access VBA function from ASP:
strDbName = strDataSource & "data\webjobs.mdb"
Set objAccess = Server.CreateObject("Access.Application")...
|
by: pb648174 |
last post by:
I have a very long transaction that runs on the same database that
other users need to use for existing data. I don't care if they see
data from the transaction before it is done and am only using...
|
by: Ben Dewey |
last post by:
This is a repost, But I have some new information.
I have a server that is configured for .NET 1.1 and 2.0. For some reason
all my postback events for aren't firing when using .NET 1.1. Under...
|
by: Anonieko |
last post by:
Query: How to display progress bar for long running page
Answer:
Yet another solution. REFERENCE:
http://www.eggheadcafe.com/articles/20050108.asp
My only regret is that when click the...
|
by: Dave Hughes |
last post by:
Just noticed something rather annoying after upgrading my test box (a
Linux server running DB2 UDB v8 for LUW) to fixpak 11 (for reference it
was previously on fixpak 7).
In the past I've relied...
|
by: esakal |
last post by:
Hello,
I'm programming an application based on CAB infrastructure in the
client side (c# .net 2005)
Since my application must be sequencally, i wrote all the code in the
UI thread.
my...
|
by: ADT_CLONE |
last post by:
Hello guys,
Right now I have run into a problem. In my windows application I wish
to run a function called waitForClient(), which waits for a clients
connection using WinSock. Anyway, within the...
|
by: nathanwb |
last post by:
I have the following php code, at the top I am pulling a piece of data from a query and I echo the results with no problem, I am using Ajax with this page as well and further down the page when I...
|
by: Andrew Falanga |
last post by:
HI,
Just a warning, I'm a javascript neophyte. I'm writing a function to
validate the contents of a form on a web page I'm developing. Since
I'm a neophyte, this function is quite simple at...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
| |