469,631 Members | 1,743 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,631 developers. It's quick & easy.

VB.Net Macro - ShowDialog

I have a class which inherits Form and would like it to display modally from
a macro. I want it to stay in front of the .Net IDE until the user presses
Ok and would like the IDE to be locked from user-interaction until the form
has been closed. I can get the form to be displayed, using
Form.Show/Form.ShowDialog and I can get the .Net IDE to be locked using
Form.ShowDialog. I can also get the form to be on top of the .Net IDE...but
the problem is, when I set the property of the form to be TopMost it is on
top of ALL applications and not just the .Net IDE.

What I do is, in the macro being called, I get the main form of the .Net
IDE's handle (Process.GetProcessesByName("devenve")) (loop through to find
the right window's text/caption) and create a IWin32Wrapper class using the
Process.MainWindowHandle (i think). Then I can pass this IWin32Wrapper to
the form's ShowDialog method. The problem, once again, is the window is on
top of all other applications, and not just the .Net IDE I want it to be on

Can anyone shed some light on how I can do this successfully?

What I'm doing is trying to get this macro (yes, macro, don't want an addin)
to display a prompt and the user selects some custom data from the dialog,
then use this data to automatically enter some code (comments and stuff).

Anywho, thanks in advance :)

Nov 21 '05 #1
0 1343

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Richard L Rosenheim | last post: by
2 posts views Thread by Bill Burris | last post: by
4 posts views Thread by Dennis Sjogren | last post: by
reply views Thread by Mythran | last post: by
1 post views Thread by No Sheds | last post: by
4 posts views Thread by trialproduct2004 | last post: by
3 posts views Thread by interuser | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.