Saturday, April 28, 2012

Hello Metro application using C++, with Button click event handler.

Continuous work from the last post "Create Metro style Hello World in C++ using Microsoft Visual Studio 11 Express for Windows 8 Beta".

- Add a button
With BlankPage.xaml opened. Drag a Button from ToolBox on the Design Panel, place anywhere you want.
With the Button selected, edit in Properties panel to change its Name to "myButton", and change Content under Common to "Click Me".
It can be noticed that <Button> in BlankPage.xaml will be updated accordingly.

- Name the TextBlock
With the TextBlock selected, edit in Properties panel to change its Name to "myText".

- Insert Button click event handler
Double click on the Button in Design panel. It will insert Button click event handler, helloMetroC::BlankPage::myButton_Click(), in BlankPage.xaml.cpp automatically.

And Click="myButton_Click" will be added in <Button> in BlankPage.xaml.
    <Grid Background="{StaticResource ApplicationPageBackgroundBrush}">
        <TextBlock x:Name="myText" HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="50" Text="Hello Metro" />
        <Button x:Name="myButton" Content="Click Me" HorizontalAlignment="Left" Margin="552,519,0,0" VerticalAlignment="Top" Width="263" Click="myButton_Click"/>

    </Grid>

- Add code in Button click event handler 
Switch to BlankPage.xaml.cpp, and insert the code in the function helloMetroC::BlankPage::myButton_Click().
void helloMetroC::BlankPage::myButton_Click(Platform::Object^ sender, Windows::UI::Xaml::RoutedEventArgs^ e)
{
 myText->Text = "Thanks";
}


- Build and Run
When the application running, click on the Button will make the TextBlock change. That's.




Friday, April 27, 2012

Overview (C++/CX)

Visual C++ component extensions (C++/CX) is a set of extensions to the C++ language that enable the creation of Windows Metro style apps and Windows Runtime components in an idiom that is much simpler and more natural than the traditional COM programming model. Use C++/CX to write Metro style apps and easily interact with Visual C#, Visual Basic, and JavaScript, and other languages that support the Windows Runtime. In those rare cases that require direct access to the raw COM interfaces, or non-exceptional code, you can use the Windows Runtime C++ Template Library.

Read the document Overview (C++/CX) in msdn.microsoft.com.

Create Metro style Hello World in C++ using Microsoft Visual Studio 11 Express for Windows 8 Beta

- New a Project in Microsoft Visual Studio 11 Express for Windows 8 Beta, using template of Visual C++, Windows Metro style, Blank Application, name it helloMetroC.

- The wizard will generate a dummy application for you.

- Double click on the BlankPage.xaml from the Solution Explorer, to start edit it.

- Click TOOLBOX on the left side border, to expend the Toolbox panel. Click to expend Common XAML Controls, drag a TextBlock on the Design Pane.

- Now, you can see a TextBlock in the design view, and a new element of <TextBlock> in XAML view.


- We can edit the XAML directly.
Modify the content of <TextBlock> element like it:
    <Grid Background="{StaticResource ApplicationPageBackgroundBrush}">
        <TextBlock HorizontalAlignment="Center" VerticalAlignment="Center" FontSize="50" Text="Hello Metro" />

    </Grid>


- Select Save All from File menu, to save the solution.

- To build the solution, Build Solution from Build menu (or press F7).

- Run it by clicking on the Play button, or Start Debugging from Debug menu, or press F5 directly.


Next:
- Hello Metro application using C++, with Button click event handler.

Tuesday, April 24, 2012

Windows 8 Release Preview will be released at the first week of June

Announced from Japan's Windows 8 Dev Day, via Twitter @BuildWindows8, Windows 8 Release Preview first week of June.


Create Metro style app in Visual Studio 11 Express Beta for Windows 8

Now you can develop Metro style application on Visual Studio 11 Express Beta for Windows 8.

Test platform
  • A low grade Netbook, BenQ Joybook Lite U101.
  • CPU: Atom N270 1.6 GHz.
  • External Monitor!
  • OS: Windows 8 Consumer Preview.
  • IDE: Visual Studio 11 Express Beta for Windows 8.

- Install and start Visual Studio 11 Express Beta for Windows 8, on machine with display resolution higher than 1024 x 768.

- Click New Project...

- Select Template of Visual Basic - Windows Metro style, Grid Application, name your project (ex. testMetro), and click OK.

- Visual Studio 11 Express Beta will generate a dummy Metro style application, now you can click the Run button to start it.

- The generate Metro style application.
Metro style application

! Please note that in order to develop Metro style application, you MUST have a monitor with resolution higher than 1024 x 768.
you MUST have a monitor with resolution higher than 1024 x 768


Tuesday, April 17, 2012

Windows 8 will be available in three version

Announced in The Windows Blog - Announcing the Windows 8 Editions:

Windows 8 is the official product name for the next x86/64 editions of Windows.

For PCs and tablets powered by x86 processors (both 32 and 64 bit), we will have two editions: Windows 8 and Windows 8 Pro. For many consumers, Windows 8 will be the right choice. It will include all the features above plus an updated Windows Explorer, Task Manager, better multi-monitor support and the ability to switch languages on the fly (more details on this feature can be found in this blog post),which was previously only available in Enterprise/Ultimate editions of Windows. For China and a small set of select emerging markets, we will offer a local language-only edition of Windows 8.

Windows 8 Pro is designed to help tech enthusiasts and business/technical professionals obtain a broader set of Windows 8 technologies. It includes all the features in Windows 8 plus features for encryption, virtualization, PC management and domain connectivity. Windows Media Center will be available as an economical “media pack” add-on to Windows 8 Pro. If you are an enthusiast or you want to use your PC in a business environment, you will want Windows 8 Pro.

Windows RT is the newest member of the Windows family – also known as Windows on ARM or WOA, as we’ve referred to it previously. This single edition will only be available pre-installed on PCs and tablets powered by ARM processors and will help enable new thin and lightweight form factors with impressive battery life. Windows RT will include touch-optimized desktop versions of the new Microsoft Word, Excel, PowerPoint, and OneNote. For new apps, the focus for Windows RT is development on the new Windows runtime, or WinRT, which we unveiled in September and forms the foundation of a new generation of cloud-enabled, touch-enabled, web-connected apps of all kinds. For more details on WOA, we suggest reading this blog post which shares more detail on how we have been building Windows 8 to run on the ARM architecture.


Details: http://windowsteamblog.com/windows/b/bloggingwindows/archive/2012/04/16/announcing-the-windows-8-editions.aspx

Monday, April 16, 2012

Visual C++ language reference (C++/CX)

Visual C++ has a revolutionary new native C++ programming model for creating Windows Metro style apps and components. In the new model, native C++ can interop directly with JavaScript and managed code without requiring intermediate software layers.

By using the new model, you can create:
  • C++ Metro style apps that use XAML to define the user interface and use the native stack.
  • C++ Windows Runtime components that can be consumed by JavaScript-based Metro style apps.
  • Metro style DirectX games and graphics-intensive apps.

[This documentation is for preview only, and is subject to change in later releases.]

Details: http://msdn.microsoft.com/en-us/library/windows/apps/hh699871

Get Visual Studio 11 Express Beta for Windows 8 to build Metro style apps


Microsoft Visual Studio 11 Express Beta for Windows 8 is your tool to build Metro style apps. It includes the Windows 8 SDK, Blend for Visual Studio, and project templates.

link: http://msdn.microsoft.com/en-us/windows/apps/hh852659

You can use the tools in Visual Studio 11 Express Beta for Windows 8 to create Metro style apps for Windows 8. The tools include a fully featured code editor, a powerful debugger, a focused profiler, and rich language support that you can use to build apps that written in HTML5, JavaScript, C++, C# or Visual Basic. Visual Studio 11 Express Beta for Windows 8 also includes a device simulator that you can use to test Metro style apps on multiple form factors.

Related: - Create Metro style app in Visual Studio 11 Express Beta for Windows 8

Thursday, April 12, 2012

FREE eBook: Windows Phone Toolkit In Depth - 2nd edition

Windows Phone Toolkit In Depth - 2nd edition
Free eBook Windows Phone Toolkit In Depth 2nd edition - 2nd Edition, by Boryana Miloshevska from Windows Phone Geek team. The book covers in depth all controls from the Microsoft Silverlight for Windows Phone Toolkit.
  • 250 Pages
  • Publish Date: 15 Dec 2011
  • Includes all controls from the Windows Phone Toolkit Nov 2011!
  • 22 Chapters!
  • Full Source Code
  • Based on Windows Phone 7.1 (aka 7.5) Mango!


Download here.

Monday, April 9, 2012

Windows Phone 7 XNA Cookbook


Written in a cookbook style, this book offers solutions using a recipe based approach. Each recipe contains step-by-step instructions followed by an analysis of what was done in each task and other useful information. The cookbook approach means you can dive into whatever recipes you want in no particular order. If you are an aspiring programmer with some basic concepts in C# and object-oriented knowledge who wants to create games for Windows Phone 7, this book is for you. This book is also for the experienced programmers want to transfer from Windows or Xbox to the Windows Phone 7 platform. Only basic knowledge of C# and .Net is required.

About the Author

Zheng Yang

Zheng Yang is a hands-on technical leader with 5 years combined professional experience providing core development engineering for consumer-facing applications of global Microsoft and as an independent game developer. He is a dynamic, results-oriented developer with a proven history of providing innovative solutions to complex technical problems. When he was a student, he got the recognition from Microsoft Research Asia and Microsoft Imagine Cup Team. Zheng Yang has advanced technical knowledge of key development technologies including C#, the .NET framework, C++, Visual Studio, DirectX and SQL Server. Solid expertise across the full life cycles of both software development and game production.



Thursday, April 5, 2012

Visual Studio Toolbox: Building Metro Style Apps with XAML


How you can use Visual Studio 11 to start building Metro style apps for Windows 8. The video will focus on using XAML and will show you how to use each of the three project templates Visual Studio provides. And then demonstrate building an app that uses real data instead of sample data.

Monday, April 2, 2012

Nokia Lumia 900 4G Windows Phone


Product Features

  • 4G LTE-enabled smartphone with Windows Phone 7.5, 4.3-inch AMOLED Display, and dual-core 1.4 GHz processor
  • Wireless-N Wi-Fi networking (with optional Wi-Fi Mobile Hotspot service)
  • 8-MP camera with Carl Zeiss Optics; HD 720p camcorder; front-facing video chat camera; Bluetooth stereo music; 16 GB memory; corporate and personal e-mail
  • released in April, 2012
  • What's in the Box: handset, rechargeable battery, wall/USB charger, connectivity cable, SIM tray tool, Product Safety & Warranty Guide, Quick Reference Guide

Dimensions

  • Size (LWH): 2.7 inches, 0.45 inches, 5 inches
  • Weight: 5.6 ounces

Product Features

  • Network Compatibility: GSM
  • Network Compatibility: LTE
  • Minimum Rated Talk Time: 420 minutes
  • Minimum Rated Standby Time: 300 hours