Reputation: 1
Screenshot of my form app in studio. I want to fix error BC30451. But I have no clue on how to change the privacy level. The following is code for the item (A timer) that's apparently inaccessible if it helps.
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
Partial Class Stopwatch
Inherits System.Windows.Forms.Form
'Form overrides dispose to clean up the component list.
<System.Diagnostics.DebuggerNonUserCode()>
Protected Overrides Sub Dispose(disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
'Required by the Windows Form Designer
Private components As System.ComponentModel.IContainer
'NOTE: The following procedure is required by the Windows Form Designer
'It can be modified using the Windows Form Designer.
'Do not modify it using the code editor.
<System.Diagnostics.DebuggerStepThrough()>
Private Sub InitializeComponent()
components = New ComponentModel.Container()
display = New Label()
btnstart = New Button()
btnpause = New Button()
btnreset = New Button()
btnhotkey = New Button()
tmrstopwatch = New Timer(components)
SuspendLayout()
'
' display
'
display.BackColor = Color.FromArgb(CByte(55), CByte(55), CByte(55))
display.Font = New Font("Segoe UI", 90F)
display.Location = New Point(12, 9)
display.Name = "display"
display.Size = New Size(776, 222)
display.TabIndex = 1
display.Text = "0.00"
display.TextAlign = ContentAlignment.MiddleCenter
'
' btnstart
'
btnstart.BackColor = Color.FromArgb(CByte(55), CByte(55), CByte(55))
btnstart.Font = New Font("Segoe UI", 45F)
btnstart.Location = New Point(12, 319)
btnstart.Name = "btnstart"
btnstart.Size = New Size(246, 119)
btnstart.TabIndex = 2
btnstart.Text = "Start"
btnstart.UseVisualStyleBackColor = False
'
' btnpause
'
btnpause.BackColor = Color.FromArgb(CByte(55), CByte(55), CByte(55))
btnpause.Font = New Font("Segoe UI", 43F)
btnpause.Location = New Point(264, 319)
btnpause.Name = "btnpause"
btnpause.Size = New Size(275, 119)
btnpause.TabIndex = 3
btnpause.Text = "Pause"
btnpause.UseVisualStyleBackColor = False
'
' btnreset
'
btnreset.BackColor = Color.FromArgb(CByte(55), CByte(55), CByte(55))
btnreset.Font = New Font("Segoe UI", 18F)
btnreset.Location = New Point(545, 319)
btnreset.Name = "btnreset"
btnreset.Size = New Size(120, 119)
btnreset.TabIndex = 4
btnreset.Text = "Reset"
btnreset.UseVisualStyleBackColor = False
'
' btnhotkey
'
btnhotkey.BackColor = Color.FromArgb(CByte(55), CByte(55), CByte(55))
btnhotkey.Font = New Font("Segoe UI", 14F)
btnhotkey.Location = New Point(671, 319)
btnhotkey.Name = "btnhotkey"
btnhotkey.Size = New Size(117, 119)
btnhotkey.TabIndex = 5
btnhotkey.Text = "Hotkey"
btnhotkey.UseVisualStyleBackColor = False
'
' tmrstopwatch
'
tmrstopwatch.Tag = "tmrstopwatch"
'
' Stopwatch
'
AutoScaleDimensions = New SizeF(10F, 25F)
AutoScaleMode = AutoScaleMode.Font
BackColor = SystemColors.Desktop
ClientSize = New Size(800, 450)
Controls.Add(btnhotkey)
Controls.Add(btnreset)
Controls.Add(btnpause)
Controls.Add(btnstart)
Controls.Add(display)
ForeColor = Color.White
Name = "Stopwatch"
Text = "Stopwatch"
ResumeLayout(False)
End Sub
Friend WithEvents display As Label
Friend WithEvents btnstart As Button
Friend WithEvents btnpause As Button
Friend WithEvents btnreset As Button
Friend WithEvents btnhotkey As Button
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles btnhotkey.Click
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles btnstart.Click
End Sub
Friend WithEvents tmrstopwatch As Timer
Private Sub Timer1_Tick(sender As Object, e As EventArgs) Handles tmrstopwatch.Tick
End Sub
End Class
Private Sub btnstart_Click(...)
tmrstopwatch.enabled = True
End Sub
Upvotes: -1
Views: 16