Home All Groups Group Topic Archive Search About

a .net framework bug

Author
25 Oct 2007 7:12 PM
Shwu
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

Author
25 Oct 2007 11:06 PM
Gigasoft
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




Show quote
"Shwu" <shwu@nospam.net> wrote in message
news:eKnPzrzFIHA.3848@TK2MSFTNGP05.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
>
Author
26 Oct 2007 3:15 PM
Shwu
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


Show quote
"Gigasoft" <rob***@gigasoft.com> wrote in message
news:K6idncsggf3kvLzanZ2dnUVZ_ruqnZ2d@giganews.com...
> 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@nospam.net> wrote in message
> news:eKnPzrzFIHA.3848@TK2MSFTNGP05.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
>>
>
>
Author
29 Oct 2007 4:35 AM
Michael C
"Shwu" <shwu@nospam.net> wrote in message
news:uq$jBM%23FIHA.4956@TK2MSFTNGP06.phx.gbl...
> 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
Author
26 Oct 2007 3:49 PM
Shwu
This problem only occurs in VS2005 project. VS2003 does not have this
problem.

Show quote
"Shwu" <shwu@nospam.net> wrote in message
news:eKnPzrzFIHA.3848@TK2MSFTNGP05.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
>
Author
28 Oct 2007 5:20 PM
Rob
"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
Author
30 Oct 2007 2:33 PM
Shwu
Thank you, Rob. You are right. The problem is related to the comctl32
version.

Shangwu

Show quote
"Rob" <R**@discussions.microsoft.com> wrote in message
news:2EC83CD5-7AA5-44B9-8720-2850BBE7B01E@microsoft.com...
> "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

AddThis Social Bookmark Button