- 博客(14)
- 资源 (6)
- 收藏
- 关注
原创 c# detected process waiting for input
1.get the process need to judgement 2.get all threads in the process and find if any thread is waiting and reason is user request method code :public bool IsWaitingForUserInput(Process p
2013-01-31 19:58:17 1451
原创 c# set tab page focus
only need to set the selectedIndex to the one you need to get focus. tabClasses.SelectedIndex = tabClasses.TabPages.Count - 1;
2013-01-22 19:05:37 1168
原创 c# find control in windows form
c# form find control RichTextBox rtb = sender as RichTextBox; if (rtb == null) return; rtb = (RichTextBox)this.Controls.Find(rtb.Name, true).First
2013-01-22 19:02:39 1633
原创 open/close sharepoint dialog
open sharepoint dialog :function OpenCustomDialog(dialogUrl, dialogWidth, dialogHeight, dialogTitle, dialogAllowMaximize, dialogShowClose) { CloseProgressPopUp(); var opt
2013-01-21 10:05:23 1529
原创 how to break out the nested for loop
Action job = () => { foreach (Assembly a in AppDomain.CurrentDomain.GetAssemblies()) { foreach (Type t in a.GetTypes())
2013-01-17 16:28:05 976
原创 Show Console Window in Windows Application
private void Form1_Load(object sender, EventArgs e) { AllocConsole(); } [DllImport("kernel32.dll", SetLastError = true)] [return: MarshalAs(UnmanagedType.B
2013-01-16 15:58:17 1409
原创 c# change textbox / richtextbox each character size to same size
make the character same size , just need to change a font family :txtSource.Font = new Font(FontFamily.GenericMonospace, txtSource.Font.Size);then each char will be displayed in the same s
2013-01-11 18:47:52 1236
原创 c# rich text box add text into cursor position
public static void AppendTextToCursor(string insertText, string oldText, object sender, ref Form _frmMain) { RichTextBox rtb = sender as RichTextBox; if (rtb == null
2013-01-11 18:45:59 1794
原创 error while unload assembly from GAC "assembly is being used by another process"
if GAC shows assembly can not been removed because of it is using by another process , try iisreset.exe .
2013-01-10 09:19:30 1129
原创 c# code pad version 1.0
using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using Sy
2013-01-08 17:00:07 1309
转载 sql server return xml result
forward from :http://www.simple-talk.com/sql/learn-sql-server/using-the-for-xml-clause-to-return-query-results-as-xml/SQL Server lets you retrieve data as XML by supporting the FOR XML
2013-01-03 15:59:53 1252
原创 sql server store procedure summary part1
1.ISNULL() function select ISNULL(AgentCode,'-') as AgentCode from cm.FrmAddressForService order by CreatedDate desc;if agentcode is null , then replace by '-'2.assigned value from a query
2013-01-02 18:01:22 1104
转载 Row_Number usage
Row_Number() over(partition , order by) usage .foward form :http://msdn.microsoft.com/en-us/library/ms186734.aspxA. Returning the row number for salespeopleThe following exa
2013-01-02 15:39:28 1132
原创 sql find out record one-to-one
one case can has multiple classes case : class = 1:nfind out the case number which has only one class.select * from hm.[Class] where CaseFK in(select CaseFK clsCount from hm.[Class] group
2013-01-02 14:20:45 988
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人