웹캠 캡쳐

using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Windows.Forms; using DirectShowLib; using System.Runtime.InteropServices; using System.Runtime.InteropServices.ComTypes; namespace CastCommon {     public class WebCamCapturer     {         // a small enum to record the graph state         enum PlayState         {             Stopped,             Paused,             Running,             Init         };         // Application-defined message to notify app of filtergraph events         public const int WM_GRAPHNOTIFY = 0x8000 + 1;         IVideoWindow videoWindow = null;         IMediaControl mediaControl = null;   ...

precompiled xml serializer

precompiled xml serializer : microsoft 에서 배포한 sgen이라는 툴을 쓰면 된다. http://msdn.microsoft.com/en-us/library/bk3w6240(VS.80).aspx

c# Create Zip File Using 7-zip

d:\s 폴더 안에 있는 모든 파일 (서브디렉토리포함) zip파일 형태로 압축하여 d\s.kmz 파일로 떨군다. Creating "d\s.kmz" file from all files including sub folders in "d\s". 7zip Option : -t[Type] public partial class Form1 : Form     {         public Form1()         {             InitializeComponent();         }         private void button1_Click(object sender, EventArgs e)         {             string directoryName = Path.GetDirectoryName( System.Reflection.Assembly.GetExecutingAssembly().Location);             string processName = Path.Combine( directoryName,"7z.exe");             string argument = " a -tZip \"d:\\s.kmz\" \"d:\\s\\*\"";             Process p = new Process();             p.StartInfo.Arguments = argum...

cmd Key overriding

protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { Keys key = keyData & ~(Keys.Shift Keys.Control); switch (key) { case Keys.D: if ((keyData & Keys.Control) != 0 && (keyData & Keys.Shift) != 0) { if (m_debuggingForm == null) { TPSMessageBox.Show(this, "Debug Mode Activated"); m_debuggingForm = new Debugging_Form(); m_debuggingForm.Show(); m_debuggingForm.SetDesktopLocation(this.Left + (this.Width - m_debuggingForm.Width) / 2, this.Top + (this.Height - m_debuggingForm.Height) / 2); } else if (m_debuggingForm.IsDisposed) { TPSMessageBox.Show(this, "Debug Mode Activated"); m_debuggingForm = new Debugging_Form(); m_debuggingForm.Show(); m_debuggingForm.SetDesktopLocation(this.Left + (this.Width - m_debuggingForm.Width) / 2, this.Top + (this.Height - m_debuggingForm.Height) / 2); } else { m_debuggingForm.BringToFront(); } return true; } break; } return base.ProcessCm...

VSTO 2010 xp Deploy Problem

I tried to deploy Excel 2010 Add-In to XP target machine. But the Add-In didn't work properly which worked well with windows 7. The solution is so simple: Install office 2010PIA on your XP target machine. You can download office 2010PIA in here: http://www.microsoft.com/download/en/details.aspx?id=3508 If you want to make a setup package, you need this bootstrapper, download here : http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=18249

웹 디버깅

이미지
옵션 변경 캡션 추가

[MS-SQL] DB의 모든 테이블 정보

select OBJECT_NAME(id) , rows from sysindexes where indid = 1 order by rows desc