• R/O
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javaandroidc++linuxc#windowsobjective-ccocoaqtpython誰得phprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

デュアルディスプレイのセカンドモニターにPDF、動画、画像を表示。


Commit MetaInfo

Revision31 (tree)
Time2017-11-13 18:08:09
Authorbellyoshi

Log Message

Change Summary

Incremental Difference

--- pdfsecondmonitor/frmOperation.Designer.vb (revision 30)
+++ pdfsecondmonitor/frmOperation.Designer.vb (revision 31)
@@ -53,6 +53,7 @@
5353 Me.btnPDFLast = New System.Windows.Forms.Button()
5454 Me.btnPDFFirst = New System.Windows.Forms.Button()
5555 Me.BackgroundWorker1 = New System.ComponentModel.BackgroundWorker()
56+ Me.Button1 = New System.Windows.Forms.Button()
5657 Me.GroupBox1.SuspendLayout()
5758 CType(Me.nudWidth, System.ComponentModel.ISupportInitialize).BeginInit()
5859 CType(Me.nudHeight, System.ComponentModel.ISupportInitialize).BeginInit()
@@ -340,11 +341,21 @@
340341 'BackgroundWorker1
341342 '
342343 '
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+ '
343353 'frmOperation
344354 '
345355 Me.AutoScaleDimensions = New System.Drawing.SizeF(8.0!, 15.0!)
346356 Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
347357 Me.ClientSize = New System.Drawing.Size(782, 465)
358+ Me.Controls.Add(Me.Button1)
348359 Me.Controls.Add(Me.tbcFileOpes)
349360 Me.Controls.Add(Me.GroupBox1)
350361 Me.Name = "frmOperation"
@@ -392,4 +403,5 @@
392403 Friend WithEvents lstPDFFiles As ListBox
393404 Friend WithEvents btnDelete As Button
394405 Friend WithEvents BackgroundWorker1 As System.ComponentModel.BackgroundWorker
406+ Friend WithEvents Button1 As Button
395407 End Class
--- pdfsecondmonitor/frmOperation.vb (revision 30)
+++ pdfsecondmonitor/frmOperation.vb (revision 31)
@@ -329,21 +329,37 @@
329329 Delegate Sub simpleDelegate()
330330
331331 Private Sub BackgroundWorker1_DoWork(sender As Object, e As System.ComponentModel.DoWorkEventArgs) Handles BackgroundWorker1.DoWork
332+
332333 Dim loadfuunc As simpleDelegate = AddressOf loadFile
333334 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)
334343 Threading.Thread.Sleep(5000)
335344
345+ Me.Invoke(func3)
346+ Threading.Thread.Sleep(100)
347+
336348 Dim func As simpleDelegate = AddressOf hideToolBar
337349 Me.Invoke(func)
338- Threading.Thread.Sleep(100)
350+ Threading.Thread.Sleep(1000)
339351
340352 Dim func2 As simpleDelegate = AddressOf hideScrollbars
341353 Me.Invoke(func2)
342- Threading.Thread.Sleep(100)
354+ Threading.Thread.Sleep(1000)
343355
344356
345357 End Sub
346358
359+ Sub setzoom()
360+ frmView.SetZoom(nudPdfZoom.Value)
361+ End Sub
362+
347363 Sub hideScrollbars()
348364 axPDF.setShowScrollbars(False)
349365 End Sub
@@ -350,13 +366,25 @@
350366 Sub loadFile()
351367 frmView.LoadFile(txtPDFFileName.Text)
352368 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
353376 Sub hideToolBar()
354377 axPDF.setShowToolbar(False)
355378 End Sub
356379
380+ Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
381+ frmView.Activate()
382+ SendKeys.Send("+{F4}")
383+ End Sub
357384
358385
359386
387+
360388 #End Region
361389
362390 End Class
\ No newline at end of file
--- pdfsecondmonitor/frmView.vb (revision 30)
+++ pdfsecondmonitor/frmView.vb (revision 31)
@@ -27,12 +27,12 @@
2727
2828 Private zoom As Single = 100
2929 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
3636 Me.zoom = zoom
3737
3838 AxAcroPDF1.setZoom(zoom)