473,394 Members | 1,090 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Designer and Timers

Consider a class that extends System.Timers.Timer. The Visual Studio
designer thinks this is a class that can be designed. Is there a way,
say an attribute on the class, that tells the IDE that it can't be
designed?

--
Wal
http://www.vooose.com

*** Sent via Developersdex http://www.developersdex.com ***
Nov 17 '05 #1
3 1181
You're probably looking for [DesignTimeVisible(false)].
--
Guido Stercken-Sorrenti
MVP - Visual Developer / Visual C++

"vooose" <no****@microsoft.com> schrieb im Newsbeitrag
news:er**************@TK2MSFTNGP09.phx.gbl...
Consider a class that extends System.Timers.Timer. The Visual Studio
designer thinks this is a class that can be designed. Is there a way,
say an attribute on the class, that tells the IDE that it can't be
designed?

--
Wal
http://www.vooose.com

*** Sent via Developersdex http://www.developersdex.com ***

Nov 17 '05 #2
Guido thanks for your reply. I added this line

[System.ComponentModel.DesignTimeVisibleAttribute(f alse)]

as a class attribute, recompiled, exit VS and it still shows the class
as designable (ie when you double click it goes straight to design
mode). Is there an attribute that does

'When I double click on any class ALWAYS go straight to the code view'

(or marking a particular class so it behaves like that)

Regards

--
Wal
http://www.vooose.com

*** Sent via Developersdex http://www.developersdex.com ***
Nov 17 '05 #3
OK, now I see what you mean: That bad habit of the VS 2005 IDE to try to
open a class in the designer when you double click it in Solution Explorer,
even if it is not designable? Unfortunately, that doesn't depend on any
attribute, but this happens simply for every class derived from
System.ComponentModel.Component.
Some time ago, I filed this as a bug / feature request to MSDN Product
Feedback Center, but it has been postponed:
At this stage in the VS 2005 product cycle, we're making very few changes
and working on stabilizing the code base. Your suggestion is being
postponed
and we will reconsider it for the next version of the product.
I'm still looking for a workaround, possibly with a macro. I'll let you
know.

--
Guido Stercken-Sorrenti
MVP - Visual Developer / Visual C++
"vooose" <no****@microsoft.com> schrieb im Newsbeitrag
news:OT*************@TK2MSFTNGP10.phx.gbl... Guido thanks for your reply. I added this line

[System.ComponentModel.DesignTimeVisibleAttribute(f alse)]

as a class attribute, recompiled, exit VS and it still shows the class
as designable (ie when you double click it goes straight to design
mode). Is there an attribute that does

'When I double click on any class ALWAYS go straight to the code view'

(or marking a particular class so it behaves like that)

Regards

--
Wal
http://www.vooose.com

Nov 17 '05 #4

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

Similar topics

1
by: GDumencu | last post by:
I have a C# program that have to run all the time. For some reasons I cannot make it a service. This program has 3 timers and by time to time ( days or weeks) one of them stops. Some times, starts...
0
by: Dmitry Demchuk | last post by:
Hi everybody. Recently I ran into situation with System.Threading.Timer in my ASP.NET application. I reinstalled Windows on one of my servers and got timers stop firing events after while, they...
0
by: Cider123 | last post by:
I was originally using: System.Windows.Forms.Timer It started to lock my Window Service up, so I went to the next evolution: System.Threading.Timer All was good. I was using it to send...
3
by: Jeff Greenland | last post by:
Hello everyone, I am having problems with Timers in a web application. They just seem to stop running after 15 minutes or so. My web application is set up like this: When a user hits a...
9
by: Mark Rae | last post by:
Hi, I've seen several articles about using System Timers in ASP.NET solutions, specifically setting them up in Global.asax' Application_OnStart event. I'm thinking about the scenario where I...
5
by: Michael C# | last post by:
Hi all, I set up a System.Timers.Time in my app. The code basically just updates the screen, but since the processing performed is so CPU-intensive, I wanted to make sure it gets updated...
1
by: | last post by:
Frustrated.. (I have seen other posts regarding this problem with no resolution..) I am using dotnet 1.1 with latest SP on a Win2KP box (actually 2 boxes), have even run the service on WinXP SP2...
0
by: Ben Fidge | last post by:
Where has the visual designer gone for global.asax in VS 2005? Previously I was able to drag-and-drop timer objects onto it and use the Properties windows to setup the Interval. This all appears to...
1
by: Jonathan Woods | last post by:
Hi there, I have three methods these need to execute at every interval time. I would like to know which option is better? Option A) Three System.Timers.Timer objects these execute each...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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,...
0
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...

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.