Results 1 to 4 of 4

Thread: [RESOLVED] Help What's Gone Wrong?

  1. #1

    Thread Starter
    Frenzied Member FishGuy's Avatar
    Join Date
    Mar 2005
    Location
    Bradford UK
    Posts
    1,708

    Resolved [RESOLVED] Help What's Gone Wrong?

    Help What's Gone Wrong? It just wont open in design view?
    VB Code:
    1. Public Class frmAddNote
    2.     Inherits RecommendsV2.frmNewCall
    3.  
    4. #Region " Windows Form Designer generated code "
    5.  
    6.     Public Sub New()
    7.         MyBase.New()
    8.  
    9.         'This call is required by the Windows Form Designer.
    10.         InitializeComponent()
    11.  
    12.         'Add any initialization after the InitializeComponent() call
    13.  
    14.     End Sub
    15.  
    16.     'Form overrides dispose to clean up the component list.
    17.     Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
    18.         If disposing Then
    19.             If Not (components Is Nothing) Then
    20.                 components.Dispose()
    21.             End If
    22.         End If
    23.         MyBase.Dispose(disposing)
    24.     End Sub
    Attached Images Attached Images  
    Last edited by FishGuy; Nov 2nd, 2005 at 09:05 AM.

  2. #2
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: Help What's Gone Wrong?

    It looks like you've messed around with some of the code in the windows designer. I'll paste a normal one so you can compare with what you have:

    VB Code:
    1. #Region " Windows Form Designer generated code "
    2.  
    3.     Public Sub New()
    4.         MyBase.New()
    5.  
    6.         'This call is required by the Windows Form Designer.
    7.         InitializeComponent()
    8.  
    9.         'Add any initialization after the InitializeComponent() call
    10.  
    11.     End Sub
    12.  
    13.     'Form overrides dispose to clean up the component list.
    14.     Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
    15.         If disposing Then
    16.             If Not (components Is Nothing) Then
    17.                 components.Dispose()
    18.             End If
    19.         End If
    20.         MyBase.Dispose(disposing)
    21.     End Sub
    22.  
    23.     'Required by the Windows Form Designer
    24.     Private components As System.ComponentModel.IContainer
    25.  
    26.     'NOTE: The following procedure is required by the Windows Form Designer
    27.     'It can be modified using the Windows Form Designer.  
    28.     'Do not modify it using the code editor.
    29.     Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
    30.     Friend WithEvents Button1 As System.Windows.Forms.Button
    31.     Friend WithEvents ComboBox1 As System.Windows.Forms.ComboBox
    32.     <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
    33.         Me.TextBox1 = New System.Windows.Forms.TextBox
    34.         Me.Button1 = New System.Windows.Forms.Button
    35.         Me.ComboBox1 = New System.Windows.Forms.ComboBox
    36.         Me.SuspendLayout()
    37.         '
    38.         'TextBox1
    39.         '
    40.         Me.TextBox1.Location = New System.Drawing.Point(64, 136)
    41.         Me.TextBox1.Name = "TextBox1"
    42.         Me.TextBox1.TabIndex = 0
    43.         Me.TextBox1.Text = "TextBox1"
    44.         '
    45.         'Button1
    46.         '
    47.         Me.Button1.Location = New System.Drawing.Point(80, 168)
    48.         Me.Button1.Name = "Button1"
    49.         Me.Button1.TabIndex = 1
    50.         Me.Button1.Text = "Button1"
    51.         '
    52.         'ComboBox1
    53.         '
    54.         Me.ComboBox1.Location = New System.Drawing.Point(32, 56)
    55.         Me.ComboBox1.Name = "ComboBox1"
    56.         Me.ComboBox1.Size = New System.Drawing.Size(121, 21)
    57.         Me.ComboBox1.TabIndex = 2
    58.         Me.ComboBox1.Text = "ComboBox1"
    59.         '
    60.         'Form1
    61.         '
    62.         Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
    63.         Me.ClientSize = New System.Drawing.Size(292, 266)
    64.         Me.Controls.Add(Me.ComboBox1)
    65.         Me.Controls.Add(Me.Button1)
    66.         Me.Controls.Add(Me.TextBox1)
    67.         Me.Name = "Form1"
    68.         Me.Text = "Form1"
    69.         Me.ResumeLayout(False)
    70.  
    71.     End Sub
    72.  
    73. #End Region

  3. #3

    Thread Starter
    Frenzied Member FishGuy's Avatar
    Join Date
    Mar 2005
    Location
    Bradford UK
    Posts
    1,708

    Re: Help What's Gone Wrong?

    It fixed when I moved this line of code from the initialize component section of the parent form, to the forms load event.
    VB Code:
    1. RecommendID = objDatabase.SqlDVFillRecommends(objMainform.grdCallingList.CurrentRowIndex)("PK_RecommendID").ToString()

  4. #4
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170

    Re: [RESOLVED] Help What's Gone Wrong?

    The moral of this thread is, don't mess with the Designer Code.

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