Showing posts with label Visual Studio 2010. Show all posts
Showing posts with label Visual Studio 2010. Show all posts
Friday, February 22, 2013
View Property manager in VS2010
Tools > Import and Export Settings > Reset all settings > Visual C++ Development Settings
Tuesday, October 9, 2012
Difference between "override" and "new" keyword
"New" modifier is used to hide a member inherited from a parent class which is not virtual. This does not have the polymorphic behavior, so if someone calls the parent class method, the implementation in the method which "new" modifier has been used is not been called.
"Override" modifier can be used to override virtual or abstract members and it contains the polymorphic behavior.
"Override" modifier can be used to override virtual or abstract members and it contains the polymorphic behavior.
Monday, September 26, 2011
How to use FXCop?
- Install FXCop. Setup can be found here: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\FXCop\FxCopSetup.exe
- Go to All Programs > Microsoft FXCop > Microsoft FXCop version
- Create a new project. File > New project
- Right click on the project and add .exe as target
- Click "Analize" (Project > Analize or F5)
- The result will be displayed in Active window
Monday, August 8, 2011
"Browse..." button in Windows forms
Since there is no such "Browse..." button in Windows forms, I created something equivalent using the following method:
Add a button control and set the text as "Browse...".
In the button click event,
OpenFileDialog openFileDialog1 = new OpenFileDialog();
openFileDialog1.InitialDirectory = "c:\\";
openFileDialog1.RestoreDirectory = true;
if (openFileDialog1.ShowDialog() == DialogResult.OK)
if ((myStream = openFileDialog1.OpenFile()) != null)
txt_FilePath.Text = openFileDialog1.FileName;
myStream.Close();
Then add a text box control(txt_FilePath) infront of the button and set the text property to file path.
Add a button control and set the text as "Browse...".
In the button click event,
OpenFileDialog openFileDialog1 = new OpenFileDialog();
openFileDialog1.InitialDirectory = "c:\\";
openFileDialog1.RestoreDirectory = true;
if (openFileDialog1.ShowDialog() == DialogResult.OK)
if ((myStream = openFileDialog1.OpenFile()) != null)
txt_FilePath.Text = openFileDialog1.FileName;
myStream.Close();
Then add a text box control(txt_FilePath) infront of the button and set the text property to file path.
Subscribe to:
Posts (Atom)