Muse right click menu
1.Create Menu in design view (by adding "ContextMenu" control onto the form in the design view )
2.add following code( MouseUp event of the form)
private void Form1_MouseUp(object sender, MouseEventArgs e)
{
if (e.Button == MouseButtons.Right)
{
contextMenuStrip1.Show(this,e.X, e.Y);
}
}
Monday, December 10, 2007
Wednesday, December 5, 2007
Tomcat configaration
1.Install java 1.5 0r 1.6
2.set PATH by putting following line to c:\autoexec.bat file.(use JDK1.5)
set PATH="C:\Program Files\Java\jdk1.5.0_07\bin";%PATH%
3.Check configured properly by using "java -version" and "javac -help" in command prompt.Make sure not an error message about an unknown command.
4.Go to http://tomcat.apache.org/download-60.cgi and download and unpack the zip file to C:\apache-tomcat-6.0.10 (current version of tomcat 6.0.10)
5.set JAVA_HOME directory by putting following line to c:\autoexec.bat file
set JAVA_HOME=C:\Program Files\Java\jdk1.5.0_07
6.Turn on Servlet Reloading
To turn on servlet reloading, edit Edit C:\apache-tomcat-6.0.14\conf\context.xml and change
< Context >
to
< Context reloadable="true" privileged="true" >
7.Now in the command prompt
C:\>AUTOEXEC.BAT
C:\apache-tomcat-6.0.14\bin>startup.bat
2.set PATH by putting following line to c:\autoexec.bat file.(use JDK1.5)
set PATH="C:\Program Files\Java\jdk1.5.0_07\bin";%PATH%
3.Check configured properly by using "java -version" and "javac -help" in command prompt.Make sure not an error message about an unknown command.
4.Go to http://tomcat.apache.org/download-60.cgi and download and unpack the zip file to C:\apache-tomcat-6.0.10 (current version of tomcat 6.0.10)
5.set JAVA_HOME directory by putting following line to c:\autoexec.bat file
set JAVA_HOME=C:\Program Files\Java\jdk1.5.0_07
6.Turn on Servlet Reloading
To turn on servlet reloading, edit Edit C:\apache-tomcat-6.0.14\conf\context.xml and change
< Context >
to
< Context reloadable="true" privileged="true" >
7.Now in the command prompt
C:\>AUTOEXEC.BAT
C:\apache-tomcat-6.0.14\bin>startup.bat
Tuesday, December 4, 2007
Copy Dataset to another Dataset or Table to Table
if We need to copy Dataset contain to another data set we can use copy() method belong to that data set...
private void loadDtagrideview (DataSet ds) // this DataSet retun by another method
{
DataTable table1 = ds.Tables[0].Copy();
table1.Clear(); //remain the structure of the table without data
foreach (DataRow dr in ds.Tables[0].Rows)
{
if( some condition)// copy only the data if the condition true
{
table1.Rows.Add(dr.ItemArray);// only selected rows ..
}
}
}
private void loadDtagrideview (DataSet ds) // this DataSet retun by another method
{
DataTable table1 = ds.Tables[0].Copy();
table1.Clear(); //remain the structure of the table without data
foreach (DataRow dr in ds.Tables[0].Rows)
{
if( some condition)// copy only the data if the condition true
{
table1.Rows.Add(dr.ItemArray);// only selected rows ..
}
}
}
Subscribe to:
Posts (Atom)