3 Replies - 1498 Views - Last Post: 02 September 2012 - 07:59 PM Rate Topic: -----

#1 VbBanana  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 31-August 12

Error code: "Value cannot be null. Parameter name: item"

Posted 31 August 2012 - 01:15 PM

Hello. Im just a beginner, and at the moment I'm making a web browser and i'm using Krypton. Im getting an error that says, "Value cannot be null. Parameter name: item". Here's the code.

Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim t As New TabPage

        Dim newtab As New tab
        newtab.Show()
        newtab.TopLevel = False
        newtab.Dock = DockStyle.Fill
        t.Controls.Add(newtab)
        KryptonNavigator1.Pages.Add(t) <----- I'm getting the error at this point








    End Sub


Please help, i cant figure out the problem.

Thanks! :rolleyes:

Is This A Good Question/Topic? 0
  • +

Replies To: Error code: "Value cannot be null. Parameter name: item"

#2 modi123_1  Icon User is offline

  • Suitor #2
  • member icon



Reputation: 8371
  • View blog
  • Posts: 31,101
  • Joined: 12-June 08

Re: Error code: "Value cannot be null. Parameter name: item"

Posted 31 August 2012 - 01:18 PM

I have no idea what this "krypton" thing is, but if it's a new library do you know if it takes normal tab pages in it's page collection?
Was This Post Helpful? 0
  • +
  • -

#3 VbBanana  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 31-August 12

Re: Error code: "Value cannot be null. Parameter name: item"

Posted 01 September 2012 - 12:57 PM

Krypton is a toolkit that can skin your forms and make your application look like Microsoft Office. It's "TabControl" is called KryptonNavigator. Except for pages it has pages. Here's a picture of what Krypton can do to your application:

Posted Image

Plus you have to add a reference and have to change a bit of code in the vb designer, with the code
Inherits ComponentFactory.Krypton.Toolkit.KryptonForm


Posted Image

Here is the "Tabcontrol"

Posted Image
In the code you cannot put in "page" but you have to put in "pages"
KryptonNavigator1.Pages.Add(t)

then the error message comes.

Thanks for replying!

*"It dosent have "Page" it has pages

- Sorry
Was This Post Helpful? 0
  • +
  • -

#4 BobRodes  Icon User is offline

  • Your Friendly Local Curmudgeon
  • member icon

Reputation: 571
  • View blog
  • Posts: 2,979
  • Joined: 19-May 09

Re: Error code: "Value cannot be null. Parameter name: item"

Posted 02 September 2012 - 07:59 PM

You'll need to look at what the "item" parameter is. I'll assume that it's the argument to the add method. If so, you need to backtrack and figure out why t is null.
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1