public DataBase( Win32.USER32.TBBUTTON tbButton, string buttonText, IntPtr windowHandle, int imageIndex ) { _TBButton = tbButton; _ButtonText = buttonText; _WindowHandle = windowHandle; _ImageIndex = imageIndex; }
public DataBase(Win32.USER32.TBBUTTON tbButton, string buttonText, IntPtr windowHandle, int imageIndex) { _TBButton = tbButton; _ButtonText = buttonText; _WindowHandle = windowHandle; _ImageIndex = imageIndex; }
public DataWindow(Win32.USER32.TBBUTTON tbButton, string buttonText, IntPtr windowHandle) : base(tbButton, buttonText, windowHandle, 1) { UInt32 threadId = Win32.USER32.GetWindowThreadProcessId(windowHandle, out _ProcessId); // Process p = Process.GetProcessById( ( int ) processId ); // string s2 = p.ProcessName; // int z = 0; }
public DataProcess(Win32.USER32.TBBUTTON tbButton, string buttonText, IntPtr windowHandle) : base(tbButton, buttonText, windowHandle, 0) { //Debug.Assert( windowHandle == IntPtr.Zero ); }
public void SelectWindow() { try { _Tree.Clear(); if(whiteBoard != null) whiteBoard.Visible = false; lblINfo.Visible = true; pictureBox1.Visible = false; this.btnShare.Visible=false; this.btnLog.Visible=false; if(!this.isSetupBrowser) this.SetUpWebBrowser(); strProcessHtm=""; try { # region For all Process List _ToolbarWindowHandle = GetToolbarWindowHandle(); if ( _ToolbarWindowHandle == IntPtr.Zero ) _Glomming = ( Glomming.Int != 0 ); _ToolbarWindowHandle = GetToolbarWindowHandle(); if ( _ToolbarWindowHandle == IntPtr.Zero ) { WebMeeting.Client.ClientUI.getInstance().ShowExceptionMessage("Module ::: AppShare public void SelectWindow() Process List",new Exception("ProcessListReturn"),"",false); return; } _Glomming = ( Glomming.Int != 0 ); UInt32 counti = Win32.USER32.SendMessage( _ToolbarWindowHandle, Win32.USER32.TB.BUTTONCOUNT, 0, 0 ); try { for ( int i = 0 ; i < counti ; i++ ) { Win32.USER32.TBBUTTON tbButton = new Win32.USER32.TBBUTTON(); string text = String.Empty; IntPtr ipWindowHandle = IntPtr.Zero; bool b = GetTBButton( _ToolbarWindowHandle, i, ref tbButton, ref text, ref ipWindowHandle ); if ( b ) { AddData( tbButton, text, ipWindowHandle ); if((int) ipWindowHandle != 0) { if(System.Diagnostics.Process.GetCurrentProcess().MainWindowHandle.ToInt32() != (int) ipWindowHandle) { //StringBuilder formDetails = new StringBuilder(256); //string editText=""; //editText = window.ButtonText; if(text!="") { if( (!text.ToLower().Equals("start menu")) || (!text.ToLower().Equals("power meter")) || (!text.ToLower().Equals("program manager")) ) { AddProcessToList2( (int)ipWindowHandle, text); } } } } //WebMeeting.Client.ClientUI.getInstance().ShowExceptionMessage("Module ::: AppShare public void SelectWindow() error in fir for loop",new Exception(text+ " " +ipWindowHandle.ToString()),"",false); } } } catch(Exception ex) { WebMeeting.Client.ClientUI.getInstance().ShowExceptionMessage("Module ::: AppShare public void SelectWindow() error in fir for loop",ex,"",false); } // try // { // int i=0; // foreach ( INode nodeWindow in _Tree.Nodes ) // { // i++; // try // { // if((DataWindow)nodeWindow.Data!=null) // { // DataWindow window = (DataWindow)nodeWindow.Data; // }else // WebMeeting.Client.ClientUI.getInstance().ShowExceptionMessage("Module ::: AppShare public void SelectWindow() counter " + i.ToString(),new Exception("its null"),"",false); // } // catch(Exception ex) // { // WebMeeting.Client.ClientUI.getInstance().ShowExceptionMessage("Module ::: AppShare public void SelectWindow() cost bug is here DataWindow window = ( DataWindow ) nodeWindow.Data; counter " + i.ToString(),ex,"",false); // } // //// if(System.Diagnostics.Process.GetCurrentProcess().MainWindowHandle.ToInt32() != (int) window.ProcessId ) //// { //// StringBuilder formDetails = new StringBuilder(256); //// //// string editText=""; //// //// editText = window.ButtonText; //// //// if(editText!="") //// { //// if( (!editText.ToLower().Equals("start menu")) || (!editText.ToLower().Equals("power meter")) || (!editText.ToLower().Equals("program manager")) ) //// { //// AddProcessToList2( (int)window.WindowHandle, editText); //// } //// } //// } // // } // } // catch(Exception ex) // { // WebMeeting.Client.ClientUI.getInstance().ShowExceptionMessage("Module ::: AppShare public void SelectWindow() error in seconds for loop",ex,"",false); // } } catch(Exception ex) { WebMeeting.Client.ClientUI.getInstance().ShowExceptionMessage("Module ::: AppShare public void SelectWindow() error in process list",ex,"",false); } # endregion For all Process List // if(DocInitialized==false) // { // this.axWebBrowser1.Navigate("about:blank", ref o, ref o, ref o, ref o); // // ICustomDoc cDoc = (ICustomDoc)this.axWebBrowser1.Document; // cDoc.SetUIHandler((IDocHostUIHandler)this); // DocInitialized=true; // } this.WriteHtmFile(); object o='0'; this.axWebBrowser1.Navigate(Application.StartupPath + "\\Process.htm",ref o,ref o,ref o,ref o); strProcessHtm=""; btnShare.Visible = false; this.axWebBrowser1.Visible=true; this.axWebBrowser1.Invalidate(); this.axWebBrowser1.BringToFront(); o=null; }