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

How standard control class names are generated in VS2005

Hi all,

How the class name for windows standard controls(Ex:Button) are generated
in VS2005?
InVS 2005, I have created one button conrol and compiled. I got a class name
as given below:

"WindowsForms10.BUTTON.app.0.14fd2b5"

The last portion of the above class string "app.0.14fd2b5" is keep changing
for each applications.
Can any one clarify me that How it is getting changed? IS there any way to
get a fixed string?

Also in VS2003, the class name for the abov control is
""WindowsForms10.BUTTON.app3"
Now ,the class format got changed in VS2005. Why it is so?

Please can any one help me to understand the logic behind.

Thanks,
Mohan

May 18 '06 #1
4 1408
Can any one clarify me that How it is getting changed? IS there any way to
get a fixed string?


Winforms registers a window superclass with a slightly mangled name
for every native window class you use. The name differs between
appdomains because they are supposed to be isolated.
Mattias

--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
May 18 '06 #2
Thanks for your clarification Mattias. Still I have some more questions.
Why this class name (format) is changed from VS2003? Will it be changed for
compiling application on each time? For some applications,in VS2003, the
class name is not changed for each build. Particularly the last portion of
the class string("app3").

I am using some WIN32 APIs in my projecty for idendifying some controls.
For that I will have to pass class name as one of the parameter. I would like
that the method should be generic for both VS2003 and VS2005. For each
version ,I dont want to change the class name. Is there any generic way to
handle this issue?
--
Mohan
"Mattias Sjögren" wrote:
Can any one clarify me that How it is getting changed? IS there any way to
get a fixed string?


Winforms registers a window superclass with a slightly mangled name
for every native window class you use. The name differs between
appdomains because they are supposed to be isolated.
Mattias

--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.

May 19 '06 #3
Why this class name (format) is changed from VS2003? Will it be changed for
compiling application on each time? For some applications,in VS2003, the
class name is not changed for each build.
The class name isn't set at compile time, and VS has nothingto do with
it. The Windows Forms assembly handles the naming at runtime.

I don't know why it changed. But I consider it to be an implementation
detail that I shouldn't care about or rely on.

I am using some WIN32 APIs in my projecty for idendifying some controls.
For that I will have to pass class name as one of the parameter. I would like
that the method should be generic for both VS2003 and VS2005. For each
version ,I dont want to change the class name. Is there any generic way to
handle this issue?


Can't you look up the class name from the window handle (with the
GetClassName function)?
Mattias

--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.
May 19 '06 #4
Thanks again. I am trying to identify the controls in some third party
applications by using the control name and class name. To get the handle of
the control, I am using Classname as one parameter to make sure the
appropriate controls.
Because some of the controls wont be having unique name in some
applications.
For eample in some applications Edit and push button will be having the same
name. Unless I use class name ,I cannot get the handle of the appropriate
controls.

--
Mohan
"Mattias Sjögren" wrote:
Why this class name (format) is changed from VS2003? Will it be changed for
compiling application on each time? For some applications,in VS2003, the
class name is not changed for each build.


The class name isn't set at compile time, and VS has nothingto do with
it. The Windows Forms assembly handles the naming at runtime.

I don't know why it changed. But I consider it to be an implementation
detail that I shouldn't care about or rely on.

I am using some WIN32 APIs in my projecty for idendifying some controls.
For that I will have to pass class name as one of the parameter. I would like
that the method should be generic for both VS2003 and VS2005. For each
version ,I dont want to change the class name. Is there any generic way to
handle this issue?


Can't you look up the class name from the window handle (with the
GetClassName function)?
Mattias

--
Mattias Sjögren [C# MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.

May 19 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Christopher Young | last post by:
I have several user controls on a page and I am trying to get information out of them. The postback is being caused on the aspx page and not in the user control. I have tried using a property but...
5
by: Laurence | last post by:
I want to get the column name of a datagrid control. But DataGrid.Columns always return a collection of count 0. Thanks for your help in advance.
6
by: Mike | last post by:
I'm using VS2005 beta 2. (1) It looks like "foreach" is looking for an IEnumerable only, and not an IEnumerator. That means that class I use in the interation has to have GetEnumerator(),...
6
by: n33470 | last post by:
Hi all, We have a user control that contains a DropDownList. This user control appears on a web page. Suppose the name of the userControl on the web page is called "ucLookup". Suppose the...
1
by: Urs | last post by:
Hi the user control below renders OK when added in the designer. Why does it NOT render when added programmatically? Do I have to instruct the control somehow to render, or do I miss something?...
3
by: Tim_Mac | last post by:
hi, i'm using a web application project in VS2005. i have a User Control Template.ascx in the '~/UserControls' folder with the following signature: public partial class GpTemplate :...
0
by: Miha | last post by:
I wrote a simple Windows Application based application in C# called the CallWebServiceGui. This application is started from a different application called WsGuiStarter. The WsGuiStarter redirects...
9
by: Mark Olbert | last post by:
I'm trying to serialize (using XmlSerializer.Serialize) a class that I generated from an XSD schema using XSD.EXE /c. The problem I'm running into is that the root element needs to be unqualified,...
3
by: Claes Wedin | last post by:
I'm doing a Component class that inherits from DataGridView. One thing that it does is to add a default column in the grid. I put the code for this in the class and when I drag the control to my...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.