C# School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become a C# Expert!

Join 306,817 C# Programmers for FREE! Get instant access to thousands of C# experts, tutorials, code snippets, and more! There are 1,684 people online right now. Registration is fast and FREE... Join Now!




Send Keys To Minimized window

 

Send Keys To Minimized window

Cha0sBG

10 Apr, 2009 - 12:06 PM
Post #1

D.I.C Head
Group Icon

Joined: 9 Apr, 2009
Posts: 140



Thanked: 4 times
Dream Kudos: 50
My Contributions
Hello,
I was wondering if anyone can help me. I want to send enter keys to a window. No matter if it's minimized or not. Searched a lot for this but couldn't find it. So i'm hopping that someone from here can help me smile.gif

Regards:
~Cha0sBG

User is online!Profile CardPM
+Quote Post


PsychoCoder

RE: Send Keys To Minimized Window

10 Apr, 2009 - 12:17 PM
Post #2

I Code, Therefore I am
Group Icon

Joined: 26 Jul, 2007
Posts: 14,919



Thanked: 517 times
Dream Kudos: 11525
Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net, jQuery

My Contributions
In order to send keyboard input to a window that doesn't have focus (I.e; minimized) you're going to need to use low level keyboard hooks
User is offlineProfile CardPM
+Quote Post

Cha0sBG

RE: Send Keys To Minimized Window

10 Apr, 2009 - 12:34 PM
Post #3

D.I.C Head
Group Icon

Joined: 9 Apr, 2009
Posts: 140



Thanked: 4 times
Dream Kudos: 50
My Contributions
That's for a console app as i read.
Will it be appropriate to ask u to give me an example with a Forms Application ? and the process handle to be obtained from a listbox with the name listBox1
key i need to send is enter biggrin.gif
If u do that i will be very grateful smile.gif
User is online!Profile CardPM
+Quote Post

PsychoCoder

RE: Send Keys To Minimized Window

10 Apr, 2009 - 12:43 PM
Post #4

I Code, Therefore I am
Group Icon

Joined: 26 Jul, 2007
Posts: 14,919



Thanked: 517 times
Dream Kudos: 11525
Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net, jQuery

My Contributions
That is an example only. That same code can be implemented in either a console application or a WinForms application
User is offlineProfile CardPM
+Quote Post

papuccino1

RE: Send Keys To Minimized Window

10 Apr, 2009 - 01:02 PM
Post #5

C# Programmer
Group Icon

Joined: 2 Mar, 2008
Posts: 945



Thanked: 33 times
Dream Kudos: 50
My Contributions
You building yourself a keylogger you sly dog you. wink2.gif
User is offlineProfile CardPM
+Quote Post

Cha0sBG

RE: Send Keys To Minimized Window

10 Apr, 2009 - 01:17 PM
Post #6

D.I.C Head
Group Icon

Joined: 9 Apr, 2009
Posts: 140



Thanked: 4 times
Dream Kudos: 50
My Contributions
nah not a keylogger lolz ...... i want to sendkeys not get them biggrin.gif i'm building an autologin for a game. It's totally legal happy.gif

PS: WTH is this tittle "New D.I.C Head" WtF?!?!?! is the admin drunk or something ;D biggrin.gif

This post has been edited by Cha0sBG: 10 Apr, 2009 - 01:17 PM
User is online!Profile CardPM
+Quote Post

papuccino1

RE: Send Keys To Minimized Window

10 Apr, 2009 - 01:24 PM
Post #7

C# Programmer
Group Icon

Joined: 2 Mar, 2008
Posts: 945



Thanked: 33 times
Dream Kudos: 50
My Contributions
I think it's just an intended pun.
User is offlineProfile CardPM
+Quote Post

Cha0sBG

RE: Send Keys To Minimized Window

10 Apr, 2009 - 01:25 PM
Post #8

D.I.C Head
Group Icon

Joined: 9 Apr, 2009
Posts: 140



Thanked: 4 times
Dream Kudos: 50
My Contributions
i'm looking at the example and i see how it hooks to the process but i don't understand how to send the enter key etc o.O either i'm a complete moron or i don't know biggrin.gif
User is online!Profile CardPM
+Quote Post

papuccino1

RE: Send Keys To Minimized Window

10 Apr, 2009 - 02:53 PM
Post #9

C# Programmer
Group Icon

Joined: 2 Mar, 2008
Posts: 945



Thanked: 33 times
Dream Kudos: 50
My Contributions
Are you by any chance making a automatic logger for Darkfall Online? xD
User is offlineProfile CardPM
+Quote Post

Cha0sBG

RE: Send Keys To Minimized Window

10 Apr, 2009 - 03:14 PM
Post #10

D.I.C Head
Group Icon

Joined: 9 Apr, 2009
Posts: 140



Thanked: 4 times
Dream Kudos: 50
My Contributions
nop happy.gif other game but lets not get offtopic biggrin.gif
User is online!Profile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/20/09 10:10PM

Live C# Help!

Be Social

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

C# Tutorials

Reference Sheets

C# Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month