PDA

View Full Version : استفاده از اسلایدهای Power Point



VBYOFSKI
جمعه 24 آبان 1387, 17:34 عصر
سلام.

می خوام بدونم که چه جوری میشه توی VB از پروژه های Power Point استفاده کرد؟
مثلا از یه پروژه که 4 تا اسلاید داره چه جوری میشه اسلاید دوم رو توی یه Picture Box نشون داد؟

ممنون http://forum.iranled.com/images/smilies2/shy.gif

syntiberium
جمعه 24 آبان 1387, 22:46 عصر
با سلام . نظر من استفاده از send key و print screen است :چشمک: . با تشکر .

VBYOFSKI
شنبه 25 آبان 1387, 09:19 صبح
سلام
میشه یکم بیشتر توضیح بدین؟؟؟؟

VB.SOS
شنبه 25 آبان 1387, 21:59 عصر
با سلام . نظر من استفاده از send key و print screen است :چشمک: . با تشکر .

فكر كنم منظور اينه كه يه فايل پاورپوينت رو باز كني و بعد نمايشش بدي. كار به اين سادگي ها نيست. چون فرمت فايل اختصاصيه. به فكر كامپونت ها باشيد:کف::کف:

VBYOFSKI
یک شنبه 26 آبان 1387, 12:01 عصر
فكر كنم منظور اينه كه يه فايل پاورپوينت رو باز كني و بعد نمايشش بدي. كار به اين سادگي ها نيست. چون فرمت فايل اختصاصيه. به فكر كامپونت ها باشيد:کف::کف:

منظور منم همین بود.
درسته فرمت خاص خودشو داره ولی میخواستم یدونم نمیشه همونجور که فایلهای WORD و Excel رو توی وی بی ازشون استفاده میکنیم از اینم استفاده کرد؟؟؟؟؟؟

soheilhajipoor
یک شنبه 24 شهریور 1392, 08:12 صبح
سلام

هر چند پست قدیمی ولی برای دوستان پاسخ می دم


تو کامپوننت های ویبی 6 وقتی آفیس 2007 نصب بشه اکتیو ایکس هایی برای کار با پاورپوینت وجود داره
مثل Slide1

ولی چندان باهاش کار نکردم

راه حل دوم هم
تبدیل پاورپوینت به فلش و استفاده از Shockwave Flash هست
که احتمالا دوستان می دونن این موضوع رو
یاعلی

m.4.r.m
یک شنبه 24 شهریور 1392, 11:41 صبح
Option Explicit
Const APP_NAME = "PowerPoint in VB window"
Const SHOW_FILE = "C:\PowerPoint\Sample.ppt"

' PowerPoint Constants
Const ppShowTypeSpeaker = 1
' Undocument constant used to display show in a window
' without PowerPoint command bars.
Const ppShowTypeInWindow = 1000

Public oPPTApp As Object
Public oPPTPres As Object

' API's used:
' To locate the handle of the PowerPoint slideshow window
Private Declare Function FindWindow Lib "user32" _
Alias "FindWindowA" (ByVal lpClassName As String, _
ByVal lpWindowName As Long) As Long
' To set fram control as the parent of the slide show window
Private Declare Function SetParent Lib "user32" _
(ByVal hWndChild As Long, _
ByVal hWndNewParent As Long) As Long
' To set the caption of the window
Private Declare Function SetWindowText Lib "user32" _
Alias "SetWindowTextA" (ByVal hwnd As Long, _
ByVal lpString As String) As Long

Private Sub cmdShow_Click(Index As Integer)
Dim screenClasshWnd As Long
On Error Resume Next
Set oPPTApp = CreateObject("PowerPoint.Application")
If Not oPPTApp Is Nothing Then
Set oPPTPres = oPPTApp.Presentations.Open(SHOW_FILE, , , False)
If Not oPPTPres Is Nothing Then
With oPPTPres
Select Case Index
Case Is = 0
With .SlideShowSettings
.ShowType = ppShowTypeSpeaker
With .Run
.Width = frmSS.Width
.Height = frmSS.Height
End With
End With
screenClasshWnd = FindWindow("screenClass", 0&)
SetParent screenClasshWnd, frmSS.hwnd
With Me
.Height = 4545
.SetFocus
End With
Case Is = 1
With .SlideShowSettings
.ShowType = ppShowTypeInWindow
.Run
End With
Call SetWindowText(FindWindow("screenClass", 0&), APP_NAME)
End Select
End With
Else
MsgBox "Could not open the presentation.", vbCritical, APP_NAME
End If
Else
MsgBox "Could not instantiate PowerPoint.", vbCritical, APP_NAME
End If
End Sub

Private Sub Form_Initialize()
With Me
.ScaleMode = vbPoints
.Caption = APP_NAME
End With
End Sub

Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
On Error Resume Next
lblMessage.Visible = True
DoEvents
If Not oPPTPres Is Nothing Then
oPPTPres.Close
End If
Set oPPTPres = Nothing
If Not oPPTApp Is Nothing Then
oPPTApp.Quit
End If
Set oPPTApp = Nothing
lblMessage.Visible = False
End Sub