Ошибка при создании формы см exception innerexception

When running my VB.Net code (below), I get the following error:

An unhandled exception of type ‘System.InvalidOperationException’
occurred in CropModel.exe An error occurred creating the form. See
Exception.InnerException for details. The error is: Object reference
not set to an instance of an object.

Private Class Frm_Main     

      Private Sub Form_MainControl_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Me.Reinsurance_YearTableAdapter.Fill(Me.CUNACropModelDataSet.Reinsurance_Year)
        Me.Ref_CropTableAdapter.Fill(Me.CUNACropModelDataSet.ref_Crop)
        Me.MdiParent = MDIParent1

      End Sub

      Private Sub Button_ModelLoss_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button_ModelLoss.Click

            Frm_LossModel_Select.MdiParent = MDIParent1
            Frm_LossModel_Select.Show()
            Frm_LossModel_Select.Activate()
            'Me.Close()

       End Sub
 End Class

The debug points the issue in the following line:

Frm_LossModel_Select.MdiParent = MDIParent1

Seems this error is very general. Is it possible to know where the actual error is being caused in Frm_LossModel_Select (if it is even being caused there)? The only things changed in that form were DataSet names and table names from SQL and I made sure those were all being referenced properly.

If additional code is needed for this issue, I’d be more than willing to provide.

Thanks!

  • Remove From My Forums
  • Вопрос

  • Здравствуйте.
    Тихо, мирно писал программу, подправил чуть-чуть код. Запустил отладку — все нормально. Изменил в свойствах объекта TabControl Multiline и ShowToolTips на True запустил отладку и выдает мне сообщение: «Ошибка при создании формы. См. Exception.InnerException.  Ошибка: Адресат вызова создал исключение.» Я изменил свойсва так, как они были, но проблема не исчезла. Что мне делать?

    • Перемещено

      2 октября 2010 г. 22:24
      MSDN Forums consolidation (От:Разработка Windows-приложений)

Ответы

  • Смотреть в Exception.InnerException, там будет видна настоящая ошибка

    • Предложено в качестве ответа
      PashaPash
      28 января 2010 г. 16:11
    • Помечено в качестве ответа
      I.Vorontsov
      29 января 2010 г. 13:27

I get this error when attempting to debug my form, I cannot see where at all the error could be (also does not highlight where), anyone have any suggestions?

An error occurred creating the form.
See Exception.InnerException for
details. The error is: Object
reference not set to an instance of an
object.

Dim dateCrap As String = "Date:"
Dim IPcrap As String = "Ip:"
Dim pcCrap As String = "Computer:"
Dim programCrap As String = "Program:"

Dim textz As String
Dim sep() As String = {vbNewLine & vbNewLine}
Dim sections() As String = Text.Split(sep, StringSplitOptions.None)

Dim NewArray() As String = TextBox1.Text.Split(vbNewLine)


Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    textz = TextBox1.Text
End Sub

asked May 19, 2010 at 15:17

Ben's user avatar

BenBen

692 gold badges4 silver badges7 bronze badges

3

The error is here:

Dim textz As String = TextBox1.Text

and here:

Dim NewArray() As String = TextBox1.Text.Split(vbNewLine)

and possibly here:

Dim sections() As String = Text.Split(sep, StringSplitOptions.None)

You cannot initialize a member like this because this code is basically executed in the constructor, before TextBox1 (or any other control/property) is initialized, hence it is Nothing.

Put all initializations that refer to controls inside the Form_Load event – that’s what it’s there for.

answered May 19, 2010 at 15:25

Konrad Rudolph's user avatar

Konrad RudolphKonrad Rudolph

520k127 gold badges925 silver badges1203 bronze badges

2

Turn off «Just MY Code» under debugging section on the «Options>General» tab. That’ll show you where the exact error originates.

Raj's user avatar

Raj

22k14 gold badges100 silver badges140 bronze badges

answered Feb 21, 2011 at 15:06

Ankush's user avatar

1

I had the same symptoms — couldn’t even start debugging, as the error appeared before any of my code started to run. Eventually tracked it down to a resize event handler:

Private Sub frmMain_Resize(sender As Object, e As System.EventArgs) Handles Me.Resize

ArrangeForm()

End Sub

As soon as I removed the handler, the error disappeared. The odd thing is that it had been running for about 3 weeks (while I developed other parts of the code) without any problem, and just spontaneously stopped working. A ResizeEnd event handler caused no problem.

Just posting this in case anyone else is unfortunate enough to encounter the same problem. It took me 8 hours to track it down.

answered Dec 12, 2014 at 10:10

John Glover's user avatar

I get this error when attempting to debug my form, I cannot see where at all the error could be (also does not highlight where), anyone have any suggestions?

An error occurred creating the form.
See Exception.InnerException for
details. The error is: Object
reference not set to an instance of an
object.

Dim dateCrap As String = "Date:"
Dim IPcrap As String = "Ip:"
Dim pcCrap As String = "Computer:"
Dim programCrap As String = "Program:"

Dim textz As String
Dim sep() As String = {vbNewLine & vbNewLine}
Dim sections() As String = Text.Split(sep, StringSplitOptions.None)

Dim NewArray() As String = TextBox1.Text.Split(vbNewLine)


Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    textz = TextBox1.Text
End Sub

asked May 19, 2010 at 15:17

Ben's user avatar

BenBen

692 gold badges4 silver badges7 bronze badges

3

The error is here:

Dim textz As String = TextBox1.Text

and here:

Dim NewArray() As String = TextBox1.Text.Split(vbNewLine)

and possibly here:

Dim sections() As String = Text.Split(sep, StringSplitOptions.None)

You cannot initialize a member like this because this code is basically executed in the constructor, before TextBox1 (or any other control/property) is initialized, hence it is Nothing.

Put all initializations that refer to controls inside the Form_Load event – that’s what it’s there for.

answered May 19, 2010 at 15:25

Konrad Rudolph's user avatar

Konrad RudolphKonrad Rudolph

520k127 gold badges925 silver badges1203 bronze badges

2

Turn off «Just MY Code» under debugging section on the «Options>General» tab. That’ll show you where the exact error originates.

Raj's user avatar

Raj

22k14 gold badges100 silver badges140 bronze badges

answered Feb 21, 2011 at 15:06

Ankush's user avatar

1

I had the same symptoms — couldn’t even start debugging, as the error appeared before any of my code started to run. Eventually tracked it down to a resize event handler:

Private Sub frmMain_Resize(sender As Object, e As System.EventArgs) Handles Me.Resize

ArrangeForm()

End Sub

As soon as I removed the handler, the error disappeared. The odd thing is that it had been running for about 3 weeks (while I developed other parts of the code) without any problem, and just spontaneously stopped working. A ResizeEnd event handler caused no problem.

Just posting this in case anyone else is unfortunate enough to encounter the same problem. It took me 8 hours to track it down.

answered Dec 12, 2014 at 10:10

John Glover's user avatar

1605 / 1337 / 291

Регистрация: 25.10.2009

Сообщений: 3,487

Записей в блоге: 2

1

Ошибка при создании формы

25.07.2010, 14:12. Показов 2669. Ответов 2


День добрый. Появилась проблема. Писал проект , всё было нормально, всё работало.
Но сейчас форма не хочет открываться.
В таком UserForm.Visible = True
или в таком UserForm.Show()
случаях возникает ошибка:

Additional information: Ошибка при создании формы. См. Exception.InnerException. Ошибка: Значение не может быть неопределенным.
Имя параметра: Аргумент «Array» имеет значение Nothing.
Пишу на VStudio2008

0

Евгений М.

1080 / 1006 / 106

Регистрация: 28.02.2010

Сообщений: 2,889

25.07.2010, 14:27

2

Попробуйте.

Visual Basic
1
Load UserForm

Должно быть перед UserFrom.Show() или UserForm.Visible = True

0

1605 / 1337 / 291

Регистрация: 25.10.2009

Сообщений: 3,487

Записей в блоге: 2

25.07.2010, 14:42

 [ТС]

3

Спасибо но нет. В Visual Studio 2008 не используется Load/Unload

Добавлено через 12 минут
Всё, разобрался, неправильно объявил массив. моя ошибка)

0

When running my VB.Net code (below), I get the following error:

An unhandled exception of type ‘System.InvalidOperationException’
occurred in CropModel.exe An error occurred creating the form. See
Exception.InnerException for details. The error is: Object reference
not set to an instance of an object.

Private Class Frm_Main     

      Private Sub Form_MainControl_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Me.Reinsurance_YearTableAdapter.Fill(Me.CUNACropModelDataSet.Reinsurance_Year)
        Me.Ref_CropTableAdapter.Fill(Me.CUNACropModelDataSet.ref_Crop)
        Me.MdiParent = MDIParent1

      End Sub

      Private Sub Button_ModelLoss_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button_ModelLoss.Click

            Frm_LossModel_Select.MdiParent = MDIParent1
            Frm_LossModel_Select.Show()
            Frm_LossModel_Select.Activate()
            'Me.Close()

       End Sub
 End Class

The debug points the issue in the following line:

Frm_LossModel_Select.MdiParent = MDIParent1

Seems this error is very general. Is it possible to know where the actual error is being caused in Frm_LossModel_Select (if it is even being caused there)? The only things changed in that form were DataSet names and table names from SQL and I made sure those were all being referenced properly.

If additional code is needed for this issue, I’d be more than willing to provide.

Thanks!

When running my VB.Net code (below), I get the following error:

An unhandled exception of type ‘System.InvalidOperationException’
occurred in CropModel.exe An error occurred creating the form. See
Exception.InnerException for details. The error is: Object reference
not set to an instance of an object.

Private Class Frm_Main     

      Private Sub Form_MainControl_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Me.Reinsurance_YearTableAdapter.Fill(Me.CUNACropModelDataSet.Reinsurance_Year)
        Me.Ref_CropTableAdapter.Fill(Me.CUNACropModelDataSet.ref_Crop)
        Me.MdiParent = MDIParent1

      End Sub

      Private Sub Button_ModelLoss_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button_ModelLoss.Click

            Frm_LossModel_Select.MdiParent = MDIParent1
            Frm_LossModel_Select.Show()
            Frm_LossModel_Select.Activate()
            'Me.Close()

       End Sub
 End Class

The debug points the issue in the following line:

Frm_LossModel_Select.MdiParent = MDIParent1

Seems this error is very general. Is it possible to know where the actual error is being caused in Frm_LossModel_Select (if it is even being caused there)? The only things changed in that form were DataSet names and table names from SQL and I made sure those were all being referenced properly.

If additional code is needed for this issue, I’d be more than willing to provide.

Thanks!

Помогите пожалуйста разобраться с такой проблемой:

Написал программу на VB2005, грубо выглядит так — стартует форма, на ней кнопка, жмем кнопку, открывается еще одна форма, на ней WebBrowser и AxMCIWnd.

На исходном компьютере, все запускается замечательно, error list чист, без предупреждений.

Пытаюсь запустить на другом (пробовал на нескольких) — пишет необрабатываемое исключение, и форму не грузит.

в окне ошибки вот что:

Подробная информация об использовании оперативной

(JIT) отладки вместо данного диалогового

окна содержится в конце этого сообщения.

************** Текст исключения **************

System.InvalidOperationException: Ошибка при создании формы. См. Exception.InnerException. Ошибка: Сбой при запросе. —> System.Security.SecurityException: Сбой при запросе.

в System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Assembly asm, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed)

в System.Security.CodeAccessSecurityEngine.ThrowSecurityException(Object assemblyOrString, PermissionSet granted, PermissionSet refused, RuntimeMethodHandle rmh, SecurityAction action, Object demand, IPermission permThatFailed)

в System.Security.CodeAccessSecurityEngine.CheckSetHelper(PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHandle rmh, Object assemblyOrString, SecurityAction action, Boolean throwException)

в System.Security.CodeAccessSecurityEngine.CheckSetHelper(CompressedStack cs, PermissionSet grants, PermissionSet refused, PermissionSet demands, RuntimeMethodHandle rmh, Assembly asm, SecurityAction action)

в WindowsApplication1.Form1.InitializeComponent()

в WindowsApplication1.Form1..ctor()

Ошибкой завершилось следующее действие:

LinkDemand

Ошибкой завершилось первое разрешение следующего типа:

System.Security.PermissionSet

Ошибкой завершилась сборка со следующим параметром Zone:

Intranet

— Конец трассировки внутреннего стека исключений —

в WindowsApplication1.My.MyProject.MyForms.Create__Instance__[T](T Instance)

в WindowsApplication1.My.MyProject.MyForms.get_Form1()

в WindowsApplication1.main.Button1_Click(Object sender, EventArgs e)

в System.Windows.Forms.Control.OnClick(EventArgs e)

в System.Windows.Forms.Button.OnClick(EventArgs e)

в System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)

в System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)

в System.Windows.Forms.Control.WndProc(Message& m)

в System.Windows.Forms.ButtonBase.WndProc(Message& m)

в System.Windows.Forms.Button.WndProc(Message& m)

в System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)

в System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)

в System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

************** Загруженные сборки **************

mscorlib

Версия сборки: 2.0.0.0

Версия Win32: 2.0.50727.235 (QFE.050727-2300)

CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll

—————————————-

Diplom

Версия сборки: 1.0.0.0

Версия Win32: 1.0.0.0

CodeBase: file:///Z:/Resourses/Материалы%20по%20учебе/Прога/vb2005/Diplom/bin/Debug/Diplom.exe

—————————————-

Microsoft.VisualBasic

Версия сборки: 8.0.0.0

Версия Win32: 8.0.50727.42 (RTM.050727-4200)

CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualBasic/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll

—————————————-

System

Версия сборки: 2.0.0.0

Версия Win32: 2.0.50727.235 (QFE.050727-2300)

CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll

—————————————-

System.Windows.Forms

Версия сборки: 2.0.0.0

Версия Win32: 2.0.50727.42 (RTM.050727-4200)

CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll

—————————————-

System.Drawing

Версия сборки: 2.0.0.0

Версия Win32: 2.0.50727.42 (RTM.050727-4200)

CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll

—————————————-

mscorlib.resources

Версия сборки: 2.0.0.0

Версия Win32: 2.0.50727.235 (QFE.050727-2300)

CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll

—————————————-

System.Runtime.Remoting

Версия сборки: 2.0.0.0

Версия Win32: 2.0.50727.42 (RTM.050727-4200)

CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Runtime.Remoting/2.0.0.0__b77a5c561934e089/System.Runtime.Remoting.dll

—————————————-

System.Configuration

Версия сборки: 2.0.0.0

Версия Win32: 2.0.50727.42 (RTM.050727-4200)

CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll

—————————————-

System.Xml

Версия сборки: 2.0.0.0

Версия Win32: 2.0.50727.42 (RTM.050727-4200)

CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll

—————————————-

Microsoft.VisualBasic.resources

Версия сборки: 8.0.0.0

Версия Win32: 8.0.50727.42 (RTM.050727-4200)

CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualBasic.resources/8.0.0.0_ru_b03f5f7f11d50a3a/Microsoft.VisualBasic.resources.dll

—————————————-

System.Windows.Forms.resources

Версия сборки: 2.0.0.0

Версия Win32: 2.0.50727.42 (RTM.050727-4200)

CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms.resources/2.0.0.0_ru_b77a5c561934e089/System.Windows.Forms.resources.dll

—————————————-

Пробовал создать publish — no же самое.

поясню — первая форма запускается, а при попытке запустить вторую — вылазит ошибка :(

Уважаемые гуру, в чем может быть дело?

может необрабатываемое исключение нужно как то обрабатывать?

Я получаю эту ошибку при попытке отладки моей формы, я не вижу, где вообще могла быть ошибка (также не выделяет где), у кого-нибудь есть предложения?

Произошла ошибка при создании формы. Подробнее см. Exception.InnerException. Ошибка: ссылка на объект не установлена ​​на экземпляр объекта.

Dim dateCrap As String = "Date:"
Dim IPcrap As String = "Ip:"
Dim pcCrap As String = "Computer:"
Dim programCrap As String = "Program:"

Dim textz As String
Dim sep() As String = {vbNewLine & vbNewLine}
Dim sections() As String = Text.Split(sep, StringSplitOptions.None)

Dim NewArray() As String = TextBox1.Text.Split(vbNewLine)


Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    textz = TextBox1.Text
End Sub

3 ответы

Ошибка здесь:

Dim textz As String = TextBox1.Text

и здесь:

Dim NewArray() As String = TextBox1.Text.Split(vbNewLine)

и, возможно, здесь:

Dim sections() As String = Text.Split(sep, StringSplitOptions.None)

Вы не можете инициализировать такой член, потому что этот код в основном выполняется в конструкторе, до TextBox1 (или любой другой элемент управления / свойство) инициализируется, следовательно, он Nothing.

Поместите все инициализации, которые относятся к элементам управления, внутри Form_Load событие — вот для чего это нужно.

ответ дан 19 мая ’10, 16:05

Отключите «Только мой код» в разделе отладки на вкладке «Параметры> Общие». Это покажет вам, где именно возникла ошибка.

ответ дан 11 авг.

У меня были те же симптомы — я даже не мог начать отладку, так как ошибка появилась до того, как какой-либо мой код начал работать. В конце концов отследил это до обработчика события изменения размера:

Private Sub frmMain_Resize (отправитель как объект, e как System.EventArgs) обрабатывает Me.Resize

ArrangeForm()

End Sub

Как только убрал обработчик, ошибка исчезла. Странно то, что он работал около 3 недель (пока я разрабатывал другие части кода) без каких-либо проблем и просто самопроизвольно перестал работать. Обработчик события ResizeEnd не вызвал проблем.

Просто разместите это на случай, если кому-то еще не повезло столкнуться с той же проблемой. Мне потребовалось 8 часов, чтобы разыскать его.

ответ дан 12 дек ’14, 10:12

Не тот ответ, который вы ищете? Просмотрите другие вопросы с метками

vb.net
forms
object
instance

or задайте свой вопрос.

  • Home
  • VBForums
  • Visual Basic
  • Visual Basic .NET
  • An error occurred creating the form. See Exception.InnerException for details.

  1. May 22nd, 2013, 09:00 PM

    #1

    League is offline

    Thread Starter


    Member


    An error occurred creating the form. See Exception.InnerException for details.

    Dim tags = Form2.RichTextBox1.Lines
    Dim url = ???»
    Dim urltags = ?? + tags

    Dim request As System.Net.HttpWebRequest = System.Net.HttpWebRequest.Create(urltags)
    Dim response As System.Net.HttpWebResponse = request.GetResponse()
    Dim sr As System.IO.StreamReader = New System.IO.StreamReader(response.GetResponseStream())
    End If
    ___________________________________________________________________________________________

    when i change

    Dim tags = Form2.RichTextBox1.Lines to form2.richtextbox1.text it works but it only scans the 1st word of the list and stops

    ___________________________________________________________________________________________
    ERROR: Operator ‘&’ is not defined for string «https://live.xbox.com/en-GB/Prof» and type ‘String()

    Last edited by League; Aug 21st, 2013 at 12:25 AM.


  2. May 22nd, 2013, 09:04 PM

    #2

    Re: An error occurred creating the form. See Exception.InnerException for details.

    Code:

    Dim tags as string = string.join("put the separator here", Form2.RichTextBox1.Lines)

    • Coding Examples:
    • Features:
    • Online Games:
    • Compiled Games:


  3. May 22nd, 2013, 10:49 PM

    #3

    League is offline

    Thread Starter


    Member


    Re: An error occurred creating the form. See Exception.InnerException for details.

    Quote Originally Posted by .paul.
    View Post

    Code:

    Dim tags as string = string.join("put the separator here", Form2.RichTextBox1.Lines)

    didnt work:
    Dim tags As String = String.Join(«https://live.xbox.com/en-GB/Profile?gamertag=», Form2.RichTextBox1.Lines)
    doesnt work with form2.richtextbox1.text either

    error:
    Invalid URI: The format of the URI could not be determined.


  4. May 22nd, 2013, 11:11 PM

    #4

    Re: An error occurred creating the form. See Exception.InnerException for details.

    Quote Originally Posted by League
    View Post

    didnt work:
    Dim tags As String = String.Join(«https://live.xbox.com/en-GB/Profile?gamertag=», Form2.RichTextBox1.Lines)
    doesnt work with form2.richtextbox1.text either

    error:
    Invalid URI: The format of the URI could not be determined.

    It didn’t work because you didn’t do it properly. .paul. specifically said:Is «https://live.xbox.com/en-GB/Profile?gamertag=» the value you want separating the parameters? Of course it isn’t. Did you actually read the documentation for String.Join to see how it works? Of course you didn’t. Did you even look to see what ‘tags’ contains after that code?

    String.Join works by combining the list of values (the second argument) into a single String with each pair separated by the delimiter (the first argument). For instance, if you do this:

    Code:

    Dim values = {"First", "Second", "Third"}
    Dim result = String.Join("||", values)
    
    MessageBox.Show(result)

    then you will see this:So, in your case, you need to specify the bit of text that you want to separate each pair of lines from the RichTextBox in the final result when you call String.Join, then you need to concatenate that result with your original URL.


  5. May 23rd, 2013, 01:21 AM

    #5

    League is offline

    Thread Starter


    Member


    Re: An error occurred creating the form. See Exception.InnerException for details.

    Quote Originally Posted by jmcilhinney
    View Post

    It didn’t work because you didn’t do it properly. .paul. specifically said:Is «https://live.xbox.com/en-GB/Profile?gamertag=» the value you want separating the parameters? Of course it isn’t. Did you actually read the documentation for String.Join to see how it works? Of course you didn’t. Did you even look to see what ‘tags’ contains after that code?

    String.Join works by combining the list of values (the second argument) into a single String with each pair separated by the delimiter (the first argument). For instance, if you do this:

    Code:

    Dim values = {"First", "Second", "Third"}
    Dim result = String.Join("||", values)
    
    MessageBox.Show(result)

    then you will see this:So, in your case, you need to specify the bit of text that you want to separate each pair of lines from the RichTextBox in the final result when you call String.Join, then you need to concatenate that result with your original URL.

    didnt know what a seperator was obviously i even googled what came up was http://www.vbforums.com/showthread.p…uding-designer before posting and i googled the definition seperators also to make sure never heard of seperators in vb before now

    yes i read the code lost at seperators cause ive never heard of it so i guessed and put the link

    but thanks i actually get how it works

    made my day too youre funny <3


  6. May 23rd, 2013, 01:34 AM

    #6

    Re: An error occurred creating the form. See Exception.InnerException for details.

    That’s exactly why you should have read the documentation for the String.Join method. Surely it should be obvious that if you try to use a method and it doesn;t work, you read the instructions for that method. That documentation gives a perfectly simple example:

    Quote Originally Posted by MSDN

    For example, if separator is «, » and the elements of value are «apple», «orange», «grape», and «pear», Join(separator, value) returns «apple, orange, grape, pear».

    The Help menu in your IDE is there for a reason, as is the F1 key, which is used for Help in many thousands of Windows applications. They should ALWAYS be your first choice for help on a specific topic and using a known method is about as specific as it gets.


  • Home
  • VBForums
  • Visual Basic
  • Visual Basic .NET
  • An error occurred creating the form. See Exception.InnerException for details.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
  • BB code is On
  • Smilies are On
  • [IMG] code is On
  • [VIDEO] code is On
  • HTML code is Off

Forum Rules


Click Here to Expand Forum to Full Width

  • Remove From My Forums
  • Вопрос

  • Здравствуйте.
    Тихо, мирно писал программу, подправил чуть-чуть код. Запустил отладку — все нормально. Изменил в свойствах объекта TabControl Multiline и ShowToolTips на True запустил отладку и выдает мне сообщение: «Ошибка при создании формы. См. Exception.InnerException.  Ошибка: Адресат вызова создал исключение.» Я изменил свойсва так, как они были, но проблема не исчезла. Что мне делать?

    • Перемещено

      2 октября 2010 г. 22:24
      MSDN Forums consolidation (От:Разработка Windows-приложений)

Ответы

  • Смотреть в Exception.InnerException, там будет видна настоящая ошибка

    • Предложено в качестве ответа
      PashaPash
      28 января 2010 г. 16:11
    • Помечено в качестве ответа
      I.Vorontsov
      29 января 2010 г. 13:27

  • Remove From My Forums

 none

Ошибка при создании формы.

  • General discussion

  • Привет! У меня проблема. Имеется программа написанная на visual Basic 2008, программа для просмотра видео с сайта видео-хостинга, использует flash objects для потокового просмотра видео. При построении выдает ошибку:

    Ошибка при создании формы. См. Exception.InnerException.  Ошибка: Создание экземпляра элемента управления ActiveX «d27cdb6e-ae6d-11cf-96b8-444553540000» невозможно: текущий поток не находится в однопоточном контейнере.

    Как можно ее убрать?!

    • Changed type

      Monday, November 9, 2009 11:46 AM
      Ждём кастомера

    • Moved by
      SachinW
      Friday, October 1, 2010 10:20 PM
      MSDN Forums Consolidation (От:Начинающие разработчики)

1605 / 1337 / 291

Регистрация: 25.10.2009

Сообщений: 3,487

Записей в блоге: 2

1

Ошибка при создании формы

25.07.2010, 14:12. Показов 2704. Ответов 2


Студворк — интернет-сервис помощи студентам

День добрый. Появилась проблема. Писал проект , всё было нормально, всё работало.
Но сейчас форма не хочет открываться.
В таком UserForm.Visible = True
или в таком UserForm.Show()
случаях возникает ошибка:

Additional information: Ошибка при создании формы. См. Exception.InnerException. Ошибка: Значение не может быть неопределенным.
Имя параметра: Аргумент «Array» имеет значение Nothing.
Пишу на VStudio2008



0



Евгений М.

1080 / 1006 / 106

Регистрация: 28.02.2010

Сообщений: 2,889

25.07.2010, 14:27

2

Попробуйте.

Visual Basic
1
Load UserForm

Должно быть перед UserFrom.Show() или UserForm.Visible = True



0



1605 / 1337 / 291

Регистрация: 25.10.2009

Сообщений: 3,487

Записей в блоге: 2

25.07.2010, 14:42

 [ТС]

3

Спасибо но нет. В Visual Studio 2008 не используется Load/Unload

Добавлено через 12 минут
Всё, разобрался, неправильно объявил массив. моя ошибка)



0



  • Ошибка при создании фейсбука
  • Ошибка при создании фаски ребра компас
  • Ошибка при создании файла проекта reaper
  • Ошибка при создании учетной записи windows 10
  • Ошибка при создании файла подкачки