Another #region suggestion

Visual Studio .Net

    Next

  • 1. Windows causes devenv.exe to Freeze and use 100% CPU when autohide is checked
    This happens often enough to be a nuisance and I cannot recreate it. But obviously from all the threads complaining about IDE freeze ups there is an obvious problem. I have yet to find a thread where MS has answered the issue with an end all solution and I see a lot of posts were never answered. Has anyone found a soltuion to this or what the cause is so we can avoid it. It usually happens to me when I open and close the the solution explorer or use the autohide pin.
  • 2. Controls disappearing
    I would like to know if there's anything in the works for getting rid of the problems where controls disappear. I know that this happens in a few different cases. But if I have a project build that fails and I open a Form that contains some UI from the project, I don't want it to just disappear. That just doesn't make sense. Any help on this would be appreciated. Lance Johnson
  • 3. Project compilation order.
    Hi there, I have 3 projects under solution. I want build them in my order , but I don't want use the "Project Dependencies" or "Project Build order" because they triggering to rebuild whole chain, but I want have ability to compile each project separately. Can I do some manual changes in solution file or some another file to achive this? Any solutions/suggestions appreciated.
  • 4. Can not remove reference to old DLL
    I have a VS.Net 2003 solution with four projects. Three of the projects have references to an internal .dll. Two of those three projects are ASP.Net projects, the third is a Console application. I was updating the .dll for use with the Console application and so stored the updated .dll in a different folder. Frequently after 'build'ing the Console application, the new copy of the .dll was replaced by the old version. I have since replaced the older version used by the ASP.Net projects with the updated copy and have not yet had the same problem. HOWEVER, the Object Browser shows three instances of this .dll - two of those instances are the old version! Where else are VS.Net references to .dlls/COM objects stored so I can remove the older versions? Thank you
  • 5. Weird classview behaviour
    Hello, I'm using Visual Studio 2003 and working on a C++ projekt. In the class view I normally have e.g. one node expanded (unfolded), so that the members of that class are visible. When I click on the file tab or the resource tab and then back to the class view tab, the class view shows all classes folded and no class members are visible any more. Also the scroll position might change when I change the focus from class view to e.g. editor window. And when I try to scroll the class view with the mouse, it scrolls back to originally position, when I release the mouse button. When I retry to scroll a second time it works. Any ideas?

Another #region suggestion

Postby cGFnYXRlcw » Thu, 09 Jun 2005 03:43:04 GMT

When double-clicking a form in design mode to automatically add an event, the 
code always ends up the bottom of the module.

I would like to see a change that would allow the user to define the region 
that events will show up in.  For instance, when I create a new user control, 
I have default regions set for (among other things) properties, methods, 
helper (internal) functions, and events.  It would be helpful if the code 
went directly into the "events" #region.

Similar Threads:

1.#region Suggestion

The #region keyword would be more helpful if it stood out more in the IDE 
code window, making it easier to find each section with a quick glance.  The 
#region is helpful at design time, and could be better utilized.

My suggestion is to have another IDE option to set the font size and color 
for #region.  By default, possibly change it to stand out more.

2.Suggestions for standard regions

Just starting on C# and would like to know what suggestions
there are for the order in which declarations, event
handlers, properties, private code, nested classes, etc,
etc appear in your files. What impact do access modifiers
have on the order? Also, does anyone use standardised
region names?

3.#Region #End Region issue

When working in the Code-behind of ASP.net using VS2005, if you create a 
#Region "SomeName" #End Region, and close VS2005 then reopen it all your 
#Region #End Region collapses.

Is there a setting in VS2005 that prevents this from happening, because this 
makes it difficult to work on projects that you want to come back to later 
and what to leave a #Region expanded so you know where you left of or know 
what you were working on before?

Thanks,

4.Invalidating a region and having only that region drawn

Hello,

In my application I perform all the drawing operations from within the form's
OnPaint method (the form is ultimately a TabPage derivative) ie

protected override void OnPaint(PaintEventArgs e)
{
    base.OnPaint(e);  
    //the base class LayerView.OnPaint handles things like AutoScrollPosition 
    int s = 1;  // temporary dummy scale value
    m_building.DrawBuildingLayer(g,s,this.Name);   
    m_columns.DrawColumnsLayer(g,s,this.Name);
}

The drawing works well and smoothly handles operations such as scrolling.

It is my understanding that when Invalidate() is called ie with no 
parameters, the entire client area of the form is added to the update region 
and a paint message is sent that raises the Paint event which is handled by 
the OnPaint handler. OK

When Invalidate(region) is called, I believe that only that region is added 
to the form's update region resulting in only that region being redrawn at 
the next Paint message.

Either way, calling Invalidate results in OnPaint to be executed.

When I call Invalidate() the entire client area is redrawn with both drawing 
functions called and this is exactly the outcome that I want for that 
scenario. 

The problem is that when I only want to redraw a invalidated region of this 
form,
the entire form is redrawn( which is causing objects to be appear 
incorrectly).

ie When I call Invalidate(with a specific region) in order to only have that 
region redrawn I do NOT intend for the likes of DrawBuildingLayer nor 
DrawColumnsLayer
to be called. Obviously they are being called because of their presence in 
OnPaint().

I cannot think of any other place where I could call these draw functions 
other than OnPaint and I want to steer clear of CreateGraphics. 

Are there any suggestions regarding a strategy of how I could call 
Invalidate(region) and only have that region redrawn ?


Thanks

Andrew.
   

5.Constructing a clip region from points inside the region

I have all points that are inside a region

But they are a lots of points there... how to convert them to a region as
GraphicsPath that can be shrinked to a graphicsPath points and types..I need
the smallest string that reflect the region

-- 
Cheers,
    Crirus

------------------------------
If work were a good thing, the boss would  take it all from you

------------------------------


6. Creating a GraphicsPath from a Region by hit-testing with Region.IsVisible()

7. Examples using Region and/or Region.Intersect?

8. Region visible in another Region?



Return to Visual Studio .Net

 

Who is online

Users browsing this forum: No registered users and 33 guest