Richard Smith wrote: Does anyone have any hints as how to implement a progress bar for a status panel?
I think you can host controls inside a statusbar panel. But it would probably be better to do a custom statusbar...
Typically a StatusBar control consists of StatusBarPanel objects, each of which displays text and/or an icon. You can also provide owner-drawn panels to provide custom panels such as a progress bar or a series of images that displays the state of your application.
The default StatusBar has no panels. To add panels to a StatusBar you can use the Add method of the StatusBar.StatusBarPanelCollection class that is accessible through the Panels property of the control. You can also use the StatusBar.StatusBarPanelCollection object provided through the Panels property to remove panels from the control and access a specific StatusBarPanel object to manipulate the panel.
Now just add the progress bar to the panel
Before you criticize a man, walk a mile in his shoes. That way, when you do criticize him, you'll be a mile away and have his shoes.
Basically, you can put the progressbar control on the status bar on the design
But, as you know, this progressbar parent is the Form.
So, if we change the size of the form, we also have to change the location
of the progress bar.
After we get Top and Left of the status bar, we easily update the location
of the progress bar.
(However, I didn't check the functionality of the progress bar.)
Please, don't send me your email about your questions directly.
Have a nice day!
Sonork - 100.10571:vcdeveloper
You might consider what Masaaki has suggested, however I tried something extremely simple which I believe take a lot of the pain out of it.
Basically add a status bar to your form, then drag a progress bar onto the status bar placing it in the lower left hand corner of the status bar, you do not need to add a panel to the status bar. With the progress bar item selected go to the Anchor property and click on both the Bottom and Left "bars". The text value inside the Anchor property should read "Bottom, Left". Run your app, the progress bar will stay in sync with you form at all times now.
The greatest lesson in life is to know that even fools are right sometimes. - Winston Churchill
When i run this program,it says Must declare the variable '@Country'.
What should i do.
string selectSQL = "SELECT CustomerID, CompanyName FROM ustomers WHERE Country = @Country AND City = @City";
OleDbConnection nwindConn = new OleDbConnection("Provider=SQLOLEDB;Data Source=localhost;" +
"Integrated Security=SSPI;Initial Catalog=northwind;");
OleDbDataAdapter custDA = new OleDbDataAdapter();
OleDbCommand selectCMD = new OleDbCommand(selectSQL, nwindConn);
custDA.SelectCommand = selectCMD;
// Add parameters and set values.
selectCMD.Parameters.Add("@Country", OleDbType.VarChar, 15).Value = "UK";
selectCMD.Parameters.Add("@City", OleDbType.VarChar, 15).Value = "London";
DataSet custDS = new DataSet();
Note If you are using C++, C#, or JScript, special escaped characters, such as \s, must be preceded by an additional backslash (for example, "\\s2000") to signal that the backslash in the escaped character is a literal character. Otherwise, the regular expression engine treats the backslash and the s in \s as two separate operators. You do not have to add the backslash if you are using Visual Basic .NET. If you are using C#, you can use C# literal strings, which are prefixed with @ and disable escaping. For example, @"\s2000"
I know that you already found the solution, but you should get Eric Gunnerson's RegEx Workbench app from GotDotNet. It's really useful. And of course, you have the code so you can change anything you don't like...
Norm Almond: I seen some GUI's in my life but WTF is this mess Leppie: I made an app for my sister and she wouldnt use it till it was colorful enough Norm:good point leppie, from that statement I can only deduce that this GUI must be aimed at children Leppie:My sister is 25
-Norm on the MailMagic GUI
Last Visit: 31-Dec-99 18:00 Last Update: 23-Sep-23 8:54