 |
|
 |
Still I want to use your tool. Can you please change the tool for .NET 2.1 and publish it?
Thanks,
Mohan
|
|
|
|
 |
|
 |
When using the tool compiled in VS2003 and trying to view application that have been compiled in VS2005 it fails to find the windows.
I've tried to compile the code in VS2005 but it fails to with the following error message.
Error 1 Command line error D8016 : '/MT' and '/clr:oldsyntax' command-line options are incompatible cl
|
|
|
|
 |
|
 |
Yes, In .NET 2.0 the windows forms class names are different. I will update the article. There are few other changes.
My Blog
|
|
|
|
 |
|
 |
Thanks for the quick response, could you please let me know when the article and source code will be available.
Thanks
|
|
|
|
 |
|
 |
I am also getting the same error
Error 1 Command line error D8016 : '/MT' and '/clr:oldsyntax' command-line options are incompatible cl
Also when I try to call these dlls from other project(VB.Net) ,Iam getting the following error.
"Managed Debugging Assistant 'LoaderLock' has detected a problem in 'F:\VBSource\bin\Debug\Project1.exe'.
Additional Information: DLL 'F:\VBSource\bin\Debug\spyhook.dll' is attempting managed execution inside OS Loader lock. Do not attempt to run managed code inside a DllMain or image initialization function since doing so can cause the application to hang."
But it was working fine for VS2003.
Can you please give me the solution.
Thanks,
Mohan
|
|
|
|
 |
|
 |
Very impressive!!!!!!!
Super, GREAT!!!!
Flauzer!!!
|
|
|
|
 |
|
 |
I am really impressed with this excellent program.
One question: Is there really any problem with a different .NET version?
> The included wfspy works only for .NET windows 1.0.3705.
> If you want the tool to work with .NET 1.1, please build the code using VS.NET 2003.
I have tried it without rebuild but can't notice any problem. It is working fine.
> If you use wfspy to view a window in an application that uses a different .NET version, strange results may occur.
I have aloso tried this case but can't notice any problem.
I have used wfspy built by VS.NET 2003 to view a window in an application that was built by VS.NET 2005 beta2.
It is working fine.
Can anyone help me?
Thanks,
YamaK
|
|
|
|
 |
|
 |
Hello all,
I have tried to compile and run in release mode. It is not working . it is working fine only with Debug mode. I am using .Net2003.
Can any one please solve this issues?
Thanks,
Mohan
|
|
|
|
 |
|
 |
It's probably a linking problem. When I first converted and compiled it I had the same problem.
LINK : warning LNK4243: DLL containing objects compiled with /clr is not linked with /NOENTRY; image may not run correctly
I haven't really looked at the code yet but it looks like a dll is not linked properly so the exe will only run if it resides in the same folder as the dll.
|
|
|
|
 |
|
 |
is there any way I could find the handle of unmanaged window like a dialog window(this dialog window has a parent,now I want to retrieve the handle of the child window through enumarating)
I cant do it.
can anyone help me?
|
|
|
|
 |
|
 |
This is a really handy tool (you got my 5). I'd like to make a suggestion.
One of the best features of Spy++ is the find window tool that allow you to drag the mouse around the screen to find a particular window.
A feature like that for this tool would be nice addition. I've slapped together quick piece of code that could be a start.
After adding a picture box to the MainForm add the following code (and appropriate event handler assignments) to the MainForm class:
private bool m_HasCapture = false;
private void pictureBox1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e)
{
if ( !m_HasCapture )
{
SetCapture(this.Handle);
m_HasCapture = true;
Cursor.Current = Cursors.Cross;
}
}
[DllImport("user32.dll")]
static extern IntPtr SetCapture( IntPtr hWnd );
[DllImport("user32.dll")]
static extern bool ReleaseCapture();
[DllImport("user32.dll")]
static extern IntPtr WindowFromPoint( Point pt );
private void pictureBox1_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)
{
if ( m_HasCapture )
{
ReleaseCapture();
m_HasCapture= false;
}
}
private void MainForm_MouseMove(object sender, System.Windows.Forms.MouseEventArgs e)
{
if ( m_HasCapture )
System.Diagnostics.Trace.WriteLine( string.Format( "{0}, {1}", Control.MousePosition.X, Control.MousePosition.Y ) );
}
private void MainForm_MouseUp(object sender, System.Windows.Forms.MouseEventArgs e)
{
if ( m_HasCapture )
{
System.Diagnostics.Trace.WriteLine( string.Format( "{0}, {1}", Control.MousePosition.X, Control.MousePosition.Y ) );
ReleaseCapture();
m_HasCapture= false;
Point pt = new Point( Control.MousePosition.X, Control.MousePosition.Y );
IntPtr hWnd = WindowFromPoint( pt );
if ( hWnd != IntPtr.Zero && Control.FromChildHandle( hWnd ) == null )
{
WindowPropertiesForm propForm = new WindowPropertiesForm();
propForm.TargetWindowHandle = hWnd;
FormSizeSaver saver = new FormSizeSaver(propForm);
propForm.ShowDialog();
}
}
}
|
|
|
|
 |
|
 |
Mr.Don,
thanks for your suggestion. I have tried your suggestion. It is working fine with debug mode. For some reason, it is not working with Release mopde.
Do you have any idea or suggestion on this?
Thanks
Mohan
|
|
|
|
 |
|
 |
Hmmm. My version works fine in release mode.
The code I posted above was whipped togehter pretty quickly more for demonstration purposes than anything.
Send me an email ( dkackman_2000 at yahoo dot com ) and I can send you my modified version of this project.
|
|
|
|
 |
|
 |
It it possible for all open window ?
|
|
|
|
 |
|
 |
not a very smart question there... the article specifically says it works for managed windows only.
ROFLOLMFAO
|
|
|
|
 |
|
 |
Great Article.
How could we get the Control Name also in the detail dialog?
Thanks,
Olivier
|
|
|
|
 |
|
 |
I came across this rather late but to get the ControlName, all you need to do is add the following property to the WindowProperties class:
[Category("Type")]
public string ControlName
{
get
{
return targetControl.Name ;
}
}
Thanks, Neelesh
|
|
|
|
 |
|
 |
Hi,
I'm not really using .NET yet, but I'm following the projects that come up here on CP. When I saw this one, I immediastely wondered whether this technique could be used to allow Jabes' ControlInspector to monitor events in other processes:
http://www.codeproject.com/csharp/controlinspector.asp
What do you think?
Swythan
|
|
|
|
 |
|
 |
I haven't had a chance to look at this article in any depth just yet, but I wouldn't have any problem with Rama taking the event capturing code from controlinspector to integrate with this project.
If there's anything I can do to help, Rama - just send me an email!
Best wishes
James
|
|
|
|
 |
|
 |
Looks like it can be done. I will update the article as soon as I finish it.
I don't choose the targets - they present themselves to me in an almost garish display of submission and sacrifice. It's my duty to react as I do. - John Simmons/Outlaw Programmer
|
|
|
|
 |
|
 |
Got my 5
Cheers,
Stoyan
ASCII stupid question, get a stupid ANSI
|
|
|
|
 |
|
|
 |
|
 |
Few Suggestions:
1. Right click option on the tree control (for Properties)
2. How about merging the properties window into the main window. Make the 'Legend' stuff as modeless dialog.
BTW, you got my 5.
"Whidbey"..."Orcas"...Roadmap This signature was created by "Code Project Quoter".
|
|
|
|
 |
|
 |
Kant wrote:
How about merging the properties window into the main window. Make the 'Legend' stuff as modeless dialog.
Well the properties window belongs to another process so each time you change selection dll has to be injected in the target process. I prefered to show it in another window to keep things simple
I don't choose the targets - they present themselves to me in an almost garish display of submission and sacrifice. It's my duty to react as I do. - John Simmons/Outlaw Programmer
|
|
|
|
 |
|
 |
Rama Krishna wrote:
Well the properties window belongs to another process so each time you change selection dll has to be injected in the target process.
I should have checked the code first.
"Whidbey"..."Orcas"...Roadmap This signature was created by "Code Project Quoter".
|
|
|
|
 |