HighTechTalks DotNet Forums  

a .net framework bug

Dotnet Framework (Interop) microsoft.public.dotnet.framework.interop


Discuss a .net framework bug in the Dotnet Framework (Interop) forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Shwu
 
Posts: n/a

Default a .net framework bug - 10-25-2007 , 03:12 PM






I don't know where to report a bug to MS.

Here is the bug description:
I have an activeX created by ATL/C++, which shows a tree view with multiple
state checkboxes and icons. It works fine to embed the activeX to the main
form of a C# form application. If I create another subform to host the
activeX, let the main form calls the subform.ShowDialog() when a button on
the main form is clicked. The activeX's tree view in the subform does not
show any icon and checkbox at all.
If I call Application.Run(subform) in the Main method, the tree view's icon
and checkbox are all showed just fine.
I believe this is a bug of .Net Framework 2.0.

Thanks,

Shangwu



Reply With Quote
  #2  
Old   
Gigasoft
 
Posts: n/a

Default Re: a .net framework bug - 10-25-2007 , 07:06 PM






Hi

This doesn't sound like a bug with the framework.

I can't follow your problem totally and I have some ActiveX or native DLL to
managed form experience. In my experience, I've never seen a problem.

When mixing native and managed code on a form, dynamically creating native
portions, best to maintain singularity of your forms. .NET can actually
create multiple separate instances of your forms if you're not careful,
which can cause oddness. Google .NET WinForm or Form Singularity. My
guess is this would solve your issue. Be sure to destroy native portions
when your form closes, best to do this explicitly and not rely on garbage
collection when mixing native/managed code.

best regards,

Robert Dede
Gigasoft, Inc.
www.gigasoft.com




"Shwu" <shwu (AT) nospam (DOT) net> wrote

Quote:
I don't know where to report a bug to MS.

Here is the bug description:
I have an activeX created by ATL/C++, which shows a tree view with
multiple state checkboxes and icons. It works fine to embed the activeX to
the main form of a C# form application. If I create another subform to
host the activeX, let the main form calls the subform.ShowDialog() when a
button on the main form is clicked. The activeX's tree view in the subform
does not show any icon and checkbox at all.
If I call Application.Run(subform) in the Main method, the tree view's
icon and checkbox are all showed just fine.
I believe this is a bug of .Net Framework 2.0.

Thanks,

Shangwu




Reply With Quote
  #3  
Old   
Shwu
 
Posts: n/a

Default Re: a .net framework bug - 10-26-2007 , 11:15 AM



Thanks Robert for the response.

I am not mixing native code and managed code in my C# project. The ActiveX
control is a third party DLL. My .Net project is pure C#, nothing with
native code. As I said it is no problem to host the control in MainForm. The
problem is that the main form instantiates another form that hosts the
control.
Does your ActiveX show some image list and icons? What is the difference
between dynamically creating a control and dragging & dropping by the
Designer? What is the purpose to maintain singularity of a form?

Thanks again,

Shangwu


"Gigasoft" <robert (AT) gigasoft (DOT) com> wrote

Quote:
Hi

This doesn't sound like a bug with the framework.

I can't follow your problem totally and I have some ActiveX or native DLL
to managed form experience. In my experience, I've never seen a problem.

When mixing native and managed code on a form, dynamically creating native
portions, best to maintain singularity of your forms. .NET can actually
create multiple separate instances of your forms if you're not careful,
which can cause oddness. Google .NET WinForm or Form Singularity. My
guess is this would solve your issue. Be sure to destroy native portions
when your form closes, best to do this explicitly and not rely on garbage
collection when mixing native/managed code.

best regards,

Robert Dede
Gigasoft, Inc.
www.gigasoft.com




"Shwu" <shwu (AT) nospam (DOT) net> wrote in message
news:eKnPzrzFIHA.3848 (AT) TK2MSFTNGP05 (DOT) phx.gbl...
I don't know where to report a bug to MS.

Here is the bug description:
I have an activeX created by ATL/C++, which shows a tree view with
multiple state checkboxes and icons. It works fine to embed the activeX
to the main form of a C# form application. If I create another subform to
host the activeX, let the main form calls the subform.ShowDialog() when a
button on the main form is clicked. The activeX's tree view in the
subform does not show any icon and checkbox at all.
If I call Application.Run(subform) in the Main method, the tree view's
icon and checkbox are all showed just fine.
I believe this is a bug of .Net Framework 2.0.

Thanks,

Shangwu






Reply With Quote
  #4  
Old   
Shwu
 
Posts: n/a

Default Re: a .net framework bug - 10-26-2007 , 11:49 AM



This problem only occurs in VS2005 project. VS2003 does not have this
problem.

"Shwu" <shwu (AT) nospam (DOT) net> wrote

Quote:
I don't know where to report a bug to MS.

Here is the bug description:
I have an activeX created by ATL/C++, which shows a tree view with
multiple state checkboxes and icons. It works fine to embed the activeX to
the main form of a C# form application. If I create another subform to
host the activeX, let the main form calls the subform.ShowDialog() when a
button on the main form is clicked. The activeX's tree view in the subform
does not show any icon and checkbox at all.
If I call Application.Run(subform) in the Main method, the tree view's
icon and checkbox are all showed just fine.
I believe this is a bug of .Net Framework 2.0.

Thanks,

Shangwu




Reply With Quote
  #5  
Old   
Rob
 
Posts: n/a

Default RE: a .net framework bug - 10-28-2007 , 01:20 PM



"Shwu" wrote:
Quote:
Here is the bug description:
The activeX's tree view in the subform does not show any icon and checkbox at all.
This generally means that the application is using a comctl32 v5 ImageList
with a comctl32 v6 TreeView. Applications need to use matched versions. To
fix this, turn off EnableVisualStyles until you can get a version of the
ActiveX control which directly supports comctl32 v6.

Vista also makes the two versions compatible so this won't repro there.

--Rob


Reply With Quote
  #6  
Old   
Michael C
 
Posts: n/a

Default Re: a .net framework bug - 10-29-2007 , 12:35 AM



"Shwu" <shwu (AT) nospam (DOT) net> wrote

Quote:
Thanks Robert for the response.

I am not mixing native code and managed code in my C# project. The ActiveX
control is a third party DLL. My .Net project is pure C#, nothing with
native code.
The native code robert is refering to is the dll. Things like this can
happen and they are not necessarily a problem with the dotnet framework.
Possibly the control has a bug that doesn't make it work too well in dotnet.
It is the control that is showing the fault isn't it? :-)

Michael




Reply With Quote
  #7  
Old   
Shwu
 
Posts: n/a

Default Re: a .net framework bug - 10-30-2007 , 10:33 AM



Thank you, Rob. You are right. The problem is related to the comctl32
version.

Shangwu

"Rob" <Rob (AT) discussions (DOT) microsoft.com> wrote

Quote:
"Shwu" wrote:
Here is the bug description:
The activeX's tree view in the subform does not show any icon and
checkbox at all.

This generally means that the application is using a comctl32 v5 ImageList
with a comctl32 v6 TreeView. Applications need to use matched versions.
To
fix this, turn off EnableVisualStyles until you can get a version of the
ActiveX control which directly supports comctl32 v6.

Vista also makes the two versions compatible so this won't repro there.

--Rob



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.