Home All Groups Group Topic Archive Search About

Can I create controls with static ID's?

Author
5 Oct 2006 2:12 PM
Terry Olsen
I need to create an app that has static ID's for the buttons & other
controls on the main form. Is there a way to accomplish this in VB?



*** Sent via Developersdex http://www.developersdex.com ***

Author
5 Oct 2006 10:27 PM
Herfried K. Wagner [MVP]
"Terry Olsen" <tolse***@hotmail.com> schrieb:
>I need to create an app that has static ID's for the buttons & other
> controls on the main form. Is there a way to accomplish this in VB?

Which identifiers are you referring to?

--
M S   Herfried K. Wagner
M V P  <URL:http://dotnet.mvps.org/>
V B   <URL:http://dotnet.mvps.org/dotnet/faqs/>
Author
6 Oct 2006 6:09 PM
Terry Olsen
The ControlID that is a hexidecimal number that you can use to interact with
the control from another application.  We are doing this at work with a
piece of software designed to intercept button presses, print commands, read
& write data to textboxes. The software that we are controlling externally
never changes its ControlIDs. For example, the ControlID of the main process
button is always 0000ECD2 every time we run the program.

I need to interface with an application that I'm writing in VB the same way,
but every time I run the program, the ControlIDs are different. So it's
impossible to interface with the app if the ControlID's are not static.

An example of a ControlID is in this screenshot:
http://www.softpedia.com/screenshots//WinID_1.png   It is in the middle of
the screen at the top. It is "ID: 0x0"


Show quoteHide quote
"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
news:ObSI01M6GHA.4608@TK2MSFTNGP03.phx.gbl...
> "Terry Olsen" <tolse***@hotmail.com> schrieb:
>>I need to create an app that has static ID's for the buttons & other
>> controls on the main form. Is there a way to accomplish this in VB?
>
> Which identifiers are you referring to?
>
> --
> M S   Herfried K. Wagner
> M V P  <URL:http://dotnet.mvps.org/>
> V B   <URL:http://dotnet.mvps.org/dotnet/faqs/>
Author
6 Oct 2006 6:45 PM
rowe_newsgroups
Why not subclass the controls and add your own property?

Thanks,

Seth Rowe


Terry Olsen wrote:
Show quoteHide quote
> The ControlID that is a hexidecimal number that you can use to interact with
> the control from another application.  We are doing this at work with a
> piece of software designed to intercept button presses, print commands, read
> & write data to textboxes. The software that we are controlling externally
> never changes its ControlIDs. For example, the ControlID of the main process
> button is always 0000ECD2 every time we run the program.
>
> I need to interface with an application that I'm writing in VB the same way,
> but every time I run the program, the ControlIDs are different. So it's
> impossible to interface with the app if the ControlID's are not static.
>
> An example of a ControlID is in this screenshot:
> http://www.softpedia.com/screenshots//WinID_1.png   It is in the middle of
> the screen at the top. It is "ID: 0x0"
>
>
> "Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
> news:ObSI01M6GHA.4608@TK2MSFTNGP03.phx.gbl...
> > "Terry Olsen" <tolse***@hotmail.com> schrieb:
> >>I need to create an app that has static ID's for the buttons & other
> >> controls on the main form. Is there a way to accomplish this in VB?
> >
> > Which identifiers are you referring to?
> >
> > --
> > M S   Herfried K. Wagner
> > M V P  <URL:http://dotnet.mvps.org/>
> > V B   <URL:http://dotnet.mvps.org/dotnet/faqs/>
Author
6 Oct 2006 3:57 AM
Cor Ligthert [MVP]
Terry,

I am curious what you mean with your question? To be honnest, I don't
understand it.

:-)

Cor

Show quoteHide quote
"Terry Olsen" <tolse***@hotmail.com> schreef in bericht
news:en38bhI6GHA.3644@TK2MSFTNGP03.phx.gbl...
>I need to create an app that has static ID's for the buttons & other
> controls on the main form. Is there a way to accomplish this in VB?
>
>
>
> *** Sent via Developersdex http://www.developersdex.com ***