windows

How can an application display an object on the Windows taskbar?

There are several applications around that display objects on the Windows taskbar but do no implement the IDeskBand interface. For example, the Lenovo batter meter and Notebook BatteryInfo. For example: In the picture above, the object on the taskbar is put there by the application and disappears when the application closes. This i...

Why is so complicated to remap Esc to CAP LOCK in Vim?

I saw the vim wiki tips and it says that in order to remap Esc to CAP LOCK you have to edit the following windows code: REGEDIT4 [HKEY_CURRENT_USER\Keyboard Layout] "Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,01,00,3a,00,00,00,00,00 Is it possible to remap Esc to CAP LOCK by only adding or modifying lines in the _vimrc? ...

How can I run Python code on a windows system?

I am used to using PHP and it is easy to set up, I can just run an exe package like Xampp and have apache and PHP running in 5 minutes on my windows system. Is there something similar to Python? ...

Is there even fast implementaion about multibyte character string convert to unicode wstring?

Hi, In my project, where I adopted Aho-Corasick algorithm to do some message filter mode in the server side, message the server got is string of multibyte character. But after several tests I found the bottleneck is the conversion between mulitbyte string and unicode wstring. What I use now is the pair of mbstowcs_s and wcstombs_s, whic...

How to install a programme as a service that auto start when booting?

I need a PHP script to run as a service in windows. Is there an easy way to do this? ...

Windows: obtain LDAP Organizational Unit

I have a User GUID. How could I get the Organizational Unit (OU) of this user? ...

Wpf Tool Window Style Application not visible in alt+tab

I have a WPF application with Main Window which is not a tool window Launch a child window which has WindowStyle="ToolWindow" ShowInTaskbar="False" from main window Now BOTH Main Window and Child Window are not visible in Alt+Tab. [Child window not appearing in alt+tab is expected behavior,but Main window should be visible] Any help...

GDI GradientFill not working on offscreen bitmap

Hi, I am trying to use the GDI GradientFill function to draw on a offscreen bitmap, then BitBlt that to the screen. But I always get a black bitmap... if I GradientFill directly to the screen it works. Below is a sample app to see what I mean. #pragma comment(lib, "msimg32.lib") #include <windows.h> const CHAR c_szWndClass[] = "Grad...

Handling delays during stop/pause requests on Windows service

I have a Windows service class deriving from ServiceBase that uses a System.Timers.Timer to run code at frequent intervals. The handlers for OnStop and OnPause use some signalling with the timer thread to check if the timer is still running and waits for it to finish. Is there a recommended way of handling delay errors in this situation...

How to execute some code everytime an application window (other processes) is opening?

I am trying to track visible windows from all currently running processes. My program interacts with these windows and the faster it can detect them the better. My goal is to move visible windows to a certain location on screen before they even draw in the default position if that is possible. If not I want to move them as quickly as p...

Taking a screenshot without screen freeze. C# and WindowsXP

I am using C# .NET to take a screenshot of the contents of a second monitor and display it in a windows on the primary screen. The code I have is: screenShotGraphics.CopyFromScreen( Screen.AllScreens[screen].Bounds.X, Screen.AllScreens[screen].Bounds.Y, 0, 0, Screen.AllScreens[screen].Bounds.Size, CopyPixelOpera...

How do I write a Windows HyperTerminal (.ht) file?

From my C# .NET application, I want to generate a .ht file that can be used to launch an instance of HyperTerminal and connect to the IP/Port specified in the .ht file. Does anyone know how to format the binary .ht file? ...

Local Network - Windows 7 and Vista can't see each other

I've got a strange issue at home that has been bugging me for weeks, but I really need to get it sorted now so I'll detail as much as I can and hopefully someone can spot what might might be wrong. I have a wireless router connected to the internet and 3 devices connected to it. They are: Name OS Network IPv4 PC1 Wi...

In a C# application, where does Windows grab the name of process when it appears in the Task Manager?

When you open the Task Manager in Windows, you see process names. For any given c# application, how do you set that name? ...

Problem installing Delphi 2007 on Windows 7 64 Bit Enterprise

I have an issue installing Delphi 2007 RAD Studio Professional onto Windows 7 64 Bit Enterprise. Everything is fine until I enter the serial number for the installation. After I enter it and click the next button in the installation wizard I get an installation script error at line 906. OKing that error closes the installer. I have don...

Best way to comparing perormance of different version of library

Hi Currently for each call in library,I am doing multiple iteration , Measuring time taken for each call and then calculating : Average time taken for each call Min time take Max time taken Standard Deviation But it seems its not a good method . As these time depends upon state of machine ,As if CPU is busy with other process res...

WPF: When is the soonest I can Close my window?

I perform some checks in my Window class constructor, and if they fail I want to display an error message and close the window. I'm getting crashes when calling Close() from the constructor or from Window_Loaded. Does that sounds normal or am I doing something wrong? If this is normal, when should I call Close()? ...

Why could DwmRegisterThumbnail fail?

I am trying to capture screen of a child window and render it on parent surface in Windows 7. HTHUMBNAIL thumbnail = NULL; HRESULT hr = S_OK; hr = DwmRegisterThumbnail( hWnd, visualHwnd, &thumbnail ); if( SUCCEEDED( hr ) ) { ... } This fails all the time. visualHwnd is the child window and hWnd is the parent. I also tried it with...

Return data from Windows Workflow

For a state machine workflow, it is a common pattern to raise events from the presentation layer and these events are handled on the workflow layer. Most commonly, the workflow performs different kinds of updates. Is there a nice way to return data from the workflow layer to the presentation layer? For example, user clicks on a button...

When you make a file read-only via Properties, can your program write directly to that file?

I'm wondering whether making files read-only so the user can't mess with them will disallow my program from writing information to them via an fstream. ...