Set focus taskpane PowerPoint

Add-in Express™ Support Service
That's what is more important than anything else

Set focus taskpane PowerPoint
 
Ulrik Gustafsson




Posts: 9
Joined: 2011-08-17
I have a keyboard handler in the main Addin module

Private Sub ctl_Shift_L_Action(sender As System.Object) Handles ctl_Shift_L.Action

Dim TaskPane As QSPowerPointTaskPane

TaskPane = TryCast(CType(QuickSlideBuilder.AddinModule.CurrentInstance, QuickSlideBuilder.AddinModule).AdxPowerPointTaskPanesCollectionItem1.TaskPaneInstance, AddinExpress.PP.ADXPowerPointTaskPane)

TaskPane.lv.Items(0).Selected = True
TaskPane.lv.Select()

End Sub

I can activate the taskpane but the focus remain in PowerPoint. Is it possible in PowerPoint to let the focus remain on the taskpane in the keyboard routine. There seems to be no keyfilter event in PowerPoint taskpanes? :|

Thanks in advance :-)
Ulrik
Posted 25 Aug, 2011 10:07:19 Top
Eugene Astafiev


Guest


Hi Ulrik,

Please try to use the Focus method of your control or any other control which should have a focus.
Posted 25 Aug, 2011 10:28:24 Top
Ulrik Gustafsson




Posts: 9
Joined: 2011-08-17
Have tried that also - no result...

TaskPane.lv.Items(0).Selected = True
TaskPane.lv.Focus()

Even when the taskpane has focus this keyboard action selects the listitem but does not set focus on the listview...(it seems that it sets focus a micro second but then loses focus)
Posted 25 Aug, 2011 10:32:37 Top
Ulrik Gustafsson




Posts: 9
Joined: 2011-08-17
I resolved it with this...

SendMessageW(TaskPane.lv.Handle, WM_NCLBUTTONDOWN, HTCAPTION, 0&)

But there are maybe better ways ;)
Posted 25 Aug, 2011 11:01:43 Top
Alexander Solomenko




Posts: 140
Joined: 2009-02-27
Hi Ulrik,

I have created an empty PowerPoint project with a TaskPane that contains a listView control. The keyboard focus works fine.
Can you reproduce this issue with a new ADX project? If yes, please send it to me at the support email address.

Thanks.
Regards,
Aleksandr Solomenko
Posted 25 Aug, 2011 11:13:19 Top
Eugene Astafiev


Guest


Hi Ulrik,

I have just tested your add-in project on my PC with Office 2010. It works as expected; I didn't notice anything strange on my road: the Focus method does its job.

Please make sure that you have all the latest service packs installed for Office, OS, Visual Studio and .net framework.
Posted 26 Aug, 2011 06:44:25 Top