Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- i might quit forever right now...
- Public Class my_program
- Dim willcont As Boolean ' precursive toggle for initiating everything
- Sub Me_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles MyBase.KeyDown
- If e.KeyCode = Keys.Space Then
- willcont = True
- Space(1)
- End If
- If willcont = True Then
- MsgBox("Absolutely continue?" & vbCrLf & "There's no going back.", MsgBoxStyle.YesNo, _
- "my program")
- If MsgBoxResult.Yes Then
- Me.BackgroundImage() = Nothing
- Me.WindowState() = FormWindowState.Maximized
- 'Dim thief As Boolean = True ' a toggle for Class Main
- 'Dim sayyn As String ' to be used later
- Else : Me.Opacity() = 0
- MsgBox("Goodbye!", MsgBoxStyle.OkOnly, "my program")
- Me.Close()
- End If
- End If
- End Sub
- ' vvvvvvvv Not working.
- ' Dim iam As ImageList
- 'Public Sub LoadImage()
- 'Dim mainbg As System.Drawing.Image = _
- 'Image.FromFile(System.Environment.GetFolderPath _
- '(System.Environment.SpecialFolder.Desktop) & "\mainbg.jpg")
- 'iam.Images.Add("mainbg", mainbg)
- 'While FormWindowState.Maximized = True
- 'Me.BackgroundImage() = mainbg
- 'Me.BackgroundImageLayout = ImageLayout.Stretch
- 'End While
- 'End Sub
- ' ^^^^^^^^
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement