Expression >
Forums Home
>
Related Technologies Forums
>
Windows Presentation Foundation (WPF)
>
WPF EXE
WPF EXE
- Hi
If i run the WPF application i got of lot of sub windows opened.. i need to set only one.. pls suggest me. previously i did notmla windows application.. now i forgot it, pls suggest me.
All Replies
- Sorry, you will need to be more specific than that. We're not telepathic ;-)Turn on the debugger, put a breakpoint on the InitializeComponent method of one of the sub windows and use the Call Stack pane of visual studio to see where the constructor was called from. You should be able to work your way back to the source of the problem.If this doesn't work than please post some code we can look at :-)hth,Marcel
http://dutchmarcel.wordpress.com/ - Hi
Thanks for your reply.
what my problem is.. once i build the setup. it's working.. but i click the another windows another window opened. how to i chnage the code here in programs.cs page.
Now you suggest me.
Thanks
Ram - Sorry, I'm still not sure if I understand your question.This is a WPF forum and in WPF there is no program.cs.So I assume you are talking about a .NET 2 (WinForms) program? If yes, then this is what is inside program.cs by default:
static class Program { /// <summary> /// The main entry point for the application. /// </summary> [STAThread] static void Main() { Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Application.Run(new Form1()); } }
hth,Marcel
http://dutchmarcel.wordpress.com/ - Hi
I know abt windows application.. right now i am taking abt xaml application. now pls suggest me... - Hrm, perhaps tryWindow window = new Window();window.ShowDialog();instead ofWindow window = new Window();window.Show();
- Hello Rammohan,
About the WPF Window.
You can start from:
- WPF Windows Overview
http://msdn.microsoft.com/en-us/library/ms743714.aspx
Thanks.
Please mark the replies as answers if they help and unmark them if they provide no help - WPF Windows Overview
- Hi Ram,
I'm assuming you meant:
When your program is running, you don't want the user to be able to start *another* instance of your program.
Is this correct?
If it is, here're some links that will help you:
http://msdn.microsoft.com/en-us/library/ms771662.aspx
http://yogesh.jagotagroup.com/blog/post/2008/07/03/Ways-of-making-a-WPF-application-Single-Instance.aspx

