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

switch between external application

Hi,

I am creating a sort of desktop application. My problem is that word and
excel (and other external applications) are not responding to the
SetFocus method (or setforegroundwindow or bringwindowtotop or other
methods from user32.dll). Is there a posibility to do this handy in c#
or do i need to call a certain sequence of methods to give an
application the focus?

Best regards,

Bart
Feb 9 '06 #1
1 2947
Bart ,

There is no managed solution of doing this. You need to use PInvoke and
Windows API.

Both methods that you mentioned should do the truck for word and excel. I
guess you pass a wrong HWND
--

Stoitcho Goutsev (100)

"Bart van der Heijden" <ba**@lekkerknagen.nl> wrote in message
news:69**************************@news2.tudelft.nl ...
Hi,

I am creating a sort of desktop application. My problem is that word and
excel (and other external applications) are not responding to the SetFocus
method (or setforegroundwindow or bringwindowtotop or other methods from
user32.dll). Is there a posibility to do this handy in c# or do i need to
call a certain sequence of methods to give an application the focus?

Best regards,

Bart

Feb 9 '06 #2

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

Similar topics

16
by: Teffy | last post by:
Should I switch from using HTML-Kit to using Adobe GoLive? I am just a volunteer who is webmaster for a small non-profit group. I am the only person working on the site. The only reason I am...
1
by: S. van Beek | last post by:
Dear reader, In case an application is ussing an external model library you have to address this external model library in your application. This addressing takes place in a module of the...
0
by: Andrew | last post by:
I have a native c++ application that I built with the /clr compiler option. When the application is linked, I receive the following warnings: FaddClient.obj : warning LNK4227: metadata...
5
by: snicks | last post by:
I'm trying to exec a program external to my ASP.NET app using the following code. The external app is a VB.NET application. Dim sPPTOut As String sPPTOut = MDEPDirStr + sID + ".ppt" Dim p As...
13
by: Fei Liu | last post by:
Hi Group, I've got a problem I couldn't find a good solution. I am working with scientific data files in netCDF format. One of the properties of netCDF data is that the actual type of data is only...
2
by: Gnus | last post by:
Hi all! I have a little(?) problem with external schema location... I'm using xerces/xalan (C++) for doing some actions with some set of xml-files. Some of these files must validating...
4
by: Duncan Smith | last post by:
I have a VS2005 C++ MFC project which #imports a type library. The goal is to introduce some managed code eventually, but for starters I just need to set the /clr compiler option and build the...
7
by: =?Utf-8?B?bWljaGFlbCBzb3JlbnM=?= | last post by:
I am attempting to fetch data from an external process. It seems to work OK with regular arguments, but not with switch arguments. Here is an example of a failure:...
1
by: JasonT | last post by:
Hi. I have created a dll in VC++ 08 that exports a CLR windows form class. I call into this dll from an external (closed source, third-party) application to instantiate the form and embed it into...
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: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
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)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
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: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
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.