.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Timers: Implement a Continuously Updating, High-Resolution Time Provider for Windows

Posted By:      Posted Date: August 21, 2010    Points: 0   Category :ASP.Net

The timestamps that you can obtain from Windows NT are limited to a maximum resolution of 10 or 15 milliseconds, depending on the underlying hardware. At times, such as when you need to timetag frequent events, it is desirable to achieve a higher resolution. For example, what if you want to be able to contact a thread or perform some other task at intervals more frequent than 10 milliseconds? Suggested ways of achieving better resolution include using performance counters in conjunction with the sytem time to calculate smaller time increments. But using performance counters is a technique that presents its own problems. This article shows one possible way of overcoming limitations inherent in this approach.

Johan Nilsson

MSDN Magazine March 2004

View Complete Post

More Related Resource Links

How to programmatically add controls to Windows forms at run time by using Visual C#

Create a Windows Forms Application
Start Visual Studio .NET or Visual Studio 2005 or a later version, and create a new Visual C# Windows Application project named WinControls. Form1 is added to the project by default.
Double-click Form1 to create and view the Form1_Load event procedure.
Add private instance variables to the Form1 class to work with common Windows controls. The Form1 class starts as follows:

Custom Control Design-Time SiteMap Provider Error


Greetings - I was referred here by MSDN forums hope this is the right place -  

I have a custom control (:WebControl) that renders web.sitemap in a specific way. While it runs error free and produces the expected result, at Design-Time it complains

Error Creating Control - MyControl  The provider 'AspNetXmlSiteMapProvider' specified for the defaultProvider does not exist in the providers collection.

I have discovered that the error is cause by this line of code:

string div = string.Format("<div class='{0}' id='{1}'>{2}</div>", this.CssClass, this.ID.ToString(), EnumerateNodesRecursive(SiteMap.RootNode, level));

or more specifically, by the reference to SiteMap.RootNode - I am not clear what is missing thoough because I have configured the SiteMapProvider in web.config as this:

        <add name="AspNetXmlSiteMapProvider" 
             type="System.Web.XmlSiteMapProvider, System.Web, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" 

Cloud Computing: Patterns For High Availability, Scalability, And Computing Power With Windows Azure


Here we examine the typical cloud platform architecture and some common architectural patterns, along with their implementation on the Windows Azure offering from Microsoft.

Joshy Joseph

MSDN Magazine May 2009

Windows with C++: Exploring High-Performance Algorithms


See how you can gain efficiency in surprising ways by looking closely at your algorithms, the data they operate on, and the hardware you're designing for.

Kenny Kerr

MSDN Magazine October 2008

Visual Studio .NET: Building Windows Forms Controls and Components with Rich Design-Time Features, P


This is the second of two articles discussing the extremely rich design-time features of the .NET Framework. Part 1 discussed the basics, showing you where to start and how to extend your control implementation through attributes and interfaces, as well as their effects on the property browser, code serialization, and other controls. Part 2 continues the journey by concentrating on design-time functionality that you can implement beyond your components and controls, including TypeConverters, UITypeEditors, and Designers. It would be impossible to cover everything you can do in two short articles, which is a testament to just how all-encompassing and flexible the design-time capability of the .NET Framework is.

Michael Weinhardt and Chris Sells

MSDN Magazine May 2003

Visual Studio .NET: Building Windows Forms Controls and Components with Rich Design-Time Features


Visual Studio .NET provides support for designing rich features into your controls and components, allowing you to set properties, set form placement, inherit from base classes, and much more. So how does Visual Studio .NET do all this? What does the Windows Forms designer do? What's the difference between a control and a component? How does Visual Studio integrate your controls so that they can access features of the .NET Framework?In this article, the authors answer these common questions by building a clock control and taking the reader along for the ride. In building the control, hosts and containers are illustrated, the property browser is explained, debugging is discussed, and a general overview of the design-time infrastructure is presented.

Michael Weinhardt and Chris Sells

MSDN Magazine April 2003

Windows CE 3.0: Enhanced Real-Time Features Provide Sophisticated Thread Handling


Windows CE is a small, configurable, feature-rich, real-time operating system. In Windows CE 3.0, the real-time support has been improved. This article looks at specific support for the creation of real-time systems and how it compares to the support in Windows for the desktop. The way interrupt handlers, processes, memory management, and synchronization work in Windows CE 3.0 is discussed. An extensive look at threads and thread priority, misconceptions surrounding them, and their impact on performance is included. Refinements to the Windows CE scheduler and support for nestable interrupts are also covered.

Paul Yao

MSDN Magazine November 2000

Using Windows 7 my screen resolution changed.

My screen resolution changed to 1280 X 720.The relavent sreen resolution section in windows only now allows me a max of the above.I am using NVIDIA Ge Force 9800GT graphics and ASUS VW220 monitor.Will appreciate any help.Cheers.    

Windows Form Resolution Setting

HI I created one application in my laptop its working correctly but when i m trying to use that one in Desktop some part of application got hide in right side of screen. I faced this problem today when i was giving the Demo on my application in college. I dont know how to make the application which will run in any system without any resolution problem.       Please help me. My project is windows based. please help me............ Thanku......... 

time out stored procedure windows form

I have a form that runs kicks bulk copies data to a data base and then runs a stored procedure.  the problem I have is the stored procedure takes a long time and users have no way to know what is going on.  the app window freezes says not responding and then after a while it completes and moves on. is there a way to prevent the application from freezing and being marked as not responding?

how implement run time search

here I have 2 sample table and their data, CREATE TABLE TempData(Employee_ID INT, Timesheet_ID INT, Employee_Name VARCHAR(50)) INSERT INTO TempData VALUES(1, 20, 'YAZD') --SELECT * FROM TempData CREATE TABLE ColData(ColName VARCHAR(50)) INSERT INTO ColData VALUES('Employee_ID') INSERT INTO ColData VALUES('Timesheet_ID') --SELECT * FROM ColData below "SELECT" returns from below query, --SELECT * FROM TempData WHERE Employee_ID = 1 AND Timesheet_ID = 20 DECLARE @Employee_ID INT DECLARE @Timesheet_ID INT SELECT @Employee_ID = Employee_ID, @Timesheet_ID = Timesheet_ID FROM TempData DECLARE @STRSQL NVARCHAR(MAX) SET @STRSQL = N'SELECT * FROM TempData WHERE Employee_ID = ' + CAST (@Employee_ID AS VARCHAR) + ' AND Timesheet_ID = ' + CAST (@Timesheet_ID AS VARCHAR) + ' ' PRINT @STRSQL now I prepare dynamic search creteria from table "coldata" and now "SELECT" is below, --SELECT * FROM TempData WHERE [Employee_ID] = CAST (@Employee_ID AS VARCHAR) AND [Timesheet_ID] = CAST (@Timesheet_ID AS VARCHAR) DECLARE @ColName NVARCHAR(MAX) SET @ColName = STUFF( (SELECT ' AND [' + ColName + '] = CAST (@' + ColName + ' AS VARCHAR)' FROM ColData FOR XML PATH('')),1,4,'') DECLARE @Employee_ID INT DECLARE @Timesheet_ID INT SELECT @Employee_ID = Employee_ID, @Timesheet_ID = Timesheet_I

How to implement Windows Computer Management using Windows API's

Hi to all! Please guide me since this is really something new to me, and I hope this is the right place to ask these questions.How do I implement Computer Management (Adding computer user to a Group) in C#?Here are the steps that I have done so far using Win API functions and structures:1. For getting the current user's info, I used NetWkstaUserGetInfo to get the current user's user name and log on domain (the structure used is WKSTA_USER_INFO_1) (Ex. user name acquired = user and domain = domain)2. Next is I have to identify whether the current user is a member of the Administrators group by first getting all the members of "Administrators" using NetLocalGroupGetMembers. (the structure used to store each member is LOCALGROUP_MEMBERS_INFO_3). Then looping through the members, I get the corresponding LOCALGROUP_MEMBERS_INFO_3. If the domainAndName member of LOCALGROUP_MEMBERS_INFO_3 is equivalent to the string combining the user name + backslash + domain from Step 1 (Ex. user\domain) then the current user is a member of the "Administrators" group.3. There is a part where I have to check if a certain user is a valid user, just like in Windows, when adding a user to a group. In Windows Computer Management, there is a "Check names" button and the location is identified above. (Example, domain.org). When I type in user1 i

Windows Auth Web App extended to FBA, and only one web app at a time is allowing SSL

I had a farm with about 6 web applications, all using SSL. I just created another web app and extended it to use FBA. I attach a self-signed cert until its ready for prod (in IIS 6 using SelfSSL.exe), both web apps have dedicated IP's, which set under the WebSite tab in the site's properties, as well as "Multiple SSL identities for this Web Site" and the host header is listed above that in "Multiple identities for this web site" and both are listed as having the https:// protocol in Alternate Access Mapping in Central Admin. Everything is set to use port 443, both in Sharepoint and in IIS. But only one of these two web apps will allow an SSL connection at the same time, I can get SSL to work on either one individually, but as soon as I can hit the site with https:// protocol, the other site stops working with SSL, yet can be hit with the http:// protocol. what gives? Thanks

Disable SharePoint Workspace alert on Windows 7 PC with Norton Firewall Provider.

My wife has a laptop with Windows 7 and Office 2010.  Recently she was playing with some settings on her PC and did something which now causes a "Microsoft SharePoint Workspace" alert to appear when she boots up the machine. She wants this message to go away.  I do not know how to do this, and searching for portions of the alert have lead nowhere.  Here is the exact message. SharePoint Workspace is unable to communicate through your firewall and will run with limited functionality.  To resolve this problem, enable SharePoint workspace as a Windows Firewall exception.  For assistance, contact your Windows administrator. To remedy this, here is what I attempted: Start > Control Panel > View by Small Icons > Windows Firewall This opens a dialog with the caption, "Help protect your computer with Windows Firewall".  Below that, there is an orange box with the notification, "These settings are being managed by vendor application NORTON FIREWALL PROVIDER." Of the half-dozen options that appear in the left navigation panel of that dialog, only 3 are enabled: control panel home, advanced settings, and troubleshoot my network.  The option to "Turn windows firewall on or off" is disabled. We have Norton 360, so I opened that program and chose the "Settings" tab, which displays a Firewall link to

provider can not be found OLEDB in windows 7

The 'Microsoft.Jet.OLEDB.4.0' provider is not registered on the local machine also provider can not be found it may not be properly installed I am getting this error I am using windows 7 everything was working fine on XP but on windows 7 i am getting this error I dont understand what to do since I need to run the code as it is very urgent can u please help me with what do I need to do and from where to download the content so that my laptop works properly.... I need to run my project on laptop which is installed with windows 7 -- 64 bits and the project was developed on XP thank u in advance

How to implement Design-Time drag & drop from Custom Visual Studio Tool Window to WPF Designer

Hi, Could someone tell me if it is possible to intercept a design time drop event coming from a custom Visual Studio tool window onto the cider design surface? I am hoping to use the same API's as those used by the Visual Studio 2010 'Data Sources' tool window, which provides drag & drop data-binding between classes and WPF/Silverlight controls. My requirement is to pass a DataObject (used with the WPF DragDrop API) from my custom Visual Studio WPF tool window treeview to my custom WPF control at design time, read the data and do some binding/XAML manipulation of my own. The drag aspect is simple enough but I can't work out how to accept a drop event from anything other than the toolbox. At the moment, when I drag my treenode over the design surface it shows the 'cannot drop here' cursor. If someone could give me some insight into how the 'Data Sources' tool window allows dragging of treenodes to controls I would really appreciate it. It is obviously possible but which API's are used and are they public? Thanks in advance, Paul  

Updating bunch of records at time

Hi, If I want to update 1000 records at a time in the database what is the best approach.Guide me Pls.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend