Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 7th, 2008, 01:44 PM
Registered User
 
Join Date: Mar 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Why TopMost make form at The top of all applicatio

Hi Guys,

I have two forms. One is main form from where i am calling a progress bar form. I set progress bar TopMost Property True because i want to show progress bar at top.

I am calling progress bar as independent thread. It show progress bar at the Top of All Applications. But i just want to show the Progress bar only at the top of my application.

Here is my code

   thread= new Thread(new ThreadStart(ShowProgressDialog));
   thread.IsBackground = true;
   thread.Start();

private void ShowProgressDialog()
        {

             progress = new ProgressBarForm();
             startTime = DateTime.Now.ToLongTimeString();
             this.startTimeLbl.Text = startTime;
             ProgressBarForm.startTime ="Start Time: "+ startTime;
   progress.TopMost = true;
             progress.ShowDialog(this);


        }


I am using .Net 1.1. I tried to set TopMost property of Progress bar before calling ShowDialog(this) but it also does not work.


Any suggession please.

Best regards

 
Old March 7th, 2008, 03:47 PM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

Have you tried either not setting TopMost to true, or not using ShowDialog(), just Show().

/- Sam Judson : Wrox Technical Editor -/





Similar Threads
Thread Thread Starter Forum Replies Last Post
Child form is not showing on the top shweta14 BOOK: Professional C#, 2nd and 3rd Editions 1 January 31st, 2007 06:31 AM
Child form is not showing on the top shweta14 C# 0 November 10th, 2006 02:48 AM
VBA w/ Word 2000 - Make form on top of everything mvick VB How-To 10 October 2nd, 2006 09:28 AM
TopMost Property shadowpug VB.NET 2002/2003 Basics 0 September 27th, 2004 09:53 AM
Form TopMost property shadowpug VB.NET 2002/2003 Basics 1 September 3rd, 2003 11:39 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.