Tuesday, June 22, 2010

I liked todays Manorama Metro ...

1 comment:
I was wondering why there is no reports on the road condition in Ernakulam. Wonder why no one is interested in a public issue like this. I have posted this issue in Facebook and Google Buzz. But everybody is interested in chat and all...
The road condition in the city is very pathetic. This is not supposed to be happen in this Gods Own Country. The concerned officials are keeping their eyes shut and its already too late to wake up. And the thing which should be noted is that it has been hardly one year since these roads were tarred..
In this rainy reasons these roads are a real threat to our lives. There is a good chance we will get painted in brown. These things show the corruption, lack of planning, wastage of resource and money in the concerned authority. I have a lot to say, now stopping here...
Wrote his post because i have seen these important things in front of us seems not be unimportant thing for us..

connect silverlight with ms sql server

No comments:
1. File->New Silverlight Application  and name, say “silverlight_wcf_sql”
2. Check the checkbox to host the silverlight application in a new web application “silverlight_wcf_sql.Web”
3. Silverlight page design
xaml_design
4. Add a new WCF Service and name it sql_wcf.svc
5. Add a method say “GetName()” like

[OperationContract]
public string GetName()
{
//refer attached file
}

OperationContract attribute above the method name indicates that this method can be called from a WCF client.
  • Refer the sample project attached.
6. Right click the Silverlight Application “silverlight_wcf_sql” and add Service Reference. Add “sql_wcf.svc” as Service Reference and name it “Silverlight_wcf_service_reference”
7. Go to MainPage.xaml and double click the button to generate BtnClickMe_Click event and type the code

private void BtnClickMe_Click(object sender, RoutedEventArgs e)
{
BtnClickMe.IsEnabled = false;
Silverlight_wcf_service_reference.sql_wcfClient myclient = new Silverlight_wcf_service_reference.sql_wcfClient();
myclient.GetNameCompleted += new EventHandler(myclient_GetNameCompleted);
myclient.GetNameAsync();
txtBlkSQL.Text = "Receiving data...";
LbMessage.Content = "http://www.rodriguesjax.blogspot.com";
}


void myclient_GetNameCompleted(object sender, Silverlight_wcf_service_reference.GetNameCompletedEventArgs e)
{
txtBlkSQL.Text = (string)e.Result;
BtnClickMe.IsEnabled = true;
}


Click here to download silverlight_wcf_sql.rar
use visual studio 2010

Sunday, June 20, 2010

Global hotkeys for windows media player

No comments:

Use media player just like Winamp.. use global hotkeys to control media player even when it is no longer in focus or it is minimized.

Install the plug-ins ‘Wmpkeys’. To customize go to options->Plug-ins and select the category Background. Then click Properties button to customizing its settings.

Hide windows live messenger icon or windows live mail icon to system notification

1 comment:

Hi, its easy to send the task bar icon of windows live mail or windows messenger to system notification area..

  1. Right click the program shortcut icon in All programs in start menu.
  2. Click Properties –> Compatibility tab
  3. use Compatibility mode for ‘Windows Vista (Service Pack 2) and click OK.
  4. Now open the program as usual and right click the icon in notification area.
  5. Check the option ‘Hide window when minimized’ and for messenger the there is no need of step 5.
  • Now you can see the program running in background just like in Windows Vista.

Wednesday, June 9, 2010

Getting started silverlight

No comments:
  • Open Visual Studio and Click File->New Project… And Select Silverlight Application in Silverlight Templates. You can give a name to the project say MyFirstApplication and click OK.Add new project
  • This is to select whether you need to add a web application in the solution to host the silverlight file(xap). This is optional depending upon your requirement. This is similar to adding projects to a solution.
Host silverlight in a new project
        • Drag and drop a Button and TextBlock control from the ToolBox in MainPage.xaml. You may adjust the width of TextBlock. Then double click the button to go to the ‘button1_Click’ event in the code file(MainPage.xaml.cs).  You may be able to see other available events for the control in the Events tab in Properties window. Double click a event to go to the particular event.
Add the code in the MainPage.xaml.csType the code below in the button1_Click event assuming Button name is ‘button1’ and TextBox name is textBlock1
private void button1_Click(object sender, RoutedEventArgs e)
{
    textBlock1.Text = "Hello, Welcome to silverlight";
}
  • Press F5 to start debugging the silverlight application.
Press F5 to start debugging the application

Click here to download the sample file

Share it Facebook  Twitter