Red Gate forums :: View topic - F5 Programmatically
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
PInvoke.Net
PInvoke.Net forum

F5 Programmatically

Search in PInvoke.Net forum
Post new topic   Reply to topic
Jump to:  
Author Message
bhaidar



Joined: 28 Oct 2008
Posts: 4

PostPosted: Tue Oct 28, 2008 4:37 pm    Post subject: F5 Programmatically Reply with quote

Hello,
I have developed a Shell Extension in C# using the EZnamespace Framework.

I need to programmatically call "F5" on Windows from my code.

What method I shall call on the Win32 API to simulate the F5 key?

Thank you
Back to top
View user's profile Send private message
Robert



Joined: 30 Oct 2006
Posts: 428
Location: Cambridge, UK

PostPosted: Tue Oct 28, 2008 5:14 pm    Post subject: Reply with quote

Hi,

Have a look at http://www.codeproject.com/KB/cpp/sendkeys_cpp_Article.aspx - it's an example in C++, but it should give you pointers to the right APIs to be looking at...

Hope that helps,
Robert
_________________
Robert Chipperfield
Developer, Red Gate Software Ltd
Back to top
View user's profile Send private message MSN Messenger
bhaidar



Joined: 28 Oct 2008
Posts: 4

PostPosted: Tue Oct 28, 2008 5:27 pm    Post subject: Reply with quote

That's cool!

Thanks a lot. I will have a look at it and come back for any further questions!

Thanks
Back to top
View user's profile Send private message
bhaidar



Joined: 28 Oct 2008
Posts: 4

PostPosted: Wed Oct 29, 2008 9:45 am    Post subject: Reply with quote

Hi Robert,
That article was of great help.
I found SendKeys.Send() method in C# helpful to do what I want.

I still need one more thing please, is there a Win32 API method to call the "Auto-Fit" inside Windows Explorer?

In Windows Vista, you can right-click a column and then click "Auto Fit all columns". Is there a method inside the Win32 API that help me do this programmatically?

Thank you.
Back to top
View user's profile Send private message
Robert



Joined: 30 Oct 2006
Posts: 428
Location: Cambridge, UK

PostPosted: Wed Oct 29, 2008 10:34 am    Post subject: Reply with quote

Glad to hear you've got it working Smile.

I'm afraid I don't know of a way of doing the auto-fit programmatically, but I've not really played around a lot with shell extensions, so I'm probably not the best person to ask!

Someone did post a similar question on MSDN, but there haven't been any replies yet.

Cheers,
Robert
_________________
Robert Chipperfield
Developer, Red Gate Software Ltd
Back to top
View user's profile Send private message MSN Messenger
bhaidar



Joined: 28 Oct 2008
Posts: 4

PostPosted: Wed Oct 29, 2008 11:12 am    Post subject: Reply with quote

Thanks Robert for all your help.

I hope someone would jump in and help on the issue of Auto-Fit.

Thanks
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group