window-handles

SQL Server 2008: Error creating window handle

那年仲夏 提交于 2019-12-24 01:47:11
问题 I have N number of tables in my database, which holds around 0.6 million records. I've created a SQL script which copies this data into same tables (basically it's a script to generate more data). I've tested the script it runs fine for small data (10k records). When I tried it to copy all data, it throws an error: An error occurred while executing batch. Error message is: Error creating window handle. 1.What is the meaning of this error in SQL Server? 2.Does it has to do anything with my SQL

GDI Handles in Windows Service vs Interactive Application

喜夏-厌秋 提交于 2019-12-23 03:06:17
问题 I have a code that is used in an Winforms application. The same code is also used in a Windows Service (exe running as Windows Service). The code grabs the handles to ICONs. But what I found is that, in Task Mangaer (and GDI View), when I ran the Winforms Application the app shows the GDI count. But when I ran the code via Windows Service, the service instance in Task Manager isn't showing any count for GDI. So, does this mean that Windows Service can never hold a GDI handle? If so, how does

Grab and move application windows from a .NET app?

空扰寡人 提交于 2019-12-22 04:49:15
问题 Is it possible for a .NET application to grab all the window handles currently open, and move/resize these windows? I'd pretty sure its possible using P/Invoke, but I was wondering if there were some managed code wrappers for this functionality. 回答1: Yes, it is possible using the Windows API. This post has information on how to get all window handles from active processes: http://www.c-sharpcorner.com/Forums/ShowMessages.aspx?ThreadID=35545 using System; using System.Diagnostics; class

How to get currently active tab index on Chrome via Selenium?

五迷三道 提交于 2019-12-20 06:15:47
问题 I'm creating app which is half-automated (user is opening tabs (attention) and if he wants to dump one of them he just clicks hot-key). But when user opens to much tabs, I need to know to which one I should switch. How can i get currenttab index. Or switch to current tab on Selenium C#? string windowHandle = Browser.WindowHandles.Last(); string windowHandle = Browser.WindowHandles.First(); string windowHandle = Browser.WindowHandles[1]; ... is not working for me. 回答1: The currenttab index may

Get specific window handle using Office interop

主宰稳场 提交于 2019-12-18 13:39:08
问题 I'm creating a new instance of Word using the Office interop by doing this: var word = Microsoft.Office.Interop.Word.Application(); word.Visible = true; word.Activate; I can get a window handle like this: var wordHandle = Process.GetProcessesByName("winword")[0].MainWindowHandle; The problem is that code works on the assumption that there's no other instance of Word running. If there are multiple, it can't guarantee that the handle it returns is for the instance that I've launched. I've tried

Mac OS X: Can one process render to another process's window?

試著忘記壹切 提交于 2019-12-18 10:14:19
问题 Greetings! I'm currently porting a web browser plugin from Win32 to MacOSX. One of the features of the plugin is that when the plugin is loaded, it spawns a separate process that serves as the "engine" of the plugin and executes drawing operations into the window of the plugin (specifically, by attaching an OpenGL context to the parent process's window and executing OpenGL rendering commands into that context). We do this because the plugin is typically loaded as a thread within the browser

Get all window handles for a process

对着背影说爱祢 提交于 2019-12-18 04:49:09
问题 Using Microsoft Spy++, I can see that the following windows that belong to a process: Process XYZ window handles, displayed in tree form just like Spy++ gives me: A B C D E F G H I J K I can get the process, and the MainWindowHandle property points to the handle for window F. If I enumerate the child windows using I can get a list of window handles for G through K, but I can't figure out how to find the window handles for A through D. How can I enumerate windows that are not children of the

C# get window handle after starting a process

喜欢而已 提交于 2019-12-17 20:36:24
问题 Is there a way to get the window handle (IntPtr) for a window after its launched from a C# app with Process.Start()? 回答1: If it's the main window you're after, Process.MainWindowHandle will give you what you need. 回答2: Use process.MainWindowHandle; It probably is 0 when launching the app, so you might want to loop and sleep until it is filled up. 回答3: This is not a recent topic but the answers are incomplete. I agree with the Process.MainWindowHandle solution and to wait for the value but not

how to handle mutliple windows in selenium webdriver ,need to switch from second to third window

允我心安 提交于 2019-12-17 10:03:14
问题 I am trying to switch from second window to third window .But not able to handle third window.could someone please help me to resolve this issue. I have used logic of compare the title of window but its not working. code======================= package Package_1; import static org.testng.Assert.assertEquals; import java.util.HashMap; import java.util.Iterator; import java.util.Map; import java.util.Set; import org.openqa.selenium.By; import org.openqa.selenium.JavascriptExecutor; import org

How do I get the handle of a console application's window

核能气质少年 提交于 2019-12-17 06:12:35
问题 Can someone tell me how to get the handle of a Windows console application in C#? In a Windows Forms application, I would normally try this.Handle . 回答1: Not sure it works, but you can try that : IntPtr handle = Process.GetCurrentProcess().MainWindowHandle; 回答2: The aforementioned Process.MainWindowHandle method only works for the process that started the console The FindWindowByCaption method is inherently unreliable Here's a robust way to do this: The related functions from the Console