Manually initiating IntelliSense in Visual Studio



Sometimes when coding in Visual Studio, IntelliSense just doesn’t work immediately. You press period (‘.’) and don’t see any response, don’t see any data members listed. This can be quite annoying.

It is normally believed and discussed that IntelliSense cannot be initiated manually. But there is a trick.

If you don’t see the data members listed when it should, just change the configuration from Debug to Release and back to Debug from the Standard toolbar. You will immediately see “Updating Intellisense…” in the status bar.

This is quite a relief sometimes.



IconDock – Impressive Stock Icons



I am very much impressed with a stock icons vendor IconDock. They have limited but very nice icon set. What is special about them is that they sell individual icons too.

Their website is very well designed.

Here are some of their limitations (as of today):

  • They sell only 16×16, 32×32 and vector sets. It is developer’s responsibilities to use a vector image editing software such as Adobe Illustrator to edit their vector sets to any size they want. Not all developers (especially uISVs) own a license to Adobe Illustrator.
  • They do not design custom icons. If you don’t find all the required icons in their icon sets then you are stuck. You can get the additional icons done by them.


ClipSpy – Keep a watch on clipboard contents



One tool I use quite often when developing products is ClipSpy.

It lets you see the contents of the Clipboard. A clipboard may have multiple formats stored. ClipSpy lets you analyze each format, see its data etc.

Yesterday, it helped me track the format in which Gmail accepts a file attachment via drag and drop (works only in Google Chrome browser). It uses the CFSTR_FILENAME clipboard format.

Earlier, when developing RecentX, it helped me track the clipboard formats that Windows Explorer uses when copying files.

Thanks.



Predict the tech future with Engadget blog



Engadget Logo

Engadget blog gets you very interesting tech news at your desk. It’s about gadgets such as laptops, desktops, mobile phones, cars or any new electronic items. You can see the market trends and make appropriate decisions for your business. What mobile phone platform is popular, which is not worth concentrating on. This is why I subscribe to this blog.

Thanks.



theform.__eventtarget is null or not an object



If you get this error in your aspx page, you may end up spending several hours (like i did) before finding the actual cause. Actually, this error could cause due to multiple reasons. One of the reason is mentioned below:

ASP.Net generates a lot of javascript, form code etc based on the web form. When generating objects, it assigns an ‘id’ to it. If that ‘id’ clashes with one of our web form ids, you might see this error “theform.__eventtarget is null or not an object“.

A common scenario is when assigning an id to forms. ASP.Net automatically generates forms with ids form1, form2 etc. If your web form also contains the same id, then you might see this error.

Thanks.



SendInput Function



We had to use the “SendInput Function” to send keystrokes to any active window in our program PikyFolders.

We had troubles using it first. We also referred to many other samples on the Internet. But still it was not clear that after sending every keystroke we must also send the same keystroke with the KEYEVENTF_KEYUP flag to indicate that the key is released.

Basically, to type the character ‘A’, you would need to fill in 2 INPUT structures, one for pressing (without KEYEVENTF_KEYUP flag) and another for releasing (with KEYEVENTF_KEYUP flag).

So for example, if you want to simulate Shift+A, the array of INPUT structures would be as follows.

Press Shift
Press A
Release A
Release Shift

Hope this helps somebody out there.



The Association Of Shareware Professionals



The ASP (Association Of Shareware Professionals)

Yes. I would recommend that you join this association, especially if you are new to the software business world. The Association of Shareware Professionals (The ASP) is a forum of more than 1500 software professionals around the world. The most valuable thing is their private newsgroups where the software developers discuss about marketing, development, business tips, software protection, infrastructure recommendation, discount offers and much more.

Don’t go on their website. It may seem dull and outdated. But their private newsgroups are worth the $100.00 yearly membership fee.



Coder’s Toolbox – Simple, very useful tools for developers



Recently, I stumbled upon a simple website with some very useful tools that a programmer from any platform would need. It is called the Coder’s Toolbox.

Here are the tools that it supports:

  • Convert between Unix timestamp, ISO8601 and RFC 2822 formats
  • Encode/decode Base64-encoding; escape XML, URL’s and ECMAScript; translate to UTF-8
  • Convert between decimal, hexadecimal, octal and binary numbers
  • Calculate netmasks, broadcast addresses and do DNS lookups
  • Calculate the duration of file transfer
  • Test your XPath expressions


You must know about StackOverflow.com



StackOverflow

StackOverflow is a fantastic question/answer site for all developers. Beware! You might get addicted to it.

It is just around one month since its launch and it already has about 30,000 questions covering all kinds of platforms.

Ask a question, press refresh few times and you are very likely to see the answer to your question. Impressive isn’t it?

What I like the most is the voting system. The best answers are shown on top and the not-so-good answers move towards bottom.



Using SetForegroundWindow to activate another process’ window



Thanks to the Dr. Dobb’s Portal article which revealed the secret of bringing another process’ window using SetForegroundWindow API.

Sometimes, you may launch another process using CreateProcess or ShellExecute API. But the focus may remain in the current process instead of the new process that you just spawned. You might see the new process’ window button blinking in the taskbar wanting the user to activate it.

Here is the code that will let you to activate another process’ window.

 
HWND hWndCurrentWindow = GetForegroundWindow();
CString strTitleNewWindow;
strTitleNewWindow.LoadString(IDS_APPTITLE_NEWWINDOW);
HWND hNewWindow = FindWindow(NULL, strTitle);
if (hNewWindow)
{
	DWORD hCurrentWindowThread = GetWindowThreadProcessId( hWndCurrentWindow, NULL );
	DWORD hNewWindowThread = GetWindowThreadProcessId( hNewWindow, NULL);
	AttachThreadInput( hCurrentWindowThread, hNewWindowThread, TRUE );
	SetForegroundWindow(hNewWindow);
	AttachThreadInput( hCurrentWindowThread, hNewWindowThread, FALSE );
}