パワーポイントを起動

F1を押すとパワーポイントの1.pptというファイルが開いて、表示される。後は自由に操作できる。実際はtry~catchのエラー処理やリモコンに対応したキーイベントなども入れていたけど省きました。

Private WithEvents PPTApp As PowerPoint.Application
Private PPTPre As PowerPoint.Presentation
Private PPTSW As PowerPoint.SlideShowWindow
Private filename As String

  PPTApp = New PowerPoint.Application
PPTApp.Visible = True

  Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown

‘F1キーを押した場合
If e.KeyCode = Keys.F1 Then
filename = “C:1.ppt”
PPTPre = PPTApp.Presentations.Open(filename)
PPTSW = PPTPre.SlideShowSettings.Run()

開いて閉じるというのが意外と難しい。

ほとんどのリモコンは、キーボードのどれかのボタンに対応しているということでした。

コメントを残す

メールアドレスが公開されることはありません。 * が付いている欄は必須項目です