473,322 Members | 1,523 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,322 software developers and data experts.

Screen capture does not work in Windows Service...?

Hi guys,

I have a little problem. I have a class that uses Windows API to capture a
snapshot of the screen. I have this class in a library that I include in my
projects.

When I try to use this class in a windows service, the snapshot comes up as
a black screen. Any idea why? or how do I get around it?

The class works fine if I use it in a regular windows forms application.

Thank you in advance!

--
Juan Romero
-----------------------------------------
The successful person has the habit of doing the things failures don't like
to do.
E.M. Gray
Nov 22 '05 #1
4 3258
Windows services do not interact with the desktop. There is a setting in
the properties for the windows service that allows the service to interact
with the desktop. Try changing this setting. I have not done this before,
but it is a thought.

"Madestro" <me_no_like_spam_juanDOTromero@bowneDOTcom> wrote in message
news:BB**********************************@microsof t.com...
Hi guys,

I have a little problem. I have a class that uses Windows API to capture a
snapshot of the screen. I have this class in a library that I include in
my
projects.

When I try to use this class in a windows service, the snapshot comes up
as
a black screen. Any idea why? or how do I get around it?

The class works fine if I use it in a regular windows forms application.

Thank you in advance!

--
Juan Romero
-----------------------------------------
The successful person has the habit of doing the things failures don't
like
to do.
E.M. Gray

Nov 22 '05 #2
Thank you Peter. This is a good lead. However, I cannot find this setting
anywhere. Can you be more specific?

Thank you!

--
Juan Romero
-----------------------------------------
The successful person has the habit of doing the things failures don't like
to do.
E.M. Gray
"Peter Rilling" wrote:
Windows services do not interact with the desktop. There is a setting in
the properties for the windows service that allows the service to interact
with the desktop. Try changing this setting. I have not done this before,
but it is a thought.

"Madestro" <me_no_like_spam_juanDOTromero@bowneDOTcom> wrote in message
news:BB**********************************@microsof t.com...
Hi guys,

I have a little problem. I have a class that uses Windows API to capture a
snapshot of the screen. I have this class in a library that I include in
my
projects.

When I try to use this class in a windows service, the snapshot comes up
as
a black screen. Any idea why? or how do I get around it?

The class works fine if I use it in a regular windows forms application.

Thank you in advance!

--
Juan Romero
-----------------------------------------
The successful person has the habit of doing the things failures don't
like
to do.
E.M. Gray


Nov 22 '05 #3
1) Administrative Tools --> Services
2) Locate your service and right-click. Select the Properties command.
3) Click the Log On tab.
4) Check the Allow service to interact with desktop checkbox.

I don't know if this will work, but it is worth a try.
"Madestro" <me_no_like_spam_juanDOTromero@bowneDOTcom> wrote in message
news:10**********************************@microsof t.com...
Thank you Peter. This is a good lead. However, I cannot find this setting
anywhere. Can you be more specific?

Thank you!

--
Juan Romero
-----------------------------------------
The successful person has the habit of doing the things failures don't
like
to do.
E.M. Gray
"Peter Rilling" wrote:
Windows services do not interact with the desktop. There is a setting in
the properties for the windows service that allows the service to
interact
with the desktop. Try changing this setting. I have not done this
before,
but it is a thought.

"Madestro" <me_no_like_spam_juanDOTromero@bowneDOTcom> wrote in message
news:BB**********************************@microsof t.com...
> Hi guys,
>
> I have a little problem. I have a class that uses Windows API to
> capture a
> snapshot of the screen. I have this class in a library that I include
> in
> my
> projects.
>
> When I try to use this class in a windows service, the snapshot comes
> up
> as
> a black screen. Any idea why? or how do I get around it?
>
> The class works fine if I use it in a regular windows forms
> application.
>
> Thank you in advance!
>
> --
> Juan Romero
> -----------------------------------------
> The successful person has the habit of doing the things failures don't
> like
> to do.
> E.M. Gray


Nov 22 '05 #4
But what screen are you trying to capture? If no one is logged on,
then all you might get would be the logon screen?

Perhaps your windows service could detect when a user logged on and
when they did, then kick off a thread or process that would capture the
screen.

Nov 22 '05 #5

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

Similar topics

3
by: Me Mine | last post by:
i, I have trying to code a small console app that will allow a user to select a window and then create a screen capture of the window. I haven't been able to figure out how to do the screen...
4
by: Madestro | last post by:
Hi guys, I have a little problem. I have a class that uses Windows API to capture a snapshot of the screen. I have this class in a library that I include in my projects. When I try to use...
5
by: TerryWilson | last post by:
I am developing a web based service tool using asp.net that we will distribute with our product. This service tool will be used for remotely configuring the product, problem determination, etc. ...
4
by: gwhite1 | last post by:
I use this code to capture a screen in a regular VB 2005 windows app. It works great! I found the code in google. But when I create a windows service it does not capture the screen. It only...
2
by: dumbledad | last post by:
Hi All, I'm using ASP.Net web services to provide the logic required for a Flash based prototype. The Flash and the ASP .Net run together on the client machine. One of the functions I'd like to...
1
by: JP2006 | last post by:
I'm trying to write a control that will take a screen capture of a particular website when a user submits a form in a web application; one of the form fields is for a URL - the control needs to get...
1
by: hemant | last post by:
I am trying to Caputre the screen in windows service with the GDI Api of Win32 in vb.net 1. CreateDc 2. CreateCompatibleDC 3. CreateCompatibleBitmapDc 4. Bitblt 5. SelectObject 6. ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
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...
0
isladogs
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 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.