473,386 Members | 1,835 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,386 software developers and data experts.

Problem in using COM Component "MSCOMCTL.OCX" in Vb.net 2008

Hi,

I converted a VB6 application in VB.net 2008 by using VS 2008 conversion wizard I have encountered a problem in using Tab control in VB.net. I used “Microsoft TabStrip Control 6.0 (SP6)” in VB 6 project. VB.net converter wizard converted it properly and add reference to “AxInterop.MSComctlLib.dll” and “Interop.MSComctlLib.dll”. I am using TabStrip on a Form that is use “Hide” instead of “Close”. So problem is when this form shown again following instruction raises exception:

a = tbsMain.SelectedItem.Index

Exception: NullReferenceException was unhandled “Object reference not set to an instance of an object.”

But when I browse the selected item’s index value using “Quick Watch” option (while debugging) it returns the correct index instead of nothing value. I am unable to understand what is the problem and is restricted to use only this control. While debugging when I browse SelectedItem property in “tbsMain”, it contains an object of “MSComctlLib.TabClass”, I think when “Hide” the Form reference of this object’s memory location is lost but this is just an assumption. I have also attached a demo project to demonstrate the problem.

Regards,

Hassan
Attached Files
File Type: zip WindowsApplication4.zip (272.6 KB, 95 views)
Sep 9 '10 #1
0 1682

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: balg | last post by:
An ActiveX control has a call to "UserControl.Parent" which fails when it is interopped and added to a .Net Form. Is there any way to access to .Net parent control/it's interfaces from VB6...
0
by: Colin | last post by:
"There is no object in this control" in Access 97 form with registered MSINET.OCX on XP machine I have an Access 97 database that I made a form with using the Microsoft Internet Transfer control...
0
by: Dana Epp | last post by:
Anyone know how to set the "Disabled" imagelist in a C# Toolbar? Although the Microsoft's Toolbar ActiveX control in the mscomctl.ocx has such a property, there doesn't seem to be one for the C#...
2
by: Lance Geeck | last post by:
I have many items that I lifted off from Microsoft's website several years ago. These samples were in VB6. I now want to convert an application to VB.NET. I am getting an error that says "As Any...
2
by: jdanoz | last post by:
Hello, i have a vb.net project with a reference to an ActiveX object (ocx). If i try to use the ocx from vb6 project (adding the reference) it works ok (using CreateObject). In vb.net, the...
2
by: Sush | last post by:
Hi, I have a wtriiten a program in VB 6.0, and I have HTML files included for Help. I have declared Private Declare Function HtmlHelp Lib "hhctrl.ocx" Alias "HtmlHelpA" _ (ByVal hWndCaller As...
8
by: Bruce | last post by:
I am using VB in Vs2005. Am I missing something or does VB not have the concept of "builds" (release/debug) like in VC? I wrote an assembly and I would like to have a debug version of the DLL...
4
by: Anil Gupte | last post by:
A friend of mine is having this problem on his machine - it works fine on my machine. The above message appears when he tries to inset the "Microsoft Internet Transfer Control" (Inet) into a...
1
by: wizmagister | last post by:
Hi everyone, I've just installed VisualStudio 2008 on my dev PC. I use this PC to compile a program that uses MapPointControl.ocx. I've compile a new version of my program using VS 2005 after...
4
benchpolo
by: benchpolo | last post by:
I modified my existing MsAccess (.mdb) database with addtional queries and report. When I updated the version in my other pc with the new version when I loaded the database an error popped-out that...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.