Skip to main content

Microsoft DevCamps

· One min read

I had participated in Microsoft DevCamps for Windows Application Development @ Regenta One hosted by Microsoft -

I am the winner of 2nd prize for development of Windows 8.1 App - In Hackathon.

DevCamp

Visual Studio 2013 Update 1 for download

· 2 min read

In a blog post, S. Somasegar, Corporate Vice President of Microsoft Developer Division clearly mentioned that: “This is a targeted update, addressing some key areas of customer feedback since the Visual Studio 2013 release. For example, we heard your feedback about running Visual Studio in environments without IE10+, and have made several improvements to this experience in Update 1.” New features for developers include:

  • IntelliTrace Viewer users should note that it's been updated to support Internet Explorer 9.
  • A new version of Microsoft ASP.NET Web Frameworks and Tools (version 5.0.11213.0). It adds editing support for ASP.NET MVC 5.1 on top of all existing functionality from the Web Framework and Tools 5.0 release.
  • A new version of Nuget, 2.7.2. It fixes a bug which caused certain packages to fail when running package restore, update or uninstall.
  • Web tool, SignalR 2.0.1, which includes new item templates.

Download

How to execute a command in Visual C++

· One min read

There are basically four methods to run a command in Visual C++. WinExec is provided only for compatibility with 16-bit Windows. Applications should use the CreateProcess function.

· system(), _wsystem() · ShellExecute() or ShellExecuteEx() · CreateProcess() · WinExec()

Win32: How do I get the name of files in a folder ?

· One min read

To get the name of files in a folder,

  1. call the FindFirstFile function to open a search handle and get information about the first file that the file system find in the folder.

  2. call the FindNextFile function to continue listing files from a previous call to FindFirstFile.

WIN32_FIND_DATA FindFileData; 
HANDLE hFind;
TCHAR *FilePathBuff = L"C:RequiredFolder";
hFind = FindFirstFile(FilePathBuff, &FindFileData);

if (hFind == INVALID_HANDLE_VALUE) {
printf(TEXT("FindFirstFile failed (%d)n"), GetLastError());
}
else
{
printf(TEXT("The first file is %sn"), FindFileData.cFileName);
while (FindNextFile(hFind, &FindFileData) != 0)
{
printf(TEXT("The next file is %sn"), FindFileData.cFileName);
} FindClose(hFind);
}

MFC: Enumerate all views of the document

· One min read

To Enumerate all views of the document the CDocument class provides GetFirstViewPosition and GetNextView member functions to enumerate all views associated with the document. We call view’s OnUpdate function to communicate with them.

void EnumerateViews()
{
//get the position of the first view in the list
//of views associated with the document.
POSITION pos = GetFirstViewPosition();

//terate through all of the document's views.
while (pos != NULL)
{
CView* pView = GetNextView(pos);

//update view
pView->OnUpdate(pSender, lHint, pHint);
}
}

C#: Generate xsd and class for an XML document

· One min read

Using xsd.exe which will be install with the Visual studio can be used.
Open Visual Studio Command Prompt and use the following commands

Setting environment for using Microsoft Visual Studio 2010 x86 tools.

C:Program Files (x86)Microsoft Visual Studio 10.0VC>cd C:

C:>xsd CPPData.xml

Microsoft (R) Xml Schemas/DataTypes support utility [Microsoft (R) .NET Framework, Version 4.0.30319.1] Copyright (C) Microsoft Corporation. All rights reserved. Writing file 'C:CPPData.xsd'. C:>xsd CPPData.xsd /classes Microsoft (R) Xml Schemas/DataTypes support utility [Microsoft (R) .NET Framework, Version 4.0.30319.1] Copyright (C) Microsoft Corporation. All rights reserved. Writing file 'C:CPPData.cs'. C:>

C#: How to Select a random item from a List

· One min read
using System; 
using System.Collections.Generic;
namespace RandomSelect {
class Program {
static List lst = new List();
static void Main(string[] args) {
lst.Add("1");
lst.Add("2");
lst.Add("3");
lst.Add("4");
lst.Add("5");
lst.Add("6");
lst.Add("7");
lst.Add("8");
lst.Add("9");
lst.Add("10");
Random rndElement = new Random();
foreach (string i in lst) {
string s = lst[rndElement.Next(lst.Count)];
Console.WriteLine(s);
}
}
}
}

Visual Studio 2008, 2010 Auto Uninstall Tools

· One min read

If you’ve any problems in uninstalling Visual Studio 2008, 2010 from Add/ Remove programs in XP or from Programs and features in Windows  7 you can use Microsoft Visual Studio 2008 Auto uninstall utility to remove Visual Studio 2008 and Visual Studio 2010 Auto uninstall utility to remove Visual Studio 2010 editions from your Computer .

1. Microsoft Visual Studio 2008 Auto Uninstall Tool

Download here

2. Microsoft Visual Studio 2010 Auto Uninstall Tool

Download here

what is the output

· One min read
# include <iostream>

using namespace std;

int main() {
int a=10,b=2;
b = a+++a;
cout<<b<<" "<<a<<"n";
return 0;
}

OUTPUT 20 11
Tags: