Results 1 to 6 of 6

Thread: form1.vb [design] error?

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2002
    Posts
    216

    form1.vb [design] error?

    I get an error while trying to change the interface on my program:


    An error occured while loading the document. Fix the error then try loading it again. The error message is as follows:


    The designer could not be shown for this file because none of its classes can be shown.

    and i keep on getting this build error(on all the subs):

    Statement is not valid in namespace.


    But when i run it to debug... it runs fine it just has that build error but i doesnt look any different. Thanks!

    James

  2. #2
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    Post the code for us to check out.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Nov 2002
    Posts
    216
    VB Code:
    1. Public Class Form1
    2.  
    3. #Region " Windows Form Designer generated code "
    4.  
    5. Public Sub New()
    6.     MyBase.New()
    7.  
    8.     'This call is required by the Windows Form Designer.
    9.     InitializeComponent()
    10.  
    11.     'Add any initialization after the InitializeComponent() call
    12.  
    13. End Sub
    14.  
    15. 'Form overrides dispose to clean up the component list.
    16. Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
    17.     If disposing Then
    18.         If Not (components Is Nothing) Then
    19.             components.Dispose()
    20.         End If
    21.     End If
    22.     MyBase.Dispose(disposing)
    23. End Sub
    24.  
    25. 'Required by the Windows Form Designer
    26. Private components As System.ComponentModel.IContainer
    27.  
    28. 'NOTE: The following procedure is required by the Windows Form Designer
    29. 'It can be modified using the Windows Form Designer.  
    30. 'Do not modify it using the code editor.
    31. Friend WithEvents Label1 As System.Windows.Forms.Label
    32. Friend WithEvents MainMenu1 As System.Windows.Forms.MainMenu
    33. Friend WithEvents Label2 As System.Windows.Forms.Label
    34. Friend WithEvents Label3 As System.Windows.Forms.Label
    35. Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
    36. Friend WithEvents MenuItem1 As System.Windows.Forms.MenuItem
    37. Friend WithEvents MenuItem2 As System.Windows.Forms.MenuItem
    38. Friend WithEvents MenuItem3 As System.Windows.Forms.MenuItem
    39. Friend WithEvents MenuItem4 As System.Windows.Forms.MenuItem
    40. Friend WithEvents MenuItem5 As System.Windows.Forms.MenuItem
    41. Friend WithEvents MenuItem6 As System.Windows.Forms.MenuItem
    42. Friend WithEvents news As System.Windows.Forms.Label
    43. Friend WithEvents Button1 As System.Windows.Forms.Button
    44. Friend WithEvents Button2 As System.Windows.Forms.Button
    45. Friend WithEvents chattext As System.Windows.Forms.TextBox
    46. Friend WithEvents TextBox3 As System.Windows.Forms.TextBox
    47. <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
    48.     Me.Label1 = New System.Windows.Forms.Label()
    49.     Me.MainMenu1 = New System.Windows.Forms.MainMenu()
    50.     Me.MenuItem1 = New System.Windows.Forms.MenuItem()
    51.     Me.MenuItem2 = New System.Windows.Forms.MenuItem()
    52.     Me.MenuItem3 = New System.Windows.Forms.MenuItem()
    53.     Me.MenuItem4 = New System.Windows.Forms.MenuItem()
    54.     Me.MenuItem5 = New System.Windows.Forms.MenuItem()
    55.     Me.MenuItem6 = New System.Windows.Forms.MenuItem()
    56.     Me.Label2 = New System.Windows.Forms.Label()
    57.     Me.Label3 = New System.Windows.Forms.Label()
    58.     Me.news = New System.Windows.Forms.Label()
    59.     Me.TextBox1 = New System.Windows.Forms.TextBox()
    60.     Me.Button1 = New System.Windows.Forms.Button()
    61.     Me.Button2 = New System.Windows.Forms.Button()
    62.     Me.chattext = New System.Windows.Forms.TextBox()
    63.     Me.TextBox3 = New System.Windows.Forms.TextBox()
    64.     Me.SuspendLayout()
    65.     '
    66.     'Label1
    67.     '
    68.     Me.Label1.Name = "Label1"
    69.     Me.Label1.Size = New System.Drawing.Size(112, 16)
    70.     Me.Label1.TabIndex = 0
    71.     Me.Label1.Text = "Welcome To X.O.P!"
    72.     '
    73.     'MainMenu1
    74.     '
    75.     Me.MainMenu1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem1, Me.MenuItem3})
    76.     '
    77.     'MenuItem1
    78.     '
    79.     Me.MenuItem1.Index = 0
    80.     Me.MenuItem1.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem2})
    81.     Me.MenuItem1.Text = "File"
    82.     '
    83.     'MenuItem2
    84.     '
    85.     Me.MenuItem2.Index = 0
    86.     Me.MenuItem2.Text = "Exit"
    87.     '
    88.     'MenuItem3
    89.     '
    90.     Me.MenuItem3.Index = 1
    91.     Me.MenuItem3.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem4, Me.MenuItem6})
    92.     Me.MenuItem3.Text = "Help"
    93.     '
    94.     'MenuItem4
    95.     '
    96.     Me.MenuItem4.Index = 0
    97.     Me.MenuItem4.MenuItems.AddRange(New System.Windows.Forms.MenuItem() {Me.MenuItem5})
    98.     Me.MenuItem4.Text = "Website"
    99.     '
    100.     'MenuItem5
    101.     '
    102.     Me.MenuItem5.Index = 0
    103.     Me.MenuItem5.Text = "www.xop.com"
    104.     '
    105.     'MenuItem6
    106.     '
    107.     Me.MenuItem6.Index = 1
    108.     Me.MenuItem6.Text = "Help"
    109.     Me.MenuItem6.Visible = False
    110.     '
    111.     'Label2
    112.     '
    113.     Me.Label2.Location = New System.Drawing.Point(0, 656)
    114.     Me.Label2.Name = "Label2"
    115.     Me.Label2.Size = New System.Drawing.Size(128, 23)
    116.     Me.Label2.TabIndex = 3
    117.     Me.Label2.Text = "Version .001"
    118.     '
    119.     'Label3
    120.     '
    121.     Me.Label3.Name = "Label3"
    122.     Me.Label3.TabIndex = 4
    123.     Me.Label3.Text = "Label3"
    124.     '
    125.     'news
    126.     '
    127.     Me.news.Location = New System.Drawing.Point(136, 656)
    128.     Me.news.Name = "news"
    129.     Me.news.Size = New System.Drawing.Size(640, 24)
    130.     Me.news.TabIndex = 5
    131.     '
    132.     'TextBox1
    133.     '
    134.     Me.TextBox1.Location = New System.Drawing.Point(960, 656)
    135.     Me.TextBox1.Name = "TextBox1"
    136.     Me.TextBox1.Size = New System.Drawing.Size(72, 20)
    137.     Me.TextBox1.TabIndex = 6
    138.     Me.TextBox1.Text = "If you need help, go to [url]www.xop.com[/url] or ask one of those cold hearted admins that " & _
    139.     "are level 80+"
    140.     '
    141.     'Button1
    142.     '
    143.     Me.Button1.Location = New System.Drawing.Point(952, 632)
    144.     Me.Button1.Name = "Button1"
    145.     Me.Button1.TabIndex = 7
    146.     Me.Button1.Text = "Clear"
    147.     '
    148.     'Button2
    149.     '
    150.     Me.Button2.Location = New System.Drawing.Point(952, 608)
    151.     Me.Button2.Name = "Button2"
    152.     Me.Button2.TabIndex = 8
    153.     Me.Button2.Text = "Button2"
    154.     '
    155.     'Form1
    156.     '
    157.     Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
    158.     Me.ClientSize = New System.Drawing.Size(1024, 681)
    159.     Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.TextBox3, Me.chattext, Me.Button2, Me.Button1, Me.TextBox1, Me.news, Me.Label3, Me.Label2, Me.Label1})
    160.     Me.Menu = Me.MainMenu1
    161.     Me.Name = "Form1"
    162.     Me.Text = "News Bar!"
    163.     Me.ResumeLayout(False)
    164.  
    165. End Sub
    166.  
    167. #End Region
    168.  
    169.  
    170. Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
    171.     news.Text = TextBox1.Text
    172. End Sub
    173.  
    174.     Private Sub Button1_Click(ByVal hide As Object, ByVal sender As System.Object, ByVal e As System.EventArgs)
    175.         hide()
    176.     End Sub
    177.  
    178.     Private Sub Button1_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    179.         TextBox1.Clear()
    180.     End Sub
    181.  
    182.     Private Sub Button2_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
    183.         TextBox1.Text = "If you need help go to this site, [url]www.xop.com[/url] or go to the admins that are level 80+"
    184.     End Sub
    185. end class



    I get a lot of errors, ill post them sooon im in a h urrry

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Nov 2002
    Posts
    216
    here are the build errors, they go from bottom up (first one on the error list is on the bottom and goes up.):

    'Sub Main' was not found in 'Xtreme_Online_Paintall.Form1'.

    C:\Documents and Settings\James Flaherty\Desktop\Xtreme Online Paintall\Form1.vb(175): Expression is not a method.


    C:\Documents and Settings\James Flaherty\Desktop\Xtreme Online Paintall\Form1.vb(163): 'ResumeLayout' is not a member of 'Xtreme_Online_Paintall.Form1'.


    C:\Documents and Settings\James Flaherty\Desktop\Xtreme Online Paintall\Form1.vb(162): 'Text' is not a member of 'Xtreme_Online_Paintall.Form1'.


    C:\Documents and Settings\James Flaherty\Desktop\Xtreme Online Paintall\Form1.vb(161): 'Name' is not a member of 'Xtreme_Online_Paintall.Form1'.


    C:\Documents and Settings\James Flaherty\Desktop\Xtreme Online Paintall\Form1.vb(160): 'Menu' is not a member of 'Xtreme_Online_Paintall.Form1'.

    C:\Documents and Settings\James Flaherty\Desktop\Xtreme Online Paintall\Form1.vb(159): 'Controls' is not a member of 'Xtreme_Online_Paintall.Form1'.


    C:\Documents and Settings\James Flaherty\Desktop\Xtreme Online Paintall\Form1.vb(158): 'ClientSize' is not a member of 'Xtreme_Online_Paintall.Form1'.


    C:\Documents and Settings\James Flaherty\Desktop\Xtreme Online Paintall\Form1.vb(157): 'AutoScaleBaseSize' is not a member of 'Xtreme_Online_Paintall.Form1'.


    C:\Documents and Settings\James Flaherty\Desktop\Xtreme Online Paintall\Form1.vb(64): 'SuspendLayout' is not a member of 'Xtreme_Online_Paintall.Form1'.


    C:\Documents and Settings\James Flaherty\Desktop\Xtreme Online Paintall\Form1.vb(22): 'Dispose' is not a member of 'System.Object'.


    C:\Documents and Settings\James Flaherty\Desktop\Xtreme Online Paintall\Form1.vb(16): sub 'Dispose' cannot be declared 'Overrides' because it does not override a sub in a base class.

  5. #5
    Addicted Member
    Join Date
    Oct 2002
    Posts
    145
    Try this:

    Right click on the project (right pane) to bring up the property pages then from the startup object drop down, select Form1. Then run again.

  6. #6

    Thread Starter
    Addicted Member
    Join Date
    Nov 2002
    Posts
    216
    what do you mean by object drop down?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width