473,320 Members | 1,861 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Third Party Control Error from vbAcccelerator in VB.net 2005 Express

Baz

Hi,

I am new to VB .net (long time VBA programmer) and was trying to
integrate a freeware list bar control into a windows mdi child form in
VB.net 2005 Express. I think I am doing it right, obviously I'm not
though!...

Details of the control itself and links to the dll's required are on;
=http://www.vbaccelerator.com/home/NE...ar/article.asp

So, in the project I have referenced the two dlls mentioned and have
plonked the VSNetListBar control into an otherwise empty form.

I have added the following sample script (converted to VB from CS
minus the random number bit).

************************************************** ************************************************** *
Imports vbAccelerator.Components.ListBarControl
Imports System.Windows.Forms

Public Class frmChild

Private Sub VsNetListBar1_Load(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles VsNetListBar1.Load
' Create 4 bars and add a random number of items to each:
Dim i As Integer = 0
Do While (i < 4)
' Create the items:
Dim jMax As Integer = (5)
Dim subItems(jMax - 1) As VSNetListBarItem
Dim j As Integer = 0
Do While (j < jMax)
subItems(j) = New VSNetListBarItem(String.Format("Test
Item {0} in Bar {1}", (j + 1), (i + 1)), (j Mod 4),
String.Format("Tooltip text for test item {0}", (j + 1)))
If (j = 2) Then
subItems(j).Enabled = False
End If
j = (j + 1)
Loop
' Create the group and add the sub items:
Me.VsNetListBar1.Groups.Add(New
VSNetListBarGroup(String.Format("Test {0}", (i + 1)), subItems))
i = (i + 1)
Loop
End Sub

End Class
************************************************** ************************************************** **


But a get the following exception detail.
************************************************** ************************************************** **
System.NullReferenceException was unhandled
Message="Object reference not set to an instance of an object."
Source="acclVSNetListBar"
StackTrace:
at
vbAccelerator.Components.ListBarControl.VSNetListB arItem.DrawButton(Graphics
gfx, ImageList ils, Font defaultFont, ListBarDrawStyle style,
ListBarGroupView view, Int32 scrollOffset, Boolean controlEnabled,
Boolean skipDrawText)
at
vbAccelerator.Components.ListBarControl.ListBarIte mCollection.Draw(Graphics
gfx, Rectangle bounds, ImageList ils, Font defaultFont,
ListBarDrawStyle style, ListBarGroupView view, Boolean enabled, Int32
scrollOffset)
at
vbAccelerator.Components.ListBarControl.VSNetListB arGroup.DrawBar(Graphics
gfx, Rectangle bounds, ImageList ils, Font defaultFont,
ListBarDrawStyle style, Boolean controlEnabled)
at
vbAccelerator.Components.ListBarControl.ListBar.Re nder(PaintEventArgs
pe)
at
vbAccelerator.Components.ListBarControl.ListBar.On Paint(PaintEventArgs
e)
at
System.Windows.Forms.Control.PaintWithErrorHandlin g(PaintEventArgs e,
Int16 layer, Boolean disposeEventArgs)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Mes sage& m)
at System.Windows.Forms.ContainerControl.WndProc(Mess age& m)
at System.Windows.Forms.UserControl.WndProc(Message& m)
at
System.Windows.Forms.Control.ControlNativeWindow.O nMessage(Message& m)
at
System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message& m)
at System.Windows.Forms.NativeWindow.DebuggableCallba ck(IntPtr
hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
at
System.Windows.Forms.UnsafeNativeMethods.DispatchM essageW(MSG& msg)
at
System.Windows.Forms.Application.ComponentManager. System.Windows.Forms.UnsafeNativeMethods.IMsoCompo nentManager.FPushMessageLoop(Int32
dwComponentID, Int32 reason, Int32 pvLoopData)
at
System.Windows.Forms.Application.ThreadContext.Run MessageLoopInner(Int32
reason, ApplicationContext context)
at
System.Windows.Forms.Application.ThreadContext.Run MessageLoop(Int32
reason, ApplicationContext context)
at System.Windows.Forms.Application.Run(ApplicationCo ntext
context)
at
Microsoft.VisualBasic.ApplicationServices.WindowsF ormsApplicationBase.OnRun()
at
Microsoft.VisualBasic.ApplicationServices.WindowsF ormsApplicationBase.DoApplicationModel()
at
Microsoft.VisualBasic.ApplicationServices.WindowsF ormsApplicationBase.Run(String[]
commandLine)
at DAC.My.MyApplication.Main(String[] Args) in 17d14f5c-
a337-4978-8281-53493378c1071.vb:line 81
at System.AppDomain.nExecuteAssembly(Assembly assembly,
String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile,
Evidence assemblySecurity, String[] args)
at
Microsoft.VisualStudio.HostingProcess.HostProc.Run UsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context( Object
state)
at System.Threading.ExecutionContext.Run(ExecutionCon text
executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
************************************************** ************************************************** **
Any help greatly received!

Thanks,

Baz
Jun 27 '08 #1
0 773

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Chuck Hartman | last post by:
I have a Windows service that requests web pages from a site using an HttpWebRequest object. When I try to request a page from an ASP.NET 2 site, I get a WebException with message "The remote...
5
by: Norsoft | last post by:
I have a .Net 1.1 application which is downloaded into an aspx page. It is a dll which inherits from System.Windows.Forms.UserControl. It works fine on a PC with only the 1.1 Framework. However,...
0
by: tsmith | last post by:
Hi Can somebody help me, please! I'm trying to use a third-party .NET forms control in an unmanaged COM-aware application (MFC). I have no problem doing this with normal .net controls, as...
2
by: sonu | last post by:
Hi all, I have posted this topic previously but still not able to find out any solution for this probelm. The scenario is like I am using a third party activeX Control in my project. I have...
0
by: sonali_reddy123 | last post by:
Hi all, I am using one third party control in my application basically the control shows evaluation dialog each time when I create the object of that component. To overcome issue I have...
4
by: m11533 | last post by:
I am developing a large application with Visual Studio .NET 2003 using C#. We recently added a new third party product with a native .NET library. I want to place this third party product's dll in...
0
by: Mike Brophy | last post by:
I have an assembly that uses a 3rd party ActiveX control -- when I publish my app it does not install and register the 3rd party ActiveX control on client machines. How can I make it do this? ...
1
by: sajohn | last post by:
Hi I'm fairly new to VS2005 IDE and have come up with a problem I haven't been able to solve yet. I created a dll that depends on a third party dll. When I try to run my dll without the TP dll...
0
by: Baz | last post by:
Hi, I am new to VB .net (long time VBA programmer) and was trying to integrate a freeware list bar control into a windows mdi child form in VB.net 2005 Express. I think I am doing it right,...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.