473,395 Members | 1,440 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Windows Service and application.DoEvents()

Greeting folks!

This question has been asked before, but unfortunately never really
been answeared. I would appreciate to get any clous on how to solve
the problem:

I am writing a windows service that interacts with the desktop. (It
shows a status dialog if a user is currently logged on.) To get this
dialog shown correctly I need to have something like an
application.doevents() call in my service. Is there anything like that
for use with such services?

I would appreciate any help.
Rick
Nov 21 '05 #1
3 2614
If you're service is a background service then it should be ok. How often &
for how long does the service interact with the Desktop?

Crouchie1998
BA (HONS) MCP MCSE
Nov 21 '05 #2
"Wolfgang Kutschera" <ri**@dangerous.it> schrieb:
This question has been asked before, but unfortunately never really
been answeared. I would appreciate to get any clous on how to solve
the problem:

I am writing a windows service that interacts with the desktop. (It
shows a status dialog if a user is currently logged on.) To get this
dialog shown correctly I need to have something like an
application.doevents() call in my service. Is there anything like that
for use with such services?


You could separate the UI from the service and then let the UI application
communicate with the service using events, remoting, sockets, ... This
would avoid the problems introduced by services which interact with the
desktop.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #3
"Crouchie1998" <cr**********@discussions.microsoft.com> wrote in message news:<#t*************@TK2MSFTNGP10.phx.gbl>...
If you're service is a background service then it should be ok. How often &
for how long does the service interact with the Desktop?

Crouchie1998
BA (HONS) MCP MCSE


Hi!

The service mainly does it's work within the first two minutes after
it is being started. The interaction should take place during this
period of time. Currently if a user is logged on the windows appears
on the users screen, but never gets the time to handle the draw event.
(Means the frame is visible, the content isn't...)

Rick
Nov 21 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

24
by: bazad | last post by:
Hi, I'd like to understand consequences of Application.DoEvents call. Does it create a new thread? Thank you
3
by: James Dixon | last post by:
I have created a windows service in C#, .net framework 1.1 The service makes a web request using the mshtml.HTMLDocument.CreateDocumentFromURL() function Because this is not using...
5
by: me | last post by:
I have a Class Library that contains a Form and several helper classes. A thread gets created that performs processing of data behind the scenes and the Form never gets displayed (it is for debug...
4
by: musicloverlch | last post by:
I used to be able to create PDFs, automatically save them to a file, and mail them out to people. This was on Access 97 with Windows NT. We've changed to Windows XP and Access 2003. Doesn't work...
9
by: SP | last post by:
Hi All, I wrote a windows service which is supposed to stop after specified amount of time. I am calling OnStop() after specified time. OnStop() methods executed but I dont see the service...
6
by: Ollie Riches | last post by:
I understand the use of Application.DoEvents() to process all outstanding messages on the message queue in a winforms application if you have long running process on the UI thread. But can anyone...
7
by: hazz | last post by:
What happens if I set the timer interval for a period that is less than the time it will take to process the loop below? Right now my application is returning just a few items in an arraylist to...
4
by: dm1608 | last post by:
Hi -- I have a VB6 application that I plan on rewriting in C#.NET. The program today basically connects to a SQL Server and parses varies system stats from our mainframes and rolls the data up...
2
by: kmsultan1 | last post by:
Hello all, I need help in trying to access a web page from a windows service. I've actually already built a windows application (vb.net) that does this using the AxSHDocVw.AxWebBrowser class....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
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
0
BarryA
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.