473,549 Members | 3,109 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

#region

Hello!

Below I have manually added the two statement #region Using directives and
#endregion.
I wonder if this possible to have the Visual studio 2005 to generate these
two statement for those statement
that should be included in this section.

#region Using directives

using System;
using System.Collecti ons.Generic;
using System.Componen tModel;
using System.Data;
using System.Drawing;
using System.Windows. Forms;
using System.IO;

#endregion

//Tony
Aug 8 '08 #1
4 2690
Well, you can select them, right-click, surround-with, #region - but I
suspect it is easier to just type #region ;-p

It wouldn't hugely surprise me if ReSharper can do this - it tends to
have much more refactoring / code [layout] automation features (but I
don't have ReSharper, so I can't check).

Marc
Aug 8 '08 #2
I think there may also be a method to change your default class template
that would statically contain such things. Never had the time to explore it
however.
--wjs

"Tony Johansson" <jo************ *****@telia.com wrote in message
news:uq******** ********@TK2MSF TNGP05.phx.gbl. ..
Hello!

Below I have manually added the two statement #region Using directives and
#endregion.
I wonder if this possible to have the Visual studio 2005 to generate these
two statement for those statement
that should be included in this section.

#region Using directives

using System;
using System.Collecti ons.Generic;
using System.Componen tModel;
using System.Data;
using System.Drawing;
using System.Windows. Forms;
using System.IO;

#endregion

//Tony

Aug 8 '08 #3
On Aug 8, 6:16*pm, "Tony Johansson" <johansson.ande rs...@telia.com >
wrote:
Hello!

Below I have manually added the two statement #region Using directives and
#endregion.
I wonder if this possible to have the Visual studio 2005 to generate these
two statement for those statement
that should be included in this section.

#region Using directives

using System;
using System.Collecti ons.Generic;
using System.Componen tModel;
using System.Data;
using System.Drawing;
using System.Windows. Forms;
using System.IO;

#endregion
As a workaround, write a macros that does it, and bind it on some
convenient key - so that you can do it for every newly created file
with a single keypress.
Aug 11 '08 #4
I think there may also be a method to change your default class template
that would statically contain such things. Never had the time to explore it
however.
I am using visual studio express 2008 item templates are stored at:

C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE \VCSExpress
\ItemTemplatesC ache\1033

You can edit these files, restart Visual Studio and then when you add
an item to the project it will default contain the region info.

Project templates are stored separately so you would have to edit all
of the item files within the project template separately.
They are at:

C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE \VCSExpress
\ProjectTemplat esCache\1033

NOTE: make shore you back up the directory before editing, you wont
find no undo button there ):

NOTE: VS 2005 the paths will be slightly different. I am shore you can
work them out.

Jay Dee
Aug 11 '08 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
7584
by: Altramagnus | last post by:
I have a complicated Region object, which I need to draw the outline, but not fill How can I convert the Region object to GraphicsPath object? or How can I draw the outline of the Region object?
6
12275
by: Jim | last post by:
Are #region a bad thing or are they good? As far as I see it #region's are a bad thing as they let lazy programmmers have large and bloated methods divided into regions that then appear as small methods, they also show bad analsys and design when used in this way...... Thoughts?
4
4569
by: Brian Basquille | last post by:
Hello all, Quick question! How would i keep a point inside a region? For example, the mouse pointer. You should be able to move the mouse around in this region but not anywhere outside it. How would i go about doing this?
2
3163
by: Brian Basquille | last post by:
Another question for ye all.. How do i check if a Region has entered another region? Up until now, i've been checking if rectangles (or images converted into Rectangles) have been visible in a Region (Region.IsVisible) but all parameters in IsVisible seem to be for Rectangles / points. To check if a Region is in another Region, i'd...
1
2572
by: Steven T. Hatton | last post by:
All of the following terms are used in some way to describe where and how a name is relevant to a particular location in a program: visible, declarative region, scope, potential scope, valid, introduced, used, potentially evaluated and accessible. They all seem to have subtle difference in meanings. Any positive contribution to the...
232
13096
by: robert maas, see http://tinyurl.com/uh3t | last post by:
I'm working on examples of programming in several languages, all (except PHP) running under CGI so that I can show both the source files and the actually running of the examples online. The first set of examples, after decoding the HTML FORM contents, merely verifies the text within a field to make sure it is a valid representation of an...
1
1556
by: Sagaert Johan | last post by:
i have a control that uses a region to make it non rectangular when i try to to remove the region by calling this.Region.Makeinfinite() the control keeps its non rectangular Region. if i call RecreateHandle() after calling Region.Makeinfinite() it works. I Don't understand why it does not work if i don't call RecreateHandle(); Johan
3
4499
by: Grant Edwards | last post by:
I've recently switched from Jed to Emacs for editing python source, and I'm still stumped as to how one indents or dedents a region of code. In Jed it's 'C-c <' or 'C-c >'. Google has found several answers, but none of them work, for example I've tried bot "C-c tab" and "C-c C-r" based on postings Google has found, but neither appears to...
1
2049
by: Chris Thomasson | last post by:
This region allocator is not dynamic and can be fed with a buffer residing on the stack of the calling thread. Therefore, you can use this in an environment which does not have a heap; its basically analogous to `alloca'. However, it does not align each buffer on a boundary sufficient for _any_ type. Instead, it dynamically calculates the...
8
3159
by: Chris M. Thomasson | last post by:
Here is the initial crude implmentation which compiles under Comeau with no warnings: ___________________________________________________________________ #include <cassert> #include <cstdlib> #include <new> #include <list> template<typename T, std::size_t BUFDEPTH = 1024>
0
7520
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7446
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7718
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
1
7470
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7809
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6041
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5368
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
1
1936
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1058
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.