What's the equivalent of it in C#? I tried searching but to no avail... :(
Printable View
What's the equivalent of it in C#? I tried searching but to no avail... :(
You could add the using Microsoft.VisualBasic; in the declarations section of your class. Then you will see the tooltip declaration just like before.
VB Code:
using Microsoft.VisualBasic; '... '... AppActivate("VBForums - AppActivate in C# - Microsoft Internet Explorer");
There is no equivalent, as there isn't to any VB.NET Runtime functions. If there was a System-based equivalent then we'd all be using it in VB.NET too. I'd guess that AppActivate wraps the SetForeGroundWindow API (amongst others), because that's the only way to do it that I'm aware of in C#, short of what Rob suggested.
BTW Rob, you'd better hope that wossname doesn't see that post. ;)
Oh, he wont. Remember that he got himself Banned. ;)
Plus, I did post that "you could" do it that way. :p
Hmmmnnn... That's what I am afraid of, to resort to Microsoft.VisualBasic in C#... :D Will look into those API thingy first... Thanks guys! :)
I assume your trying to send text to a window.....
This maybe what your looking for. Just change the class window to whatever your sending text to
http://www.vbforums.com/showthread.php?t=380589
You should be ashamed of yourself for even thinking that in the c# forum. If I had a sceptre, I'd banish you from this forum for a complete 19 minutes.Quote:
Originally Posted by RobDog888
SetForeGroundWindow works if the app is not minimized, any tips on how to get it done when the app is minimized? :)
I would guess that you would have to use SetWindowPlacement to restore the window first, then call SetForegroundWindow to activate it. I've never used SetWindowPlacement though so I'm not 100% sure. Note that AppActivate will not restore a minimised window either.
Thanks 'spammer' :D , will dig into it... :)
You ever use Lutz Roeder's Reflector? I'm not sure if it's legal, so I won't post the code for AppActivate, but if you download the freeware, you can check out the code that makes up that method :) It's not trivial.
Mike
I have that issue before dee-u. Try to visit this link it works in my machine.
http://vbforums.com/showthread.php?t...light=activate
Thanks mar_zim... :afrog:Quote:
Originally Posted by mar_zim