473,513 Members | 2,334 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

MainWindowTitle returns empty string

RMB
Environment: FW 1.x VB.net

When making a call to MainWindowTitle from a windows service an empty string
is returned. All of the application processes being checked have UI with
titles. If I run the same code from a test windows application,
MainWindowTitle returns a value. Is there an issue with calling
MainWindowTitle from a windows service? The code is able to see the process,
but just unable to retrieve the MainWindowTitle.

Thanks for the help...
Oct 4 '06 #1
3 5012
In article <FA**********************************@microsoft.co m>,
RM*@discussions.microsoft.com says...
Environment: FW 1.x VB.net

When making a call to MainWindowTitle from a windows service an empty string
is returned. All of the application processes being checked have UI with
titles. If I run the same code from a test windows application,
MainWindowTitle returns a value. Is there an issue with calling
MainWindowTitle from a windows service? The code is able to see the process,
but just unable to retrieve the MainWindowTitle.
Windows Services don't usually have a UI. They are a background process
with no user interaction. No UI means no MainWindowTitle.

--
Patrick Steele
http://weblogs.asp.net/psteele
Oct 5 '06 #2
RMB
Patrick:

I think you misunderstood my question. My service is trying to pickup the
MainWindowTitle of other processes running on the server. I found a post
(elsewhere) that said to check the "Allow service to interact with desktop"
checkbox; howerver, my service is running under a user account and not the
Local System Account. Does anyone know of a way around this?

"Patrick Steele" wrote:
In article <FA**********************************@microsoft.co m>,
RM*@discussions.microsoft.com says...
Environment: FW 1.x VB.net

When making a call to MainWindowTitle from a windows service an empty string
is returned. All of the application processes being checked have UI with
titles. If I run the same code from a test windows application,
MainWindowTitle returns a value. Is there an issue with calling
MainWindowTitle from a windows service? The code is able to see the process,
but just unable to retrieve the MainWindowTitle.

Windows Services don't usually have a UI. They are a background process
with no user interaction. No UI means no MainWindowTitle.

--
Patrick Steele
http://weblogs.asp.net/psteele
Oct 5 '06 #3
In article <FA**********************************@microsoft.co m>,
RM*@discussions.microsoft.com says...
I think you misunderstood my question. My service is trying to pickup the
MainWindowTitle of other processes running on the server. I found a post
(elsewhere) that said to check the "Allow service to interact with desktop"
checkbox; howerver, my service is running under a user account and not the
Local System Account. Does anyone know of a way around this?
Out of curiosity, does the MainWindowHandle return something other than
IntPtr.Zero?

--
Patrick Steele
http://weblogs.asp.net/psteele
Oct 5 '06 #4

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

Similar topics

3
8863
by: tornado | last post by:
Hi all, I am pretty new to PHP. I was reading PHP manual and trying out the example from 2nd chapter (A simple Tutorial). When i try to print the variable as given in the example it returns...
5
8216
by: build | last post by:
G'day All, I have a problem with this loop. There are a number of .txt files in 'myPath'. tmpFile = Dir(myPath & "\*.txt") 'PROCESS FOLDER Do Until tmpFile = "" <lottsa code> <too much to...
2
7399
by: Von Shean | last post by:
I use the following code to format the numbers to have commas. But in case when input is zero it returns an empty string....any ideas? String.Format("{0:#,###.##}",dblNum);
7
6885
by: Jim Carlock | last post by:
Does a SELECT element (listbox) need to be inside a FORM element? The code I'm playing with: <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"...
13
3199
by: Noa | last post by:
Hi I have a page that looks like that: <form name="kuku1" action ="anotherpage.html" > <input name="name"> <input name="kuku2"> </form> As far as i know, "getAttribute" should return a...
0
1094
by: kurt sune | last post by:
I have written a Custom Validator. However the ServerValidate(ByVal source As Object, ByVal args As ServerValidateEventArgs): sub gets called twice. First with an empty args-argument, secondly...
6
20854
by: Michi Henning | last post by:
I'm running the following code in Safari 2.0.4: document.cookie = 'MyCookie=1'; if(document.cookie == '') alert('document.cookie is empty!'); document.cookie always returns the empty string,...
2
6275
by: MDANH2002 | last post by:
Hi From VB.NET I want to simulate the POST request of the following HTML form <html> <title>HTTP Post Testing</title> <body> <form action=http://www.example.com/postdata ...
5
2622
by: Travis | last post by:
I am using a function that returns a const char * that is usually a word, etc. How can I check to see if what it returns is empty? I tried if (function() == "") and (function() == NULL) and...
0
7265
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7171
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
7545
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
7539
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...
0
5692
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5095
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...
0
3240
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
807
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
461
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.