2012-01-19 3 views
0

템플릿에서 슬라이드 가져 오기와 같은 일부 작업을 수행하는 VSTO에 Powerpoint AddIn이 있습니다. Force Powerpoint 기본 창 업데이트

는 사용자 친화적하기 위해, 나는 슬라이드를 삽입 한 후, 슬라이드 창이 새로 고쳐지지 않습니다 WithWindow = MsoTriState.msoFalse

를 사용하여 템플릿을 엽니 다.

내가 RedrawWindow처럼 호출 WinAPI를 SOMES을 시도했지만 그것이 내가 새로 고침 전체 파워 포인트의 창을 강제로 어떻게

을 나던 작동?

답변

0

프레젠테이션 개체의 NewWindow 메서드를 호출합니다.

Sub ShowYourStuff() 

    Dim oPres As Presentation 
    Set oPres = Presentations.Add(msoFalse) 
    oPres.Slides.Add 1, ppLayoutChart 
    oPres.Slides.Add 1, ppLayoutFourObjects 

    MsgBox "Ready to show the user stuff?" 

    oPres.NewWindow 

End Sub 
0

나는 창을 다시 칠하지만 널 사각형을 사용하는 경우 어려움을 겪고 기억하는 파워 포인트를 강제로 InvalidateRect를 사용했습니다 생각 : 다음은 VBA의 예입니다.

<StructLayout(LayoutKind.Sequential)> _ 
Public Structure RECT 
    Public left As Integer 
    Public top As Integer 
    Public right As Integer 
    Public bottom As Integer 
End Structure 

... 
Dim windowRect As RECT 
GetWindowRect(New IntPtr(Application.HWND), windowRect) 
InvalidateRect(New IntPtr(Application.HWND), New Rectangle(0, 0, windowRect.right - windowRect.left, windowRect.bottom - windowRect.top), True) 
을 시도 할 수