Visual Basic Wiki
Advertisement
Download
Edit
Compatibility:
VB4 Yes
VB5 untested
VB6 untested
VB.NET untested

The form that displays the fullscreen image.B9A171

License[]

Version 3 of the GNU General Public LicenseB9A171

Code[]

VERSION 4.00 Begin VB.Form Form2 BackColor = &H00000000& BorderStyle = 0 'None ClientHeight = 1200 ClientLeft = 9255 ClientTop = 5130 ClientWidth = 1545 Height = 1650 Icon = "FullScreen.frx":0000 KeyPreview = -1 'True Left = 9195 LinkTopic = "Form2" MouseIcon = "FullScreen.frx":000C MousePointer = 99 'Custom ScaleHeight = 80 ScaleMode = 3 'Pixel ScaleWidth = 103 ShowInTaskbar = 0 'False Top = 4740 Width = 1665 WindowState = 2 'Maximized Begin VB.Image Image1 Height = 135 Left = 0 Stretch = -1 'True Top = 0 Width = 135 End End Attribute VB_Name = "Form2" Attribute VB_Creatable = False Attribute VB_Exposed = False Option Explicit Public ScreenSaverMode As Boolean Dim OX As Long, OY As Long Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) Select Case KeyCode Case vbKeyEscape: Unload Me Case vbKeyUp, vbKeyDown, vbKeyLeft, vbKeyRight: Form1.Form_KeyDown KeyCode, Shift Case Else: ExitScreenSaverMode End Select End Sub Private Sub Form_Load() OX = True End Sub Private Sub Form_Resize() Image1.Move 0, 0, ScaleWidth, ScaleHeight End Sub Private Sub Image1_Click() Unload Me End Sub Private Sub Image1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) Dim NX As Long, NY As Long NX = X: NY = Y If OX < 0 Then OX = NX: OY = NY: Exit Sub Select Case True Case Abs(NX - OX) > 120, Abs(NY - OY) > 120: ExitScreenSaverMode End Select End Sub 'Sluit het programma af, maar enkel wanneer ScreenSaverMode waar is. Private Sub ExitScreenSaverMode() Dim F As Form If ScreenSaverMode Then For Each F In Forms Unload F Next End If End Sub

B9A171

Advertisement