From: Henning on

"Dee Earley" <dee.earley(a)icode.co.uk> skrev i meddelandet
news:e0bEkS8rKHA.4428(a)TK2MSFTNGP04.phx.gbl...
> On 16/02/2010 21:47, Henning wrote:
>> Hi,
>>
>> If I have an app where I created 8 different User Controls, they are only
>> added when running, are they "compiled in" in the exe? Do I need to use a
>> hidden Form with one each on that Form, to get them auto-included? Tried
>> to
>> read and understand, but no...
>
> I expect you are getting an error along the lines of:
>> 'Project.UserControl' cannot be added because it is referenced but
>> not in use by any items in the project. To correct this, uncheck
>> 'Remove information about unused ActiveX Controls' in Project
>> Options.
>
> If so, then it gives you the answer in the error message :)
> (Or put them on a form, but the tickbox is cleaner)
>
> --
> Dee Earley (dee.earley(a)icode.co.uk)
> i-Catcher Development Team
>
> iCode Systems

Good to be mentioned for someone else reading the post.

That was the initial error, solved by unticking the box. It was also what
made me uncertain if they were compiled into the exe or not.

/Henning


From: Dee Earley on
On 17/02/2010 12:18, Henning wrote:
> "Dee Earley"<dee.earley(a)icode.co.uk> skrev i meddelandet
> news:e0bEkS8rKHA.4428(a)TK2MSFTNGP04.phx.gbl...
>> On 16/02/2010 21:47, Henning wrote:
>>> Hi,
>>>
>>> If I have an app where I created 8 different User Controls, they are only
>>> added when running, are they "compiled in" in the exe? Do I need to use a
>>> hidden Form with one each on that Form, to get them auto-included? Tried
>>> to
>>> read and understand, but no...
>>
>> I expect you are getting an error along the lines of:
>>> 'Project.UserControl' cannot be added because it is referenced but
>>> not in use by any items in the project. To correct this, uncheck
>>> 'Remove information about unused ActiveX Controls' in Project
>>> Options.
>>
>> If so, then it gives you the answer in the error message :)
>> (Or put them on a form, but the tickbox is cleaner)
>
> That was the initial error, solved by unticking the box. It was also what
> made me uncertain if they were compiled into the exe or not.

To summarise...

Everything in one project is included in the same exe/dll file.
Normally, unused components (not modules/functions) are "removed if
unused" with no way accessing them :)

--
Dee Earley (dee.earley(a)icode.co.uk)
i-Catcher Development Team

iCode Systems
From: Nobody on
"Henning" <computer_hero(a)coldmail.com> wrote in message
news:eoAHQt8rKHA.3536(a)TK2MSFTNGP06.phx.gbl...
>
> "Dee Earley" <dee.earley(a)icode.co.uk> skrev i meddelandet
> news:e0bEkS8rKHA.4428(a)TK2MSFTNGP04.phx.gbl...
>> On 16/02/2010 21:47, Henning wrote:
>>> Hi,
>>>
>>> If I have an app where I created 8 different User Controls, they are
>>> only
>>> added when running, are they "compiled in" in the exe? Do I need to use
>>> a
>>> hidden Form with one each on that Form, to get them auto-included? Tried
>>> to
>>> read and understand, but no...
>>
>> I expect you are getting an error along the lines of:
>>> 'Project.UserControl' cannot be added because it is referenced but
>>> not in use by any items in the project. To correct this, uncheck
>>> 'Remove information about unused ActiveX Controls' in Project
>>> Options.
>>
>> If so, then it gives you the answer in the error message :)
>> (Or put them on a form, but the tickbox is cleaner)
>>
>> --
>> Dee Earley (dee.earley(a)icode.co.uk)
>> i-Catcher Development Team
>>
>> iCode Systems
>
> Good to be mentioned for someone else reading the post.
>
> That was the initial error, solved by unticking the box. It was also what
> made me uncertain if they were compiled into the exe or not.

That check box has no effect on UserControls that are part of the project.
It only effects ActiveX controls that you choose from Project-->Components.
I just tested with a new Standard EXE, and adding a single empty UserControl
without placing it on any form. I can see "UserControl1" in both cases when
searching the EXE with a hex editor.


From: Dee Earley on
On 17/02/2010 16:02, Nobody wrote:
> "Henning"<computer_hero(a)coldmail.com> wrote in message
> news:eoAHQt8rKHA.3536(a)TK2MSFTNGP06.phx.gbl...
>> "Dee Earley"<dee.earley(a)icode.co.uk> skrev i meddelandet
>> news:e0bEkS8rKHA.4428(a)TK2MSFTNGP04.phx.gbl...
>>> On 16/02/2010 21:47, Henning wrote:
>>>> Hi,
>>>>
>>>> If I have an app where I created 8 different User Controls,
>>>> they are only added when running, are they "compiled in" in the
>>>> exe? Do I need to use a hidden Form with one each on that Form,
>>>> to get them auto-included?
>>>
>>> I expect you are getting an error along the lines of:
>>>> 'Project.UserControl' cannot be added because it is referenced but
>>>> not in use by any items in the project. To correct this, uncheck
>>>> 'Remove information about unused ActiveX Controls' in Project
>>>> Options.
>>
>> That was the initial error, solved by unticking the box. It was also what
>> made me uncertain if they were compiled into the exe or not.
>
> That check box has no effect on UserControls that are part of the project.
> It only effects ActiveX controls that you choose from Project-->Components.
> I just tested with a new Standard EXE, and adding a single empty UserControl
> without placing it on any form. I can see "UserControl1" in both cases when
> searching the EXE with a hex editor.

Yes it does, as stated by the error message I received and quoted.
With that option unticked, you can not add it to a form dynamically with
controls.add().
I don't know why it has the name in the binary though.

--
Dee Earley (dee.earley(a)icode.co.uk)
i-Catcher Development Team

iCode Systems
From: Henning on

"Dee Earley" <dee.earley(a)icode.co.uk> skrev i meddelandet
news:ei2RXF$rKHA.2016(a)TK2MSFTNGP05.phx.gbl...
> On 17/02/2010 16:02, Nobody wrote:
>> "Henning"<computer_hero(a)coldmail.com> wrote in message
>> news:eoAHQt8rKHA.3536(a)TK2MSFTNGP06.phx.gbl...
>>> "Dee Earley"<dee.earley(a)icode.co.uk> skrev i meddelandet
>>> news:e0bEkS8rKHA.4428(a)TK2MSFTNGP04.phx.gbl...
>>>> On 16/02/2010 21:47, Henning wrote:
>>>>> Hi,
>>>>>
>>>>> If I have an app where I created 8 different User Controls,
>>>>> they are only added when running, are they "compiled in" in the
>>>>> exe? Do I need to use a hidden Form with one each on that Form,
>>>>> to get them auto-included?
>>>>
>>>> I expect you are getting an error along the lines of:
>>>>> 'Project.UserControl' cannot be added because it is referenced but
>>>>> not in use by any items in the project. To correct this, uncheck
>>>>> 'Remove information about unused ActiveX Controls' in Project
>>>>> Options.
>>>
>>> That was the initial error, solved by unticking the box. It was also
>>> what
>>> made me uncertain if they were compiled into the exe or not.
>>
>> That check box has no effect on UserControls that are part of the
>> project.
>> It only effects ActiveX controls that you choose from
>> Project-->Components.
>> I just tested with a new Standard EXE, and adding a single empty
>> UserControl
>> without placing it on any form. I can see "UserControl1" in both cases
>> when
>> searching the EXE with a hex editor.
>
> Yes it does, as stated by the error message I received and quoted.
> With that option unticked, you can not add it to a form dynamically with
> controls.add().
> I don't know why it has the name in the binary though.
>
> --
> Dee Earley (dee.earley(a)icode.co.uk)
> i-Catcher Development Team
>
> iCode Systems

I did post twice, but not visible here, the second post is visible on
google!?

http://groups.google.se/group/microsoft.public.vb.general.discussion/browse_frm/thread/f7bde87d75034f4f?hl=sv#

What is happening?

/Henning


First  |  Prev  | 
Pages: 1 2
Prev: Alternate Color Dialog
Next: LockWindowUpdate