Re: Customizing Windows with C#
From: Stoitcho Goutsev \(100\) [C# MVP] (100_at_100.com)
Date: 10/27/04
- Next message: Cletus Van Damme: "Re: Source control"
- Previous message: Daniel: "for listbox is there anyway to get the event of a mouse over a particular list item? e.g. to display a bubble that shows the item incase the text is long and cut off by the text box?"
- In reply to: Nicholas Paldino [.NET/C# MVP]: "Re: Customizing Windows with C#"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 27 Oct 2004 19:32:01 -0400
Hi,
IMHO even in cpp and native programing this is done via hooks there is no
other way around
Take a look at this MSDN Magazine article it can be a good start.
Anyways, I doubt it can be done from pure managed code. Global windows
hooks except 2 of them can not be writen in managed code. The hooks that
might help you in this are not among supported ones. What you can do is to
customize only dialog boxes open from your process.
Otherwise the solution that will work is to write the hook in native code
and put the code in DLL then using PInvoke you can use it.
-- HTH Stoitcho Goutsev (100) [C# MVP] "Nicholas Paldino [.NET/C# MVP]" <mvp@spam.guard.caspershouse.com> wrote in message news:%23HT8bLEvEHA.2016@TK2MSFTNGP15.phx.gbl... > Tamir, > > Yes, I would think it is. You would have to do some heavy API work > though. > > Generally speaking, you might just want to set up a system wide hook, > and handle the WM_CREATE message. Then, you would change the properties > of the window as it is created. > > Of course, this will cause a perf hit (system wide hooks usually do), > and there are some caveats with creating a system wide hook. > > Check out codeproject.com and look for System Hook. There should be an > article there on how to do it in .NET (I was looking at it yesterday, so I > am pretty sure it is there). > > > -- > - Nicholas Paldino [.NET/C# MVP] > - mvp@spam.guard.caspershouse.com > > "Tamir Khason" <tamir-NOSPAM@tcon-NOSPAM.co.il> wrote in message > news:OxJUjJEvEHA.1308@TK2MSFTNGP09.phx.gbl... >> Thank you for response, but the question is "How to change ALL e.g dialog >> boxes in current Windows installation, not just in my project". This >> means that I have to handle each Dialog base class invoked by OS. Is it >> possible? >> >> -- >> Tamir Khason >> You want dot.NET? Just ask: >> "Please, www.dotnet.us " >> >> "Nicholas Paldino [.NET/C# MVP]" <mvp@spam.guard.caspershouse.com> wrote >> in message news:uKas6BEvEHA.3728@TK2MSFTNGP12.phx.gbl... >>> Tamir, >>> >>> Yes, it is. The Handle property on the Form class (or Control class) >>> gives you access to the Windows handle, which you can pass to any API >>> method you wish that accepts it. >>> >>> However, I would make sure that there isn't something in the >>> framework that doesn't already provide the functionality you need. >>> Check out the article on MSDN titled "Microsoft Win32 to Microsoft .NET >>> Framework API Map", located at (watch for line wrap): >>> >>> http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dndotnet/html/win32map.asp >>> >>> It will show you the functionality that .NET provides as it relates >>> to Win32 API functions. >>> >>> Hope this helps. >>> >>> >>> -- >>> - Nicholas Paldino [.NET/C# MVP] >>> - mvp@spam.guard.caspershouse.com >>> >>> "Tamir Khason" <tamir-NOSPAM@tcon-NOSPAM.co.il> wrote in message >>> news:%23aSnclDvEHA.1452@TK2MSFTNGP11.phx.gbl... >>>> Is it possible? or just my fantasy? >>>> I did it before with cpp. Handle and change base classes such as >>>> dialogs, windows etc. >>>> Is it possible to do with C#? Someone knows good reference to such kind >>>> of programming? >>>> >>>> TNX >>>> >>>> -- >>>> Tamir Khason >>>> You want dot.NET? Just ask: >>>> "Please, www.dotnet.us " >>>> >>>> >>> >>> >> >> > >
- Next message: Cletus Van Damme: "Re: Source control"
- Previous message: Daniel: "for listbox is there anyway to get the event of a mouse over a particular list item? e.g. to display a bubble that shows the item incase the text is long and cut off by the text box?"
- In reply to: Nicholas Paldino [.NET/C# MVP]: "Re: Customizing Windows with C#"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|