Sunday, August 8, 2010

C# FAQs Series: Get Names of All Machine on LAN

In C# FAQs Series: We discuss most frequent questions asked on C# forums.
In this session we will see how to get all machines connected on LAN using C# code. 
You can use windows built-in tool net.exe to achieve this. All you need to do is start it using Process  class and send view command.
using System.Diagnostics; 
using System.IO; 
    //Gets the machine names that are connected on LAN 
 Process NetworkUtility = new Process(); 
 NetworkUtility.StartInfo.FileName = "net.exe"; 
NetworkUtility.StartInfo.CreateNoWindow = true; 
 NetworkUtility.StartInfo.Arguments = "view"; 
 NetworkUtility.StartInfo.RedirectStandardOutput = true; 
 NetworkUtility.StartInfo.UseShellExecute = false; 
 NetworkUtility.StartInfo.RedirectStandardError = true; 
 StreamReader streamReader = new StreamReader(NetworkUtility.StandardOutput.BaseStream,  NetworkUtility.StandardOutput.CurrentEncoding); 
string line = ""; 
while ((line = streamReader.ReadLine()) != null) 
      if (line.StartsWith("\\")) 
      {             listBox1.Items.Add(line.Substring(2).Substring(0, line.Substring(2).IndexOf(" ")).ToUpper()); 
All machines on LAN will be added in listBox1.

Saturday, August 7, 2010

Fourth IE9 Platform Preview Available for Developers

As you know IE9 Platform Preview is Available for Developers following is great article by Dean Hachamovitch IE9 GM.

IE9 started from the premise that the modern web will deliver HTML5 experiences that feel more like native applications than sites. Building on hardware-accelerated SVG, canvas, video, audio, and text, developers will use the power of the whole PC to achieve great performance. On the modern web, developers will use the same markup across different HTML5 browsers.

With IE9, we have worked much more closely with the developer community. Developers have had an earlier (and more frequently updated) look at the platform. With that early engagement, developer feedback has had a bigger impact than before. People have downloaded IE9 Platform Previews over 2.5 million times. The samples on the IE Test Drive site have had over 20 million visitors. We appreciate the positive feedback and all the specific issues logged in Connect. They’ve helped us make demonstrable improvements that the community has noticed.

The fourth Platform Preview of Internet Explorer 9, available now, shows the opportunity of fully hardware-accelerated HTML5. You can run new test drive samples that show modern SVG and native JavaScript integration in action. In March, we promised to deliver platform preview releases approximately every eight weeks. With this installment, you will find more performance and more support for same markup. You’ll also find many fixes to issues reported in previous Platform Previews. Here is a video of some of the test drive samples:

Note this video uses the HTML5 video tag (with the H.264 codec) if your browser supports it, and falls back to other methods otherwise. It’s a good example of same markup in action.

Fully Hardware-Accelerated HTML5

The performance benefits of hardware acceleration are clear from running different sample sites side by side in IE9 and other browsers. Browsers that implement partial hardware acceleration – for example, text-only, or video-playback only, or image-only acceleration – offer inconsistent and possibly unpredictable platform experiences to developers and end-users.

IE9 offers consistent, fully hardware-accelerated text, graphics, and media, both audio and video. Try Hamster Dance Revolution, IE Beatz, or MSNBC Video in different browsers to experience the difference. Psychedelic Browsing demonstrates what HTML5 canvas can do when it’s fully accelerated with the GPU.

IE9 PPB4 and Firefox 4  showing the Psychedelic Browsing demo.  IE9 gets 1789 revolutions per minute, FF4 gets 829 rpm

IE9 PPB4 and Chrome 6 showing the IE Beatz demo, IE9 gets 36 frames per second and 160 beats per minute, Chrome 6 gets 7 FPS and 115 BPM

IE9 PPB4 and Chrome 6 showing Hamster Dance Demo, IE9 gets 41 fps Chrome 6 gets 4 fps

Modern SVG

With Platform Preview 4, we’re excited to show highly-interactive and integrated, or modern, SVG. Typically, developers think of SVG as the graphics format for static engineering diagrams and images. With HTML5 and hardware acceleration, SVG is an excellent choice for a new class of interactive, animated scenarios.

You can see great SVG performance, animated via JavaScript, with the SVG Dice example. The sample shows striking performance differences between browsers animating the same SVG markup, as well as the benefits of being able to style SVG with CSS. Unfortunately, you can see differences in how different browsers display the same SVG; as an industry we have more work to do so the same markup delivers the same results.

Native JavaScript Integration

We’re committed to the right foundation for HTML5 applications, including performance and ensuring the same markup and same script work across browsers. One aspect of doing these things well is integrating the JavaScript engine natively inside the browser, rather than bolting it onto the side to support multiple JavaScript engines as some other browsers do today. How a JavaScript engine is integrated into the browser is as important as the engine itself for real-world HTML5.

The fourth Platform Preview moves the new JavaScript engine, codenamed Chakra, inside IE9 and brings them together into one single, integrated system.

Through this deep integration, the performance of real world websites significantly improves, and IE9 becomes the first browser to have a shared DOM between the browser and the script engine based on ECMAScript5. The benefits start with real-world performance and consistency.

The easiest way to understand the importance of this fundamental change is by looking at how earlier versions of Internet Explorer integrated JavaScript. For the last 15 years Internet Explorer has supported multiple programming languages including JScript, VBScript, and even specialized languages such as Perl. While this gave developers choice it also came at the cost of performance and features. The browser and these script engines communicated through COM which could cause performance problems. Each script engine had its own language specific view of the DOM which created discrepancies. Additionally, the browser was forced to use a least common denominator approach which made adding new features challenging.

Diagram of IE8 vs IE9 JavaScript Integration Model.  In IE8 the JavaScript engine was outside of IE, in IE9 the JavaScript engine is inside IE and shares the IE DOM

In the fourth Platform Preview, we’ve moved the JavaScript engine inside IE9. With this change, communication between the browser and script engine is now direct, which significantly improves performance for real world websites. We now have a single DOM, shared across all browser subsystems including JavaScript. This change ensures a consistent and interoperable view of the document. And this single DOM is now based on ES5, which prepares the entire system for the future.

When programming the IE9 DOM from JavaScript, objects now feel like native ES5 objects because, underneath the covers, they actually are ES5 objects. This approach brings the benefits of ECMAScript5 to the DOM. With the fourth Platform Preview, IE9 becomes the first browser to have a fully discoverable DOM through ES5 reflection features. IE9 is the first browser to apply ES5 bindings to DOM objects, enabling a full Inheritance view of the DOM, and taking advantage of the WebIDL specification as the foundation for this support. Together, these changes provide developers a natural ES5 based programming model. Try some of these enhanced DOM capabilities out for yourself to see how well your browser’s DOM and JavaScript engine are integrated. IE9 will continue to support additional programming languages through the legacy model, but we strongly encourage developers and enterprises to take full advantage of the benefits of JavaScript moving forward.

Platform Preview 4 also continues improvements to the JavaScript engine itself. One measure of JavaScript performance is the Webkit Sunspider microbenchmark. Here is a chart of the latest results:

WebKit Sunspider Results from 8/2/10, IE9 PPB4 get's 4th

The differences between browsers on this microbenchmark are converging within thousandths of seconds on tests that repeat operations many, many times to find any differences at all.

Real-world HTML5 performance often reflects the entire browser’s performance, not just the JavaScript engine in isolation. This video, for example, shows a side by side comparison of different browsers running an HTML5 canvas. The performance differences between browsers are striking and do not reflect relative JavaScript performance. We encourage other browser vendors to consider following our lead in designing for end-to-end performance and natively integrating JavaScript engines rather than treating script as a separable subsystem to be optimized in isolation.

Same Markup, and Tests

To assess the quality and completeness of a browser’s standards support, we look to the official standards bodies. Their open, consensus-based process is the best way to bring the community of browser vendors and web developer and design professionals together in building a test suite.

With Platform Preview 4, we’re contributing 519 new tests to the standards bodies. Based on community feedback, we’ve also updated five of the previously submitted tests. This brings the total number of tests we’ve contributed during IE9 development to 2,138. We welcome your feedback on the specific test cases. Please continue to provide feedback on the test cases to the appropriate W3C working group. In case of ES5 test cases please provide test case specific feedback via Microsoft Connect. We also invite you to submit your own test cases to the standards bodies as well. You can find the test cases Microsoft has developed at the IE Test Center.

These test cases represent a strong start on a complete and comprehensive test suite of the web standards developers expect to work consistently across browsers. While the suite is not complete yet, it is interesting to note how interoperable some of the same markup is across different browsers:

Cross Browser Test Results Summary from IETest

Some people use a particular test or website as shorthand for standards compliance. Different sites test different subsets of different standards to different depths. Acid3 is one that some people in the community have cited. It tests about 100 fragments of a dozen different technologies. Here’s a screenshot of how today’s IE9 Platform Preview runs today’s Acid3 test, going from 83 in the previous platform preview to 95:

IE9 PPB4 showing Acid3 score of 95/100

As IE9 has implemented more of the standards that developers use and value, IE9’s Acid3 score has continued to rise. The remaining points involve two particular technologies (SVG Fonts and SMIL animation of SVG) that are in transition.

Support for SVG Fonts in the web development and font communities has been declining for some time. There’s already been discussion without objection of dropping SVG fonts from the Acid3 test. The community has put forth a proposal in the SVG Working Group to give SVG Fonts optional status.

Instead, developers can use the Web Open Font Format (WOFF, supported in IE9 Platform Preview 3 as well as other browsers) for both HTML and SVG content. It works well in conjunction with the CSS3 Fonts module and has broad support from leading font vendors (e.g. here, “a majority of font makers have already settled on WOFF or services like Typekit as their format of choice”). WOFF fonts are a better long-term solution for many reasons discussed previously.

Similarly, support for SMIL animation of SVG in the web development community is far from strong. The leader of the SVG standardization effort wrote that not supporting SMIL in its current state is probably best “since the SVG WG intends to coordinate with the CSS WG to make some changes to animation and to extend filters.” There’s already work started to reconcile CSS3 animations and SVG. Developers interested in animating SVG can use JavaScript, as the samples in the test drive site do today, with consistent results.

Getting sites ready for Beta

With the fourth Platform Preview, we strongly recommend developers, designers, and partners to start getting your sites ready for the IE9 Beta.

  • Test your site in IE9 Standards Mode. This mode provides the best performance and interoperability and will offer additional benefits in the IE9 Beta. We suggest using the HTML5 doctype. More details here and here.
  • We recommend sending IE9 the same standards-based markup your site sends other browsers. More details here and here. From the feedback so far, and our experience with sites, the best way to get your site working in IE9 Standards Mode is to start from the same markup other browsers receive rather than IE6, IE7, or IE8 markup.
  • Use feature detection, not browser detection to handle any cross browser differences in behavior or feature support. This keeps your site working even as browsers change.
  • Please continue to report issues on Connect if your site doesn’t look or work right, and you’re giving it the same code as you’re giving to other modern browsers. With IE9 Platform Preview 4, we’ve fixed over 100 community-reported issues. We will fix even more between now and the IE9 beta and want your feedback.
  • Consider the experience for IE9 Beta users if you find that sending the same markup creates more issues than you can resolve in your production site. It is possible that running your site in Compatibility View is better for your users.
  • Take advantage of HTML5, CSS3, SVG, DOM, ES5, and more… all described here in the developer guide. We’re excited to run the amazing experiences you bring to the web using these new capabilities, taking advantage of hardware through IE9.

Platform Preview 4 is an important milestone on the way to beta. It is the last preview before the IE9 Beta. The IE9 platform is nearly complete. We ask that developers and partners start testing in preparation for the beta and prepare their sites to take advantage of IE9’s new capabilities. We continue to welcome your feedback

Wednesday, August 4, 2010

Bing Gets OpenStreetMap

Bing Maps has added “OpenStreetMap” as the newest layer available to its online mapping service. It’s also available as a standalone Bing Map App from the Bing Maps gallery. OpenStreetMap (OSM), for those of you unfamiliar, is a project to create an open-source, freely editable map of the world…sort of like the Wikipedia of mapping.

The data in OSM comes from people who record it using GPS devices as well as from free satellite imagery. Once online, it can then be edited by anyone who may know more about a particular area or spots an error. At present, there are around 250,000 users contributing to the project.

By adding OSM as a layer in Bing Maps, you can now easily access this rich data from a f amiliar source: Bing. The data hasn’t been modified in any way, except to fit into the “tile schema” of Bing Maps, explains Chris Pendleton via blog post. Also of note, the data is being hosted on Windows Azure CDN, which is designed to support globally distributed apps such as this.

Bing Gets a Cab Fare Calculator

How much will that taxi ride cost you? A new Bing Maps application can give you the answer. The Taxi Fare Calculator app was developed by Ricky Brundritt for the King of Bing Maps competition.

As you may imagine, the app lets you enter in a starting address and end address and then see what the cab fare may be, as well as the shortest route. (Quick, we need a mobile version of this for tourists! )

Fare estimates are based on rates for cabs in the area, and include pick-up rates and by-the-miles costs, as applicable.

This map app is actually one of many great entries in the contest, several of which are featured here. Other apps include a “World of Football” app, a data viewer app, a pharmacy finder and more.

But the cab fare is my favorite, maybe it’s yours too?

Monday, August 2, 2010

Microsoft Tag

Microsoft Tag connects almost anything in the real world to information, entertainment, and interactive experiences on your mobile phone. Tags are a new kind of bar code that can be displayed anywhere. You can add a Tag to your ads, posters, product packages, flyers, display it on your website, billboards, clothing…the list is endless. When you scan a Tag by using the free Tag Reader application on your mobile phone, it will automatically open a webpage, display a message, or dial a number – there are no long URLs to type or SMS messages to send.
Anyone can create Tags. Put them on your materials or your webpage and you decide what your customers will experience. Unlike other kinds of bar codes, Tags are fully customizable. You can decide to create your Tags in black and white, or you can create colorful Tags that visually represent your business or personal brand in a spectacular manner. It only takes a few minutes to start working with Tag and it is free to scan and create Tags.
5pt; text-indent: -18.0pt; line-height: normal; mso-list: l0 level1 lfo1; tab-stops: list 36.0pt;">· Use a Tag to instantly link to a mobile website or video.
· Scan a Tag on a business card to instantly add someone to your address book.
· All the Tags you've scanned to-date are saved so you can retrieve them later or share with others.
· Create your own Tags using our Tag Manager and view reports on how frequently they are scanned.
Microsoft Tag vs. Other 2D Codes
Linking real-world objects to deeper experiences on mobile phones started in Japan with QR Codes. Microsoft Tag provides a next-generation solution that offers many useful improvements.
Tag is an end-to-end system that provides many capabilities beyond simply opening a URL, and is built upon an architecture that allows for new functionality to be added over time. Instead of just opening a URL, the Tag system leverages dedicated client software and a cloud-based back-end to provide functionality that just isn’t possible with earlier QR Codes. For example, the Tag system has built-in reporting to let you know how your Tags are being scanned, and enables you to provide integrated solutions that span multiple Tags and sessions. And over time, it can provide many other value-added services.
The new bar code format itself also provides many advantages. Tags can be created in a much smaller size than older bar codes and can be read faster and under a wider range of lighting conditions. Tag provides the option to make Custom Tags that full integrate your brand’s personality into the Tag itself, creating colorful, visually exciting codes that don’t distract from your message. Learn more about how to create Custom Tags.
Here are just some of the reasons to use Microsoft Tag:
Adaptable Size
Tag's small size makes it a perfect choice for use in printed materials and visual media forms.
Customized Look and Feel
It's easy to customize the look of a Tag to reflect the personality of the person or a brand.
Single Source
All Tags report back to a single source, ensuring a high consistency in user experience across multiple devices and platform types.
Reliability of Reads
Overcomes limited camera phone optics, resolution, and processing power.
Advanced Analytics
Captures the number of click-throughs and scans of a particular Tag, as well as the resulting responses.
The Tag Reader application runs on all the major phone platforms, and users can instantly download the app from a single site. Even better, unlike older formats, every Microsoft Tag can be read by every Tag Reader, so there is no consumer confusion that results from incompatible solutions. Tags just work.
More about tag visit...

Friday, July 30, 2010

How to Scan Barcodes with Bing for iPhone

Earlier, the Bing iPhone app was updated with a barcode scanning function, meant to be used for comparison shopping purposes. If you’re wondering how this works, the Bing blog has just provided a handy how-to.

However, I noticed a couple of things about the way the instructions were written over there that may be confusing to new users. For one, you don’t “click” anything – you “tap.” Also, the camera is not an icon, it’s text. And you only tap to take a photo when you’re scanning cover art, not barcodes.

Based on my experiences with the Bing app, here’s how I would explain it to new users:

  1. From the Bing’s homepage, tap the word “camera” at the bottom of the page. This launches the iPhone’s camera.
  2. Point the camera at a barcode or, if a book, CD, DVD or video game, you can just point the camera at the cover art.
  3. If a barcode, the app will automatically recognize the code and perform a search. For cover art, you’ll need to tap to take a photo first.
  4. Bing will then search for results. When it finds a match, it’s displayed in a box at the bottom labeled “1 result.” (I’ve yet to scan anything where it finds more than 1 result, but that could happen, I suppose).
  5. Tap the thumbnail to see the result details. Here, you’ll find a description, images, rating, reviews and links of where to buy.

Thursday, July 29, 2010

First Microsoft Hohm Gadget Has Launched

Microsoft is launching its first Hohm-enabled gadget courtesy of a partnership with Blue Line Innovations, a Canadian-based company which sells energy monitoring and management devices. Hohm, for those unaware, is a web service designed to help consumers monitor and analyze their energy consumption and then make recommendations for cost-savings measures.

Previously, using the Hohm website, the Q&A section would have to be filled out based on what you knew about your home – but unless you already had energy-monitoring gadgets installed, your answers were estimates in several cases.

Now, with the new Hohm PowerCost Monitor and WiFi Gateway, you’ll have hard data.

The device hooks up to your home’s power meter (no wiring required!) and reads actual usage. The details are transmitted to your Microsoft Hohm account which displays the data in near real-time graphs and charts (delays are 30 seconds or so). You can also view the data from a mobile device, if desired.

This is only the beginning for Hohm-enabled gadgets: Microsoft plans to connect Hohm with smart plugs, thermostats, HVAC systems, electric vehicles (it’s already in the Ford Focus Electric) and more.

The Blue Line PowerCost Monitor and Wi-Fi Gateway are available today from Blue Line Innovations and through select retailers like Frys, Amazon, and Microsoft stores. The complete package of PowerCost Monitor and Wi-Fi Gateway is available for $249, the Wi-Fi Gateway is

also sold separately for $159.

Wednesday, July 28, 2010

Skype SDK Now Available for Windows

Developers interested in integrating Skype into their applications can now request access to Skype’s new SDK, called SkypeKit. Available in beta format as of June 14th, the Windows version of the developer’s kit works on Windows x86 operating systems.

Access to the kit is on an invite-only basis at the moment, and interested developers have to go to Skype’s website and fill out an online form detailing their user and organization info.

SkypeKit will allow the integration of voice and video calling and/or IM features into third-party desktop applications or compatible Internet-connected hardware devices. It also offers Skype’s super wideband audio, based on the SILK codec. Developers who use SkypeKit will be able to describe their apps as “plugged into Skype” in their marketing materials, notes a company blog post about the announcement.

To request an invite to the program, you can head over here to the sign up page now.

Microsoft Research Shows off Street Slide View

Engadget (via MIT’s Technology Review) uncovered a cool Microsoft Research project called “Street Slide” view. The project attempts to create a new interface for viewing the street-level photos used in online applications like Bing Maps Streetside View.

As explained on the project’s homepage, today’s mapping applications enable users to virtually visit cities by way of “immersive 360 degree panoramas, or bubbles.” Users move from bubble to bubble, but this doesn’t necessarily provide the best visual sense of a city street.

With Street Slide, the researchers took the best aspects of the “immersive bubbles” and transformed them into multi-perspective strip panoramas. You can actually slide out of a bubble to see the street from a different perspective – a strip that’s viewed from a greater difference. When viewed in this mode, the empty space above and below the strip could be used for business logos and building numbers (addresses), or even ads.

According to the MIT article, the researchers have already made a version of this technology for mobile devices, including the iPhone. “It broadens out your visual sense to cover a two-block radius,” says Michael Cohen, a senior scientist at Microsoft Research.

Who’s hoping for a WP7 phone implementation of this tech? I know I am. In case I didn’t explain this too well, you can see Street Slide in action in the video here.

Introduction to Project Hilo

Get Microsoft Silverlight

Project “Hilo” is a series of articles and sample applications that demonstrate how you can leverage the power of Windows 7, Visual Studio 2010 and Visual C++ to build high performance, responsive rich client applications. Hilo provides both source code and guidance that will help you design and develop compelling, touch-enabled Windows applications of your own. Join Yochay Kiriaty and James Johanson for an introduction of Project Hilo, a quick tour of its architect and design principles.

Additional information about the project can be found in the Introducing Project HILO post, and on MSDN – Hilo: Developing C++ Application for Windows 7