Windows 2003 server SetForegroundWindow|BringWindowToTop|SetWindow

Hi all,

I'm trying to use this functions 
(SetForegroundWindow|BringWindowToTop|SetWindowPos) on Windows 2003 server, 
but it is working when I have a Administrator level and when I try the 
sameprogam with the operator level I have an exception like <Impossible to 
run this information from the remote pc>. 
I tryed the same program on Window XP with the operator level and it is 
working.

Somebody knows why ?

I'm looking forward to receiving an answer soon possible.

BR 
lolo

0
LOLO (8)
2/9/2006 9:07:27 AM
vc.mfc 33608 articles. 0 followers. Follow

2 Replies
738 Views

Similar Articles

[PageSpeed] 8

An exception sounds surprising; none of those APIs are specified as throwing an exception.
You would have to show some code to explain what is going on here.

The discussion of SetForegroundWindow does suggest that there are certain limitations. For
example, a process can only set the foreground window if it is already the foreground
process (e.g., it can cause one of its own windows to yield foregroundness), or it is a
process started by the foreground process, or if there is no current foreground process.
There are a few other conditions.  You  have not stated the entire problem; for example,
is it one of your windows for which you are trying to set the foreground property?

Perhaps privileges affect this, but without a complete specification of the problem, it is
hard for anyone to test what your situation is.
				joe

On Thu, 9 Feb 2006 01:07:27 -0800, "Lolo" <Lolo@discussions.microsoft.com> wrote:

>Hi all,
>
>I'm trying to use this functions 
>(SetForegroundWindow|BringWindowToTop|SetWindowPos) on Windows 2003 server, 
>but it is working when I have a Administrator level and when I try the 
>sameprogam with the operator level I have an exception like <Impossible to 
>run this information from the remote pc>. 
>I tryed the same program on Window XP with the operator level and it is 
>working.
>
>Somebody knows why ?
>
>I'm looking forward to receiving an answer soon possible.
>
>BR 
>lolo
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
0
newcomer (15974)
2/12/2006 11:37:55 PM
Hello, 

Thank you for you answer, but just to give you more information, I'm using 
Visual .Net C# and into my code I'm using this code:

[DllImport("user32.dll")] 
public static extern bool SetForegroundWindow(IntPtr hWnd);
try
{
SetForegroundWindow(stTempRunningApplication.ProcessInfo.MainWindowHandle);
}
catch(Exception err)
{
MessageBox.Show(err.Message);
}

And I see the exception with any Window form not only with mine, for example 
notepad.exe, calc.exe

I hope that I give you more information to help me.

BR
Laurent



"Joseph M. Newcomer" wrote:

> An exception sounds surprising; none of those APIs are specified as throwing an exception.
> You would have to show some code to explain what is going on here.
> 
> The discussion of SetForegroundWindow does suggest that there are certain limitations. For
> example, a process can only set the foreground window if it is already the foreground
> process (e.g., it can cause one of its own windows to yield foregroundness), or it is a
> process started by the foreground process, or if there is no current foreground process.
> There are a few other conditions.  You  have not stated the entire problem; for example,
> is it one of your windows for which you are trying to set the foreground property?
> 
> Perhaps privileges affect this, but without a complete specification of the problem, it is
> hard for anyone to test what your situation is.
> 				joe
> 
> On Thu, 9 Feb 2006 01:07:27 -0800, "Lolo" <Lolo@discussions.microsoft.com> wrote:
> 
> >Hi all,
> >
> >I'm trying to use this functions 
> >(SetForegroundWindow|BringWindowToTop|SetWindowPos) on Windows 2003 server, 
> >but it is working when I have a Administrator level and when I try the 
> >sameprogam with the operator level I have an exception like <Impossible to 
> >run this information from the remote pc>. 
> >I tryed the same program on Window XP with the operator level and it is 
> >working.
> >
> >Somebody knows why ?
> >
> >I'm looking forward to receiving an answer soon possible.
> >
> >BR 
> >lolo
> Joseph M. Newcomer [MVP]
> email: newcomer@flounder.com
> Web: http://www.flounder.com
> MVP Tips: http://www.flounder.com/mvp_tips.htm
> 
0
LOLO (8)
2/13/2006 8:04:27 AM
Reply:

Similar Artilces:

About OWA logot window
Dear all, My Exchange Server is 2003. When I logout OWA, it will pop-up a logout window. But I don��t want this logout message. Can I disable that? Many thanks for your help! ...

MS Office Publisher Help window appears after every print job
I've just started using Publisher 2003 and am doing fine with most of it. However, one thing is driving me crazy... every time I send a job to a printer, whether it's an actual printer like my HP Laserjet 4MV or a virtual printer like the Acrobat PDF 7, after the job spools out, the MS Office Pint Help window appears, on a page that says "Troubleshoot printing publications on a desktop printer." I didn't clikc on help. I don't need help, because the jobs print fine... why does this window keep appearing, and more importantly, how do I make it stop appearing sh...

Terminal server install domain problem help please
Hi everyone, this is my setup windows 2003 sbs acting as domain controller, exchange, microsoft crm ect windows 2003 standard acting as a terminal server and member server I had a problem with folder redirection which works fine but i manually had to give permission to each individual on the sbs server to the folder redirection folder, is this normal? seems cumbersum My problem is i have install microsoft crm on the 2003 sbs and now i am trying to configure access via the outlook client on the terminal server but i can only get it to work for the administrator. i noticed under the term...

Failed Updates for Excel 2003 (KB978474)
Hi, Does anybody have any idea why the recent update from MS for Excel (KB978474) would not update and what can I do to get this update through? I keep getting the below message and not much of any description what I could do. The problem is that: 1. After failure, the Windows Update does not stop (unless I turn it off manually) and still tries to install this update 2. After each update Excel is somehow corrupted or uninstalled. After attempt to start it, it reinstalls and than runs seemingly OK. I seem to be unable to break this vicious circle. I tried to reinstall Exce...

Microsoft Online Seminars: Prepare Publisher 2003 Files for Commercial Printing
The following link takes you to a series of seminars for Commercial Printers that demonstrate to how to properly and successfully process Publisher 2003 files for professional output. http://www.microsoft.com/Seminar/MMCFeed/MMCDisplay.asp?Lang=en&Product=103384 -- Brian Kvalheim Microsoft Publisher MVP http://www.mvps.org/publisher This posting is provided "AS IS" with no warranties, and confers no rights. ...

Error Message in Outlook 2003 #5
Hi all, I Open a mail-item folder such as Inbox and click the New button on the Standard toolbar A blank Message form for creating a new outgoing email message appears. I Complete the Message form and send the message or so I think. I seem to get another dialog box that tells me I cant send as there is a message open already. Any suggestions, cheers, andy. ...

Can't send email from CRM after installing WSS on Exchange server
Hi, I have major problem after installing Windows SharePoint Services on Exchange server (Exchange 2003 on Windows 2003 server). Now I can't send emails from CRM any more......error from the log is at the botom.... I have already tried this: 1. I have already corrected mailserverurl in the registry of crm server 2. I have checked permissions in MSCRMConnector folder in IIS of the Exchange Server and its Enabled anonymous access 3. I have configured WSS virtual server to use Kerberos authentiocation (because it was switched off during install, and for that reason my OWA didn't work) ...

Installing Windows 2003 SP1 on Exchange 2003 SP1
I hope someone can share his/her experience installing Windows 2003 SP1 on Exchange 2003 SP1. I have some front end (exchange 2003 SP1) servers running on windows 2003 server, before upgrading them to exchange SP2 I would like to install W2k3 SP1. Are there any hot fixes needed? Do I have to reinstall Exchange SP1 after I install Windows 2003 SP1 ? Any notes or links (couldn’t find any so far) regarding this issue will be very much appreciated. -- Nawar Aljanabi MCSE NT/2000/2003,MCSA 2003 +M,CCNA Do not need to reinstall Exchange 2003 SP1. Microsoft Windows Server 2003 Service Pac...

Access SMTP Server
Hello, We've recently signed up for off-site mail filtering and our provider has instruced us to edit the "Allowed to use" paramter of the default SMTP server to only include pc's on our LAN and the IP address of our mail filter. (gets our email first, filters it, then forwards to us.) Is this correct? The end result is we only want mail coming from one source but everyone on the subnet to be able to send out, including the server. Thank you, On Fri, 27 May 2005 15:17:13 -0400, "Somedude" <cbell5724@[nospam]wideopenwest.com> wrote: >Hello, > >...

Outlook 2003 #229
I am running XP Professional with Service Pack 2 installed. Outlook 2003 also was updated via Outlook Service Packs. Problem: I open Outlook and it works and also places a icon in task bar. I exit Outlook (not close) and Icon remains in task bar. Also I cannot reopen Outlook in anyway. I must reboot. As PC closes to reboot an error message states the phrase CiceroUlWndFrame. I have used Detect amd Repair but problem remains. Anthony Some common reasons why Outlook will not shut down completely when you click either the X or Exit: 1. PDA synchronization software with your PDA in th...

Windows 2003 SBS Max connections / users
I've read some of the previous posts regarding max # of users, unavailable connections, etc however I think I've got a slightly different twist on the issue. I'm running SBS 2003, SP2 - patches up to date, etc. We have 5 original CALs plus an additional 5 DEVICE CALs installed. It is rare for 10 users to be logged in at any one time, but it does happen. The issue I'm having is that occasionally a user will get a message that they can't connect, or their Outlook won't be able to connect to Exchange or something similar. If I go in to Computer Manag...

Outlook 2003 POP save on server x days
Hi, In Outlook 2003 - Accessing POP3 Mail - When you select save on server x number of days - When does the time count for days begin? Lets say I have old E-Mails in Outlook - and on the server - I choose to leave on server 30 days - Will all E-Mail older than 30 days be removed from the server - immediately? Or will the time count 30 days from when I chose to leave them on the server - so 30 days from when I chose to leave on server for x days - they will begin being removed from the server? Thank You it's 30 days from the date you downloaded them into outlook. I...

CRM Rollup 2 for Windows XP x64 client
Have been running CRM 3.0 on a Windows XP SP2 x64 client for a while without a problem, have to perform a repair in the install the other day and needed to apply the rollup 2 for the install, however when I attempt to perform the install it tells me it's for another hardware platform. Is there a version for x64 Windows XP I missed? Any help would be appreciated. ...

Prolems with Exchange Server
We have Outlook 2003 on client computers connected to Small Business Server 2003. We originally had the email configured on Outlook for our ISP's POP server. Now, however, on one computer it tries to connect to Exchange Server. It cannot log on to Exchange Server, and it cannot open the default mail files, so Outlook shuts down. So we can't get into Outlook on that machine. We can configure email accounts in Control Panel/users/email settings, but all attempts to get back to the POP email configuration don't change the behavior of not being able to enter Outlook because i...

Outlook 2003
I used to use Outlook Express and was able to modify an email message's HTML source code. I can't seem to find a way to do that using Outlook. Does anyone know how that can be done? Am I missing a setting somewhere? Thank you, Tracy Outlook doesn't have a source editor. You can edit it in another html editor and paste into OL. -- Diane Poremsky [MVP - Outlook] Author, Teach Yourself Outlook 2003 in 24 Hours Coauthor, OneNote 2003 for Windows (Visual QuickStart Guide) Outlook Tips: http://www.outlook-tips.net/ Outlook & Exchange Solutions Center: http://www.slipstic...

Outlook 2003 calender problem driving me nuts ! #3
Hi guys, This is my first post here - and my last hope before I go completeley insane ! I am having a problem with MS Outlook 2003 calender. I have looked extensively on the net, but can not see anything remotely like this. Every date in every view is duplicated - in the individual day boxes, and in the view header.I have attached a screen dump. Please, please, please can someone tell me what is causing this ? I have reinstalled numerous times, but it eventually returns ? Thanks in advance ...

SVG problems in Visio 2003 SP 2
Hi! I tried to create a new document (metrics format) and added a few different shapes (also metric). I saved the document in SVG format and closed the document. I then tried to open the document again, but got a lot of errors, and some of my shapes could be located at the lower left corner, but a bit misshaped. Also when opening the document i IE it is incorrect. (I detected this behavior with a mush more complex drawing, and that was totally messed up after saved as SVG.) Is this a known error, or is there something wrong with my local setup? Best Regards, Andreas Lundgren Log file: Op...

Export emails from Vista windows Mail to Outlook Express 08-18-10
Sorry but somehow I couldn't add this to the original thread of the Post I sent earlier this month. My friend wanted to Export emails from Vista Windows Mail to Outlook Express Anyway although this is no longer a problem as my friend finally found another way to do this I am curious as to why her AppData did not appear. I passed on the instructions to her and also tested it out myself on W7 WLM and it worked for me. However when she started to go through the procedure she found out where her Store folder was located and when she tried to navigate to her Store folder s...

ms publisher 2003 inserting graphic from the web
Have insall at work ms publisher and office 2000, now upgraded to 2003, in pub 2000 used to select insert graphic and options for access from web brought you to ms gallery page. In 2003, no dropdown menu shows the internet option. Have I lost my mind? or is it specific to the install on our mainframe. HELP. Need my graphics -- bruceL If you're talking about clipart, just search for whatever and it will automatically search the MS website. -- JoAnn Paules MVP Microsoft [Publisher] ~~~~~ How to ask a question http://support.microsoft.com/KB/555375 "Bruce" <Bruce@d...

Money 2003 Invoice Templates
Created a invoice from Money's invoice designer. The designer won't let you display the project title. I would think that would be an important piece of information when my customers get invoiced. Anyway to have an invoice print the project title? Thanks, Brad ...

SetWindowsHookEx from service to user window
I can call successfully hook into another window's message proc but the same won't work from a service. Even after turning 'allow to interact with desktop' i still get ERROR_ACCESS_DENIED when calling SetWindowsHookEx. I know it has to do with security, desktops and window stations but I still havent figured it out. I'm not sure if I need an extra thread and which thread needs to be associated with which desktop. This is what I've tried so far: hWnd -> hooked window DWORD thid = GetWindowThreadProcessId(hWnd,NULL); HDESK desk = OpenDesktop("default"...

Windows 2003 AD and CRM
Will MS CRM install and function in a Windows 2003 AD domain? Thanks, It SHOULD run on it...may have to tweak some default settings on the box though. Dean >-----Original Message----- >Will MS CRM install and function in a Windows 2003 AD domain? > >Thanks, > > >. > I have been told that CRM will fuction in a a 2003 domain environment. Just dont try to load CRM onto a server running 2003. "Shawn Hayes" <shawn.hayes@compass.net> wrote in message news:OIBKSFuhDHA.1200@TK2MSFTNGP09.phx.gbl... > Will MS CRM install and function in a Windows 2003...

Strange Characters in the Accounts List Window
Hello: A client of ours is on Great Plains 8.0 with service pack 1a. He likes to make use of the "Accounts" window from the Financial Lists section of the Navigation Pane. Intermittently--certainly not all of the time--he will click on this list and some of the account descriptions will be "fuzzy" or, at best, the characters are just plain strange looking. The only thing that is different about the client's GP app is that I used Modifier to increase the width of the Account number column in the chart of accounts lookup window. I had to do this because the clie...

MS CRM
Does anyone know if there would be problems with this? We have and application (Kronos) that runs through an apache web server to an sql database that is all on one server. We want to install CRM on that same server and still be able to use the other application. My thoughts are to bind another ip address to the NIC, publish that address in dns and bind IIS to that. Then install CRM and use the second address for CRM and the original for the other application. Any thoughts are appreciated. As long as Apache & IIS can co-exist on the same server, then I don't see any reason why th...

Where is Microsoft Exchange Server in Outlook 2007?
I have a Palm TX. I'm trying to synchronize it with Outlook2007. Palm's help FAQ apparently refers to Office XP saying to activate Microsoft Exchange from Tools. What is the work-around for Outlook2007? EdC Exchange is a corporate mail server. If you are using a POP3 or IMAP account, it is irrelevant. -- Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. How to ask a question: http://support.microsoft.com/KB/555375 After furious head scratching, OldManEd asked: | I have a Palm TX. I'm trying to synchronize it with Outlook2007....