473,804 Members | 3,453 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 5061
In article <FA************ *************** *******@microso ft.com>,
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************ *************** *******@microso ft.com>,
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************ *************** *******@microso ft.com>,
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 MainWindowHandl e 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
8903
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 a empty value instead of returning the browser type. Here is the line which i am using in my code and from manual: <?php echo $_SERVER; ?>
5
8231
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 post> tmpFile = Dir
2
7439
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
6898
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" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <!-- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
13
3237
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 string value of an
0
1114
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 with a correct value. By debugging I found that the first call to Me.GetControlValidationValue(Me.ControlToValidate)
6
21044
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, no matter what I do. I checked the cookie settings in Safari->Preferences->Security. Even when I set cookies to be always accepted, document.cookie still returns the empty string.
2
6311
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 enctype="multipart/form-data" method="post" name="testform">
5
2642
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 (function() == '/0'). But then I see that the those if statements are flagging true when the function returns back a char * or no length
0
9705
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9576
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10567
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10310
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10074
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9138
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
4291
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3809
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2983
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.