Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

Everything from form disappeared (due to theme)

Hi Guys,

I was hoping if anyone could please help me with this issue. I was using a theme that I had all my controls on (buttons, textboxes, labels, etc). However, something happened and everything on my form disappeared. The form is just empty theme design (there are no buttons or other things on it). I am not getting any errors - the code still recognizes the controls that were on the form so I am assuming that there is something overlapping all my controls. I've tried right clicking it and deleting it - this just deletes my entire form.

This is what it looks like now (just complete empty):

htt p://i.imgur.com/i5sMB42.png

After doing some experiments, I noticed that if I click on "Origin theme" component of the theme design, it will result in exactly what happened. It will delete all the containers and overlap the form with a fresh new theme design. I don't recall doing this but that is what probably happened.

How can I fix this?

Any help will be greatly appreciated!


This is what my entire Form1.Designer.vb looks like:

Code
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()>
Partial Class Form1
    Inherits System.Windows.Forms.Form

    'Form overrides dispose to clean up the component list.
    <System.Diagnostics.DebuggerNonUserCode()>
    Protected Overrides Sub Dispose(ByVal 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()
        Me.components = New System.ComponentModel.Container()
        Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(Form1))
        Me.Timer1 = New System.Windows.Forms.Timer(Me.components)
        Me.TabControl1 = New System.Windows.Forms.TabControl()
        Me.TabPage1 = New System.Windows.Forms.TabPage()
        Me.PictureBox1 = New System.Windows.Forms.PictureBox()
        Me.CheckBox1 = New WindowsApp6.OriginCheckBox()
        Me.OriginCheckBox2 = New WindowsApp6.OriginCheckBox()
        Me.CheckBox2 = New WindowsApp6.OriginCheckBox()
        Me.OriginCheckBox1 = New WindowsApp6.OriginCheckBox()
        Me.OriginButton1 = New WindowsApp6.OriginButton()
        Me.SecondOriginButton1 = New WindowsApp6.SecondOriginButton()
        Me.OriginButton2 = New WindowsApp6.OriginButton()
        Me.RichTextBox1 = New System.Windows.Forms.RichTextBox()
        Me.RichTextBox5 = New System.Windows.Forms.RichTextBox()
        Me.RichTextBox11 = New System.Windows.Forms.RichTextBox()
        Me.TabPage2 = New System.Windows.Forms.TabPage()
        Me.OriginButton3 = New WindowsApp6.OriginButton()
        Me.OriginTheme1 = New WindowsApp6.OriginTheme()
        Me.TabControl1.SuspendLayout()
        Me.TabPage1.SuspendLayout()
        CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.SuspendLayout()
        '
        'Timer1
        '
        Me.Timer1.Interval = 2000
        '
        'TabControl1
        '
        Me.TabControl1.Controls.Add(Me.TabPage1)
        Me.TabControl1.Controls.Add(Me.TabPage2)
        Me.TabControl1.Location = New System.Drawing.Point(3, 27)
        Me.TabControl1.Name = "TabControl1"
        Me.TabControl1.SelectedIndex = 0
        Me.TabControl1.Size = New System.Drawing.Size(530, 469)
        Me.TabControl1.TabIndex = 24
        '
        'TabPage1
        '
        Me.TabPage1.BackColor = System.Drawing.Color.WhiteSmoke
        Me.TabPage1.Controls.Add(Me.PictureBox1)
        Me.TabPage1.Controls.Add(Me.CheckBox1)
        Me.TabPage1.Controls.Add(Me.OriginCheckBox2)
        Me.TabPage1.Controls.Add(Me.CheckBox2)
        Me.TabPage1.Controls.Add(Me.OriginCheckBox1)
        Me.TabPage1.Controls.Add(Me.OriginButton1)
        Me.TabPage1.Controls.Add(Me.SecondOriginButton1)
        Me.TabPage1.Controls.Add(Me.OriginButton2)
        Me.TabPage1.Controls.Add(Me.RichTextBox1)
        Me.TabPage1.Controls.Add(Me.RichTextBox5)
        Me.TabPage1.Controls.Add(Me.RichTextBox11)
        Me.TabPage1.Location = New System.Drawing.Point(4, 22)
        Me.TabPage1.Name = "TabPage1"
        Me.TabPage1.Padding = New System.Windows.Forms.Padding(3)
        Me.TabPage1.Size = New System.Drawing.Size(522, 443)
        Me.TabPage1.TabIndex = 0
        Me.TabPage1.Text = "Home"
        '
        'PictureBox1
        '
        Me.PictureBox1.BackColor = System.Drawing.SystemColors.Window
        Me.PictureBox1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.None
        Me.PictureBox1.Image = CType(resources.GetObject("PictureBox1.Image"), System.Drawing.Image)
        Me.PictureBox1.Location = New System.Drawing.Point(234, 283)
        Me.PictureBox1.Name = "PictureBox1"
        Me.PictureBox1.Size = New System.Drawing.Size(50, 50)
        Me.PictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage
        Me.PictureBox1.TabIndex = 23
        Me.PictureBox1.TabStop = False
        '
        'CheckBox1
        '
        Me.CheckBox1.Checked = True
        Me.CheckBox1.Customization = "AAAA/+bm5v/S0tL/5ubm/6qqqv/19fX/9fX1/w=="
        Me.CheckBox1.Font = New System.Drawing.Font("Verdana", 8.0!)
        Me.CheckBox1.Image = Nothing
        Me.CheckBox1.Location = New System.Drawing.Point(6, 6)
        Me.CheckBox1.Name = "CheckBox1"
        Me.CheckBox1.NoRounding = False
        Me.CheckBox1.Size = New System.Drawing.Size(172, 17)
        Me.CheckBox1.TabIndex = 2
        Me.CheckBox1.Text = "Enable"
        Me.CheckBox1.Transparent = False
        '
        'OriginCheckBox2
        '
        Me.OriginCheckBox2.Checked = False
        Me.OriginCheckBox2.Customization = "AAAA/+bm5v/S0tL/5ubm/6qqqv/19fX/9fX1/w=="
        Me.OriginCheckBox2.Font = New System.Drawing.Font("Verdana", 8.0!)
        Me.OriginCheckBox2.Image = Nothing
        Me.OriginCheckBox2.Location = New System.Drawing.Point(183, 420)
        Me.OriginCheckBox2.Name = "OriginCheckBox2"
        Me.OriginCheckBox2.NoRounding = False
        Me.OriginCheckBox2.Size = New System.Drawing.Size(184, 17)
        Me.OriginCheckBox2.TabIndex = 22
        Me.OriginCheckBox2.Text = "Display"
        Me.OriginCheckBox2.Transparent = False
        '
        'CheckBox2
        '
        Me.CheckBox2.Checked = False
        Me.CheckBox2.Customization = "AAAA/+bm5v/S0tL/5ubm/6qqqv/19fX/9fX1/w=="
        Me.CheckBox2.Font = New System.Drawing.Font("Verdana", 8.0!)
        Me.CheckBox2.Image = Nothing
        Me.CheckBox2.Location = New System.Drawing.Point(262, 8)
        Me.CheckBox2.Name = "CheckBox2"
        Me.CheckBox2.NoRounding = False
        Me.CheckBox2.Size = New System.Drawing.Size(174, 17)
        Me.CheckBox2.TabIndex = 3
        Me.CheckBox2.Text = "Disable"
        Me.CheckBox2.Transparent = False
        '
        'OriginCheckBox1
        '
        Me.OriginCheckBox1.Checked = True
        Me.OriginCheckBox1.Customization = "AAAA/+bm5v/S0tL/5ubm/6qqqv/19fX/9fX1/w=="
        Me.OriginCheckBox1.Font = New System.Drawing.Font("Verdana", 8.0!)
        Me.OriginCheckBox1.Image = Nothing
        Me.OriginCheckBox1.Location = New System.Drawing.Point(6, 420)
        Me.OriginCheckBox1.Name = "OriginCheckBox1"
        Me.OriginCheckBox1.NoRounding = False
        Me.OriginCheckBox1.Size = New System.Drawing.Size(171, 17)
        Me.OriginCheckBox1.TabIndex = 21
        Me.OriginCheckBox1.Text = "Display"
        Me.OriginCheckBox1.Transparent = False
        '
        'OriginButton1
        '
        Me.OriginButton1.Customization = "AKX/////////////"
        Me.OriginButton1.Font = New System.Drawing.Font("Verdana", 8.0!)
        Me.OriginButton1.Image = Nothing
        Me.OriginButton1.Location = New System.Drawing.Point(4, 175)
        Me.OriginButton1.Name = "OriginButton1"
        Me.OriginButton1.NoRounding = False
        Me.OriginButton1.Size = New System.Drawing.Size(509, 23)
        Me.OriginButton1.TabIndex = 4
        Me.OriginButton1.Text = "Start"
        Me.OriginButton1.Transparent = False
        '


Code
'SecondOriginButton1
        '
        Me.SecondOriginButton1.Customization = "wMDA/4CAgP///////////w=="
        Me.SecondOriginButton1.Font = New System.Drawing.Font("Verdana", 8.0!)
        Me.SecondOriginButton1.Image = Nothing
        Me.SecondOriginButton1.Location = New System.Drawing.Point(373, 416)
        Me.SecondOriginButton1.Name = "SecondOriginButton1"
        Me.SecondOriginButton1.NoRounding = False
        Me.SecondOriginButton1.Size = New System.Drawing.Size(140, 23)
        Me.SecondOriginButton1.TabIndex = 13
        Me.SecondOriginButton1.Text = "Copy"
        Me.SecondOriginButton1.Transparent = False
        '
        'OriginButton2
        '
        Me.OriginButton2.Customization = "AKX/////////////"
        Me.OriginButton2.Font = New System.Drawing.Font("Verdana", 8.0!)
        Me.OriginButton2.Image = Nothing
        Me.OriginButton2.Location = New System.Drawing.Point(4, 198)
        Me.OriginButton2.Name = "OriginButton2"
        Me.OriginButton2.NoRounding = False
        Me.OriginButton2.Size = New System.Drawing.Size(509, 23)
        Me.OriginButton2.TabIndex = 5
        Me.OriginButton2.Text = "Reset"
        Me.OriginButton2.Transparent = False
        '
        'RichTextBox1
        '
        Me.RichTextBox1.Font = New System.Drawing.Font("Segoe UI", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.RichTextBox1.Location = New System.Drawing.Point(5, 27)
        Me.RichTextBox1.Name = "RichTextBox1"
        Me.RichTextBox1.Size = New System.Drawing.Size(251, 142)
        Me.RichTextBox1.TabIndex = 6
        Me.RichTextBox1.Text = ""
        '
        'RichTextBox5
        '
        Me.RichTextBox5.Location = New System.Drawing.Point(262, 27)
        Me.RichTextBox5.Name = "RichTextBox5"
        Me.RichTextBox5.Size = New System.Drawing.Size(251, 143)
        Me.RichTextBox5.TabIndex = 7
        Me.RichTextBox5.Text = ""
        '
        'RichTextBox11
        '
        Me.RichTextBox11.Font = New System.Drawing.Font("Segoe UI", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.RichTextBox11.Location = New System.Drawing.Point(4, 226)
        Me.RichTextBox11.Margin = New System.Windows.Forms.Padding(6, 3, 6, 3)
        Me.RichTextBox11.Name = "RichTextBox11"
        Me.RichTextBox11.Size = New System.Drawing.Size(509, 188)
        Me.RichTextBox11.TabIndex = 10
        Me.RichTextBox11.Text = ""
        '
        'TabPage2
        '
        Me.TabPage2.BackColor = System.Drawing.Color.WhiteSmoke
        Me.TabPage2.Location = New System.Drawing.Point(4, 22)
        Me.TabPage2.Name = "TabPage2"
        Me.TabPage2.Padding = New System.Windows.Forms.Padding(3)
        Me.TabPage2.Size = New System.Drawing.Size(522, 443)
        Me.TabPage2.TabIndex = 1
        Me.TabPage2.Text = "About"
        '
        'OriginButton3
        '
        Me.OriginButton3.Customization = "AKX/////////////"
        Me.OriginButton3.Font = New System.Drawing.Font("Verdana", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.OriginButton3.Image = Nothing
        Me.OriginButton3.Location = New System.Drawing.Point(503, 3)
        Me.OriginButton3.Name = "OriginButton3"
        Me.OriginButton3.NoRounding = False
        Me.OriginButton3.Size = New System.Drawing.Size(30, 20)
        Me.OriginButton3.TabIndex = 8
        Me.OriginButton3.Text = "X"
        Me.OriginButton3.Transparent = False
        '
        'OriginTheme1
        '
        Me.OriginTheme1.BackColor = System.Drawing.Color.FromArgb(CType(CType(245, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(245, Byte), Integer))
        Me.OriginTheme1.BorderStyle = System.Windows.Forms.FormBorderStyle.None
        Me.OriginTheme1.Customization = "JiYn//////8="
        Me.OriginTheme1.Dock = System.Windows.Forms.DockStyle.Fill
        Me.OriginTheme1.Font = New System.Drawing.Font("Segoe UI", 9.0!)
        Me.OriginTheme1.Image = Nothing
        Me.OriginTheme1.Location = New System.Drawing.Point(0, 0)
        Me.OriginTheme1.Movable = True
        Me.OriginTheme1.Name = "OriginTheme1"
        Me.OriginTheme1.NoRounding = False
        Me.OriginTheme1.Sizable = False
        Me.OriginTheme1.Size = New System.Drawing.Size(558, 493)
        Me.OriginTheme1.SmartBounds = True
        Me.OriginTheme1.StartPosition = System.Windows.Forms.FormStartPosition.WindowsDefaultLocation
        Me.OriginTheme1.TabIndex = 0
        Me.OriginTheme1.Text = "OriginTheme1"
        Me.OriginTheme1.TransparencyKey = System.Drawing.Color.Fuchsia
        Me.OriginTheme1.Transparent = False
        '
        'Form1
        '
        Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
        Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
        Me.ClientSize = New System.Drawing.Size(558, 493)
        Me.Controls.Add(Me.OriginTheme1)
        Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.None
        Me.Name = "Form1"
        Me.Text = "Form1"
        Me.TransparencyKey = System.Drawing.Color.Fuchsia
        Me.TabControl1.ResumeLayout(False)
        Me.TabPage1.ResumeLayout(False)
        CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit()
        Me.ResumeLayout(False)

    End Sub

    Friend WithEvents CheckBox2 As OriginCheckBox
    Friend WithEvents CheckBox1 As OriginCheckBox
    Friend WithEvents OriginButton2 As OriginButton
    Friend WithEvents OriginButton1 As OriginButton
    Friend WithEvents RichTextBox5 As RichTextBox
    Friend WithEvents RichTextBox1 As RichTextBox
    Friend WithEvents OriginButton3 As OriginButton
    Friend WithEvents RichTextBox11 As RichTextBox
    Friend WithEvents OriginCheckBox2 As OriginCheckBox
    Friend WithEvents OriginCheckBox1 As OriginCheckBox
    Friend WithEvents PictureBox1 As PictureBox
    Friend WithEvents SecondOriginButton1 As SecondOriginButton
    Friend WithEvents Timer1 As Timer
    Friend WithEvents TabControl1 As TabControl
    Friend WithEvents TabPage1 As TabPage
    Friend WithEvents TabPage2 As TabPage
    Friend WithEvents OriginTheme1 As OriginTheme
End Class
[/code]


I no longer need help with this 👍👍

To fix this, all I did was add "Me.Controls.Add(Me.TabControl1) to that code. This brought back everything. However, I've no idea why this happened. If anyone knows, please do share so I can avoid this in the future.

So relieved :)
Theme is just a container control like panel that docked form
Controls are in form and not in theme container

Right click on theme and select send to back or select all controls by press ctrl+A , hold control key and click empty space in theme to deselect theme control and drag to move the controls and release, now the controls will added in theme container and will be visible


Possibly Related Threads...
Thread / Author Replies Views Last Post
[C#] by StudentStonerJun 17, 2018 11:40 AM 10 729 Jun 17, 2018 11:40 AM
Last Post: int
[.NET] by EffexionOct 21, 2017 05:57 AM 2 198 Oct 21, 2017 05:57 AM
Last Post: Effexion
[.NET] by EffexionOct 21, 2017 05:13 AM 0 101 Oct 21, 2017 05:13 AM
Last Post: Effexion