Saturday, March 22, 2014

Class Library Toolbox Icon

Step 1: 

Create bmp file (16x16) and save as like below.

   ProjectNameSpace.ControlName.bmp

  e.g. Project Name : CustomGrid
        Control Name : MyGridControl

Bmp File Name :  CustomGrid.MyGridControl.bmp

Step 2: Add in Project and Change Build Action Properties to "Embedded Resources".

Stpe 3: Add ToolboxBitmap line in your class file as per screenshot.




Step 4 : Compile your Project as "Class Library".

Step 5:  Add this control in Different Solution Project Toolbox using choose items and icon will display like below ( In Same Project icon can not display).


Download Complete Source : CustomGrid.Zip



Wednesday, May 1, 2013

x86 and x64 Bit Dll Issue


Only use the x86 DLL and make sure that the application build platform is x86 and the platform target is x86, because the 64 bit can run the x86 normally.
 To find those you should go to the application properties, and then at the build  tab you'll find them.
To Create new platform with x86, you have to locate the platform combo box beside the "Start Debugging" or "Play" or "RUN" button, and select the "configuration manager" from it.
Hope this will help.

Wednesday, January 2, 2013

Capture Screen with Menu

This Application will capture screen with Open Menu. (e.g. File Menu, Windows Start Menu)

It will works with Windows 7 Basic Themes & Aero Themes.

Wednesday, December 7, 2011

How do you run a 300mb+ MS SQL .sql file?

From the command prompt, start up sqlcmd:

sqlcmd -S <server> -i C:\<your file here>.sql -o
Just replace with the location of your SQL box and with the name of your script. Don't forget if you're using a SQL instance the syntax is:
Here is the list of all arguments you can pass sqlcmd:
Sqlcmd            [-U login id]          [-P password]
  [-S server]            [-H hostname]          [-E trusted connection]
  [-d use database name] [-l login timeout]     [-t query timeout] 
  [-h headers]           [-s colseparator]      [-w screen width]
  [-a packetsize]        [-e echo input]        [-I Enable Quoted Identifiers]
  [-c cmdend]            [-L[c] list servers[clean output]]
  [-q "cmdline query"]   [-Q "cmdline query" and exit] 
  [-m errorlevel]        [-V severitylevel]     [-W remove trailing spaces]
  [-u unicode output]    [-r[0|1] msgs to stderr]
  [-i inputfile]         [-o outputfile]        [-z new password]
  [-f  | i:[,o:]] [-Z new password and exit] 
  [-k[1|2] remove[replace] control characters]
  [-y variable length type display width]
  [-Y fixed length type display width]
  [-p[1] print statistics[colon format]]
  [-R use client regional setting]
  [-b On error batch abort]
  [-v var = "value"...]  [-A dedicated admin connection]
  [-X[1] disable commands, startup script, enviroment variables [and exit]]
  [-x disable variable substitution]
  [-? show syntax summary]