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

How to get the Class name of a window ?

Hi friends

How i can get the class name of a window..
My requirment is , I have MDI form that contains many controls..I want to
know the class of each controls in that form at runtime ?

any methods ?

Thanks in advance
Krishnan
Nov 16 '05 #1
3 5141
One option is to use the Win32 API GetClassName(), using PInvoke, on each of
those child controls.

"krishnadevan" <kd*****@hotmail.com> wrote in message
news:Ox**************@tk2msftngp13.phx.gbl...
Hi friends

How i can get the class name of a window..
My requirment is , I have MDI form that contains many controls..I want to
know the class of each controls in that form at runtime ?

any methods ?

Thanks in advance
Krishnan

Nov 16 '05 #2
I get it..
Ex:
Control c;
c.ToString(); Gave the class name(like System.Windows.Forms.TextBox) to me..
Regards
Krishnan
"krishnadevan" <kd*****@hotmail.com> wrote in message
news:Ox**************@tk2msftngp13.phx.gbl...
Hi friends

How i can get the class name of a window..
My requirment is , I have MDI form that contains many controls..I want to
know the class of each controls in that form at runtime ?

any methods ?

Thanks in advance
Krishnan

Nov 16 '05 #3
krishnadevan <kd*****@hotmail.com> wrote:
I get it..
Ex:
Control c;
c.ToString(); Gave the class name(like System.Windows.Forms.TextBox) to me..


It's not guaranteed to though. Use GetType() instead to get the type
reliably.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Nov 16 '05 #4

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

Similar topics

11
by: VK | last post by:
Hi, all! In my programm i have to insert a variable from class 2 to class 1 and I get error NameError: global name 'd' is not defined. How do I get access to d.entry.insert() method of class 1 ...
1
by: agrsaurabh | last post by:
Hello Everybody, I have created an AVI Player using DirectShow. This player is working fine. I have also created a View Window (with class name CViewWnd) using CFrameWnd class. This view...
3
by: rockoyster | last post by:
Not sure if this is entirely a CSS issue but I have defined the class below in CSS. If I am stretching the friendship then I apologise in advance. I am trying to write a javascript script to...
10
by: Sunny | last post by:
Hi, I have an old problem which I couldn't solve so far. Now I have found a post in that group that gave me an idea, but I can not fully understand it. The problem is: I'm trying to use a...
1
by: Ram Baruch | last post by:
Hi, Is it possible to set the class of the window of my application (So when I'm using spy++ and I select this window I'll get this name)? Regards, Ram.
3
by: GTi | last post by:
In win32 I define my window class with wcex.lpszClassName = "My.Window.App.Class"; RegisterClassEx(&wcex); But I can't find anything similar in C#, in fact the class for my application is...
3
by: Richard | last post by:
I have a requirement to put a GDI style circle or rectangle border around the selected row of a datagrid/ It will overlap into the row above and below the selected row. Doing this in a the OnPaint...
4
by: bmwrob | last post by:
In VC 6.0 I could easily add a function to handle a system message e.g. WM_TIMER. But it seems that is not possible in .NET or? Any ideas on how to do it without manually add the code? BR /// Rob
4
by: MohanDasGandhi | last post by:
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: ...
49
by: Ben Voigt [C++ MVP] | last post by:
I'm trying to construct a compelling example of the need for a language feature, with full support for generics, to introduce all static members and nested classes of another type into the current...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.