Welcome to Dream.In.Code
Become an Expert!

Join 150,217 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 2,133 people online right now. Registration is fast and FREE... Join Now!




Get Window Handle

 
Reply to this topicStart new topic

Get Window Handle, Getting the window Handle using ASP Net ?

nealgabriel45
13 Nov, 2007 - 09:55 PM
Post #1

New D.I.C Head
Group Icon

Joined: 22 Oct, 2007
Posts: 46


Dream Kudos: 50
My Contributions
Is it Possible to get the Window Handle Using ASP Net. In Windows Application, by using the API FindWindow and AppActivate Function we can get the Handle of the Window as well as activating it. The ASP Program should get the handle of the Window which runs in any of the Client System.

Say for example. I have a Software which has the title "TEST SOFTWARE"
To get the handle of the window, all you need to give is
lHandle = FindWindow(vbnullstring,"TEST SOFTWARE") ' Where lHandle is the Handle and FindWindow is the API.

I am gettin the handle during debug mode. But after publishing it wont return any value.. This is because it is searching the window in the server..
Is there any solution to find the window in the client side.?


Waiting for the reply..

Tahngzzzz and Regards
Neal Gabriel;

User is offlineProfile CardPM
+Quote Post

skaoth
RE: Get Window Handle
13 Nov, 2007 - 11:32 PM
Post #2

D.I.C Regular
Group Icon

Joined: 7 Nov, 2007
Posts: 357



Thanked: 12 times
Dream Kudos: 100
My Contributions
I haven't tried this from a client/server model but I think it can be done.
You will most likely need to create an ActiveX object. What you need is
something that will run in the clients context.

Here a tutorial on how to create one via VC6 and ATL
http://www.codeproject.com/asp/cookie.asp

When creating the AX object make sure that it implements
a dual interface.

Of course AX objects means that this can only be done with IE clients.
There will also be security concerns if the dll that houses the AX object
isn't signed. One last thing too, is that the AX Object should be marked as
scriptable. This is done via IObjectSafetyImpl.

Hope that helps.
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/9/09 05:31AM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live Help!

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month