csharp windows gadget



Using C# you can have your  own Windows 7. Desktop Google Gadget. Now you can  Search any web , image , Android application or even a  You tube Video directly from Your Desktop. In this tutorial we will teach you to build your own Windows 7 Desktop Google Gadget.

 First of all you may notice that above form is border less and if you make your form border less  you  won't  be able to move it after debugging your application. so for this you have to study one of our  Tutorial on  how to move Borderless form.

using System.Diagnostics;
//Design  your form  and then  you have to  following code in  Go button .
private void gobtn_Click_1(object sender, EventArgs e)     
  {
         if (webrbtn.Checked == true)
Process.Start("https://www.google.com.pk/?gws_rd=cr&ei=qHlKUobnMqSN4ATH_4CIBQ#q=" + txt.Replace(" ", "+"));

else if
                (img_rbtn.Checked == true)

Process.Start("https://www.google.com.pk/search?q="+txt+"l&um=1&ie=UTF-8&hl=en&tbm=isch&source=ogsa=Ntab=wi&ei=FnxKUrbqDKbR4QT5z4DQBw#hl=en&q=" + rep + "&tbm=isch&um=1");

else if
               
           (playrbtn.Checked == true)
Process.Start("https://play.google.com/storehl=en&q="+rep+ "&bav=on.2,or.r_cp.r_qf.&bvm=bv.53371865,d.bGE,pv.xjs.s.en_US.i8jRULGL-Ys.O&biw=1280&bih=913&dpr=1&ie=UTF-8&sa=N&tab=i8");


      else if
(youtuberbtn.Checked ==true)

Process.Start("https://www.youtube.com/results?search_query="+rep+"&oq="+rep+"&"gs_l=youtube.3..0l10.711.3520.0.3682.16.10.0.0.0.0.694.3126.3j0j1j5-4.8.0...0.0...1ac.1.11.youtube.kzRdIqQpQ-Y");

}

private void searchtb_KeyDown(object sender, KeyEventArgs e)
    {
       if (e.KeyCode == Keys.Enter)
       {
       gobtn_Click_1((object)sender, (EventArgs)e);
        }
    }

No comments:

Post a Comment

Sending SMS Via Windows Form Application Using any Android Smart Phone  Source Code  using System ; using System . C...