デュアルディスプレイのセカンドモニターにPDF、動画、画像を表示。
@@ -53,6 +53,7 @@ | ||
53 | 53 | Me.btnPDFLast = New System.Windows.Forms.Button() |
54 | 54 | Me.btnPDFFirst = New System.Windows.Forms.Button() |
55 | 55 | Me.BackgroundWorker1 = New System.ComponentModel.BackgroundWorker() |
56 | + Me.Button1 = New System.Windows.Forms.Button() | |
56 | 57 | Me.GroupBox1.SuspendLayout() |
57 | 58 | CType(Me.nudWidth, System.ComponentModel.ISupportInitialize).BeginInit() |
58 | 59 | CType(Me.nudHeight, System.ComponentModel.ISupportInitialize).BeginInit() |
@@ -340,11 +341,21 @@ | ||
340 | 341 | 'BackgroundWorker1 |
341 | 342 | ' |
342 | 343 | ' |
344 | + 'Button1 | |
345 | + ' | |
346 | + Me.Button1.Location = New System.Drawing.Point(695, 70) | |
347 | + Me.Button1.Name = "Button1" | |
348 | + Me.Button1.Size = New System.Drawing.Size(75, 23) | |
349 | + Me.Button1.TabIndex = 13 | |
350 | + Me.Button1.Text = "Button1" | |
351 | + Me.Button1.UseVisualStyleBackColor = True | |
352 | + ' | |
343 | 353 | 'frmOperation |
344 | 354 | ' |
345 | 355 | Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 15.0!) |
346 | 356 | Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font |
347 | 357 | Me.ClientSize = New System.Drawing.Size(782, 465) |
358 | + Me.Controls.Add(Me.Button1) | |
348 | 359 | Me.Controls.Add(Me.tbcFileOpes) |
349 | 360 | Me.Controls.Add(Me.GroupBox1) |
350 | 361 | Me.Name = "frmOperation" |
@@ -392,4 +403,5 @@ | ||
392 | 403 | Friend WithEvents lstPDFFiles As ListBox |
393 | 404 | Friend WithEvents btnDelete As Button |
394 | 405 | Friend WithEvents BackgroundWorker1 As System.ComponentModel.BackgroundWorker |
406 | + Friend WithEvents Button1 As Button | |
395 | 407 | End Class |
@@ -329,21 +329,37 @@ | ||
329 | 329 | Delegate Sub simpleDelegate() |
330 | 330 | |
331 | 331 | Private Sub BackgroundWorker1_DoWork(sender As Object, e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker1.DoWork |
332 | + | |
332 | 333 | Dim loadfuunc As simpleDelegate = AddressOf loadFile |
333 | 334 | Me.Invoke(loadfuunc) |
335 | + Threading.Thread.Sleep(1) | |
336 | + | |
337 | + Dim func3 As simpleDelegate = AddressOf setzoom | |
338 | + Me.Invoke(func3) | |
339 | + Threading.Thread.Sleep(100) | |
340 | + | |
341 | + Dim loadfuunc2 As simpleDelegate = AddressOf Loadfile2 | |
342 | + Me.Invoke(loadfuunc2) | |
334 | 343 | Threading.Thread.Sleep(5000) |
335 | 344 | |
345 | + Me.Invoke(func3) | |
346 | + Threading.Thread.Sleep(100) | |
347 | + | |
336 | 348 | Dim func As simpleDelegate = AddressOf hideToolBar |
337 | 349 | Me.Invoke(func) |
338 | - Threading.Thread.Sleep(100) | |
350 | + Threading.Thread.Sleep(1000) | |
339 | 351 | |
340 | 352 | Dim func2 As simpleDelegate = AddressOf hideScrollbars |
341 | 353 | Me.Invoke(func2) |
342 | - Threading.Thread.Sleep(100) | |
354 | + Threading.Thread.Sleep(1000) | |
343 | 355 | |
344 | 356 | |
345 | 357 | End Sub |
346 | 358 | |
359 | + Sub setzoom() | |
360 | + frmView.SetZoom(nudPdfZoom.Value) | |
361 | + End Sub | |
362 | + | |
347 | 363 | Sub hideScrollbars() |
348 | 364 | axPDF.setShowScrollbars(False) |
349 | 365 | End Sub |
@@ -350,13 +366,25 @@ | ||
350 | 366 | Sub loadFile() |
351 | 367 | frmView.LoadFile(txtPDFFileName.Text) |
352 | 368 | End Sub |
369 | + | |
370 | + Sub Loadfile2() | |
371 | + frmView.LoadFile(txtPDFFileName.Text) | |
372 | + Threading.Thread.Sleep(500) | |
373 | + frmView.Activate() | |
374 | + SendKeys.Send("+{F4}") | |
375 | + End Sub | |
353 | 376 | Sub hideToolBar() |
354 | 377 | axPDF.setShowToolbar(False) |
355 | 378 | End Sub |
356 | 379 | |
380 | + Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click | |
381 | + frmView.Activate() | |
382 | + SendKeys.Send("+{F4}") | |
383 | + End Sub | |
357 | 384 | |
358 | 385 | |
359 | 386 | |
387 | + | |
360 | 388 | #End Region |
361 | 389 | |
362 | 390 | End Class |
\ No newline at end of file |
@@ -27,12 +27,12 @@ | ||
27 | 27 | |
28 | 28 | Private zoom As Single = 100 |
29 | 29 | Public Sub SetZoom(ByVal zoom As Single) |
30 | - If Not loaded Then | |
31 | - Exit Sub | |
32 | - End If | |
33 | - If Math.Abs(Me.zoom - zoom) < 0.1 Then | |
34 | - Exit Sub | |
35 | - End If | |
30 | + 'If Not loaded Then | |
31 | + ' Exit Sub | |
32 | + 'End If | |
33 | + 'If Math.Abs(Me.zoom - zoom) < 0.1 Then | |
34 | + ' Exit Sub | |
35 | + 'End If | |
36 | 36 | Me.zoom = zoom |
37 | 37 | |
38 | 38 | AxAcroPDF1.setZoom(zoom) |