Most of the SharePoint developer will know this. But I just thought of sharing this tip here.
This JavaScript will open the tool pane for that particular web part. Similar to OOTB web parts functionality.
The user doesn't have to click the down arrow of the web part and say modify the web part.
protected override void RenderWebPart(HtmlTextWriter output)
{
EnsureChildControls();
try
{
output.Write("To modify the web part,<a target=\"_self\" href=\"javascript:MSOTlPn_ShowToolPaneWrapper('{0}', '{1}', '{2}');\"> click here to open the tool pane</a>",1,129, this.ID);