Context menu overload in visual studio 2005

July 14, 2007 1 comment

After uninstalling Resharper 2.5 and installing Resharper 3.0  I was greeted with two Resharper menu’s and one Refactor menu from vs.net2k5. Here’s some help to remove those context items and annoying menu’s (via IntelliJ forums):

1. Go to Tools ->Customize , at this point all the menu items in vs.net are customizable.

2. Choose the menu item, drag it and throw away (drop it off somewhere inside vs.net)

3. To remove context menu items, after step 1.  Turn on context menu in and repeat 2.

Screenshots:

image image image

Categories: Uncategorized

AJAX is not for everything

September 30, 2006 Leave a comment

 

I have over 1000 feeds now and I have been using RSS Bandit exclusively for reading my feeds. Since I have been away from my home computer for sometime now I decided to import my opml to google reader.

I have used their older version and found it to be completely useless. Eventhough I know that rss reading is different from emails, I needed the ability to mark items as read so that I can keep my rss reading list tidy. I guess this would be the most basic feature that was absent in the older google reader.

<rant>Since I saw the announcement for the new google reader I thought I’ll give it a second chance. The stupid reader crawls with my list. AJAX is more of an annoyance than a feature here. I wish there was a way to turn the AJAX off and give the plain simple HTML page. I can live with postbacks but crashing and unresponsive browsers is most annoying. People behind the AJAX bandwagon please realize that AJAX is not the panacea for poor interface. Just because its cool doesn’t mean it could work everywhere. I guess two sloppy applications from google are the spreadsheets (why use an online spreadsheet when U can attach an Excel file in a email?) and google reader. </rant>

Google maps are great, not the best in directions.. but the street level views is cool. 

I highly recommend bloglines. By far the fastest web based rss reader. Minor annoyances with the UI is something I can trade off with the speed at which it displays my rss items…no more chocking browsers.

 

btw.. the last two posts were published from Windows Live Writer which rocks! One of the sweetest applications I have used. Simple, Intuitive (I haven’t hit the F1 key) and fast. Great job on this MS!

Categories: Uncategorized

ASP.NET Adding Dynamic Controls in EventHandlers

September 18, 2006 Leave a comment

As most of you guys know, adding controls dynamically to aspx pages is a pain. There is always a tricky situation that messes up the eventhandling or viewstate or diffuculties in walking through the child controls through the container controls like placeholder. I faced one such with dynamic controls being added in a button.click handler. Just so that you or I can save some time here are some reads to look for before you use dynamic controls in your application:

Page Lifecycle

  1. http://msdn2.microsoft.com/en-us/library/ms178472 (read everything)
  2. http://www.eggheadcafe.com/articles/20051227.asp 

(Peter’s table is great in 2. Pay attention in particular to events LoadViewState, ProcessPostData1, ProcessPostData2 and their order in Page’s timeline. And then read about it from Dino’s excellent article abt ProcessPostData1 and ProcessPostData2 sweeps here. Then read everything Scott has to say:

Scott‘s Articles

  1. Dynamic Controls in ASP.NET
  2. Working With Dynamically Created Controls
  3. Dynamic Web Controls, Postbacks, and View State
  4. Control building and ViewState Redux
  5. Tip: When Adding Dynamic Controls, Specify an ID

In short these are the general things that you would want to do to ensure all work smoothly.

1. Add new control to a placeholder’s control collection.

eg:

TextBox myTxtBox = new TextBox();
myPlaceHolder.Controls.Add(myTxtBox);

2. Only after step 1, set the attributes for the dynamically created control.

myTxtBox.ID ="myDyna"
myTxtBox.Text = "Hello! I am Dyna"

3. Ensure you specify the ID’s for the controls you add.

4. If controls are dynamically created in an EventHandler like Button.Click or DropDownList.SelectedIndexChanged then follow the pattern in Dino’s article. Which if I may summarize is to:

  • Isolate Control Factory methods from EventHandlers
  • Use ViewState or some other persistent flag (dropdownlist.SelectedIndex != -1, etc) to check if the controls have been added dynamically.
  • If the flag is true then re-create them again in page load so that during ProcessPostData events the controls are found and viewstate restored for them from the temporary collection as described in Dino’s article.
Categories: Uncategorized

Launchy

June 22, 2006 Leave a comment
I have mentioned earlier about how much I like slickrun and how I had made a magic word  list for common tasks.
Omar mentioned about Launchy and I have been trying it for couple of days and I love it.
 
It has a prettier UI , note the transparant border with visual studio in the background  in the picture below, and it indexes directories and files on it own so its intellisent out of the box, note that I had to type only ‘w med’ to launch windows media player.
 
Quick, non intrusive, recommended.
Categories: Uncategorized

Using Windows Media Player as the Universal Player

 
Update2:
 
Jon has packaged this properly and put up in his tools website. Please download by clicking the image above.
 
Update1: modified original code as per Jon’s suggestion 
 
I was tired of having too many media players (iTunes, QuickTime, Real, WinAmp) and wanted just my windows media player do all the stuff. This is what I did:
 
Uninstalled all third party players ( I love WinAmp, so may be I’ll come back to it later)
Installed Klite Mega Codec pack and used "5. Lots of stuff" option while installation, this took care of most of the stuff.
Installed OpenPLSinWM from Jon for my shoutcasts
 
Modified OpenPLSinWM , you can download here: so that I can listen to AAC+ streams
 
Note: For aac+ support in Windows Media Player, please install orban plugin
 
code:
1using System.IO;
2using System.Net;
3using System.Text.RegularExpressions;
4
5 namespace OpenPLSinWM
6
7{
8class OpenPlsInWM
9
10 {
11 [STAThread]
12 static void Main(string[] args)
13 {
14
15    if (args.GetUpperBound(0) > -1)
16    {
17
18        string filename = args[0];
19
20        using (StreamReader sr = new StreamReader(filename))
21        {
22        string pls = sr.ReadToEnd().ToLower();
23        Regex  http = new Regex(@"http://(.*)");
24        string url = http.Match(pls).Value;
25
26        WebResponse wres = WebRequest.Create(url).GetResponse();
27
28        //if aac+ stream replace http with icyx to play with orban
29
30        if(wres.Headers.Get("content-type")=="audio/aacp")
31        url=url.Replace("http","icyx");
32
33
34        if(url!=string.Empty)           
35        System.Diagnostics.Process.Start("wmplayer.exe",url);
36
37        else
38        Console.Write("could not read stream url info");
39
40        }
41    }
42
43
44    else
45
46    {
47         Console.WriteLine("Usage: OpenPlsInWM "playlist.pls"");
48         Console.WriteLine("Associate PLS file extension with this application to allow Windows Media Player to play them.");
49    }
50  }
51 }
52}
53

Adding A9 as the search provider for IE7

May 31, 2006 1 comment
IE7 uses a cool open search provider method (called opensearch!) to add search engines in addition to the defaults (google, msn search and msdn). It was funny that this open search method  is actually from A9 and A9 itself wasn’t listed in IE’s search provider page. I know its darn simple to add, and as a matter of fact it was so simple that I have created one.
Click here and click on a9.html file to install A9 as search provider for IE7. I love A9 especially since its powered by windows live, the clean interface is also a plus. I know there are many other search aggregators but I feeling happy about A9.

Using Live.com as default search engine in Firefox

I have been using live.com for all my searches and it really looks good. More so, I wanted to test and see if I can use live.com as the default search engine for firefox (its quite easy to do in IE7). So here you go:

type about:config into the address bar
in the config screen , type "search" as the filter
look for browser.search.defaulturl and modify the value to
http://www.live.com/#q=
I’ll update later to see if I am completely google search free. Not that I dont like google, just a way to entertain myself.

Categories: Uncategorized
Follow

Get every new post delivered to your Inbox.