منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب
[سؤال] تشغيل بور بوينت فى فيجوال بيسك 2010 - نسخة قابلة للطباعة

+- منتدى فيجوال بيسك لكل العرب | منتدى المبرمجين العرب (http://vb4arb.com/vb)
+-- قسم : قسم لغة الفيجوال بيسك VB.NET (http://vb4arb.com/vb/forumdisplay.php?fid=182)
+--- قسم : قسم اسئلة VB.NET (http://vb4arb.com/vb/forumdisplay.php?fid=183)
+--- الموضوع : [سؤال] تشغيل بور بوينت فى فيجوال بيسك 2010 (/showthread.php?tid=2047)



تشغيل بور بوينت فى فيجوال بيسك 2010 - HJUTIUT - 27-02-14

اريد تشغيل عرض بور بوينت فى فيجوال بمجرد الضغط على الزرار فيجوال 2010


RE: تشغيل بور بوينت فى فيجوال بيسك 2010 - Genius Live - 28-02-14

كود :
<DllImport("user32.dll", EntryPoint := "FindWindow", SetLastError := True)> _
Private Shared Function FindWindow(ZeroOnly As IntPtr, lpWindowName As String) As IntPtr
End Function
<DllImport("user32.dll", SetLastError := True)> _
Private Shared Function SetParent(hWndChild As IntPtr, hWndNewParent As IntPtr) As IntPtr
End Function
<DllImport("user32.dll", SetLastError := True, CharSet := CharSet.Auto)> _
Public Shared Function SetWindowText(hwnd As IntPtr, lpString As [String]) As Boolean
End Function
Private FileName As String = ""
Private application As PowerPoint.Application
Private presentation As PowerPoint.Presentation
Private flag As Boolean = False
Public Sub New()
    InitializeComponent()
End Sub
Public Sub open()
    sair()
    openFileDialog1.Filter = "Powerpoint file (*.ppt)|*.ppt|All files (*.*)|*.*"
    If openFileDialog1.ShowDialog() = DialogResult.OK Then
        FileName = openFileDialog1.FileName
        Dim screenClasshWnd As IntPtr = DirectCast(0, IntPtr)
        Dim x As IntPtr = DirectCast(0, IntPtr)
        flag = True
        application = New PowerPoint.Application()
        presentation = application.Presentations.Open2007(FileName, Microsoft.Office.Core.MsoTriState.msoTrue, Microsoft.Office.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoTrue)
        Dim sst1 As PowerPoint.SlideShowSettings = presentation.SlideShowSettings
        sst1.ShowType = DirectCast(1, PowerPoint.PpSlideShowType)
        Dim sw As PowerPoint.SlideShowWindow = sst1.Run()
        sw.Height = (panel1.Height) - 64
        sw.Width = (panel1.Width) - 130
        Dim formhWnd As IntPtr = FindWindow(x, "Form1")
        Dim pptptr As IntPtr = DirectCast(sw.HWND, IntPtr)
        screenClasshWnd = FindWindow(x, "screenClass")
        SetParent(pptptr, panel1.Handle)
        Me.Focus()
        Me.application.SlideShowEnd += New Microsoft.Office.Interop.PowerPoint.EApplication_SlideShowEndEventHandler(SlideShowEnds)
    End If
End Sub

والله أعلي وأعلم
RolleyesRolleyesRolleyes



RE: تشغيل بور بوينت فى فيجوال بيسك 2010 - Genius Live - 28-02-14

قم بتحميل وتنصيب القارئ علي جهازك أولا
PowerPoint Viewer 2007

RolleyesRolleyesRolleyes


RE: تشغيل بور بوينت فى فيجوال بيسك 2010 - HJUTIUT - 28-02-14

انا نزلت البرنامج ووضعت الزار لكن محصلش حاجة وطلع اكتر 13 خطا ممكن شرح اذا كان هناك ادوات اضعها او اغير اسماءها