windows

How to use DrawThemeTextEx in WPF

Hi, I'm working on an application that displays text on Aero Glass. To make it readable I used a OuterGlowBitmapEffect, but, as also described here this is no longer possible in .NET 4 and the DropShadowEffect won't work for Glass either. While searching for a solution I came across the native DrawThemeTextEx in DWMApi, but all examples...

How to do hi-res offscreen rendering in QuickTime for Windows?

I need to render a QuickTime movie into a GWorld that may not be the movie's natural size, on Windows. When the movie is scaled up, say by a factor of 1.5, I see some jaggies. Whereas if I open the same movie in QuickTime Player (version 7.6.6 on Windows Vista) and stretch the window, I see jaggies while stretching, but when I release ...

Error compiling OpenSSL for Win32

I get the following error when trying to build OpenSSL on Win32: C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(92) : error C2220: warning treated as error - no 'object' file generated C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\INCLUDE\errno.h(92) : warning C4005: 'EADDRINUSE' : macro redefiniti...

Compiling openssl with ruby on windows

Hello, i am trying to compile openssl with my ruby config on a windows computer with MingW. I am running ruby 1.9.2rc2 with these commands: $ ruby extconf.rb --with-openssl-dir=/c/openssl ... ... ... === Checking done. === creating extconf.h creating Makefile Done. Okay, so that works without any errors. Let's try to make: $ make gcc...

How to create service which restarts on crash

I am creating a service using CreateService. The service will run again fine if it happens to crash and I would like to have Windows restart the service if it crashes. I know it is possible to set this up from the services msc see below. How can I programatically configure the service to always restart if it happens to crash. ...

windows command line: how to remove space in file

Hi In linux, we can do it with tr command to remove space. How can I do it in windows? I like to remove space in each line of a text file from command line in Windows XP. Thanks. ...

Unable to use relog to extract processor counters

When I run the following command on Windows 7 machine, relog *.blg -f csv -c "\Processor(*)\% Processor Time" -o CPUCounters.csv it returns Error: No data to return the same wildcard work when extracting PhysicalDisk counters any ideas/ suggestions? ...

Make Windows refresh icon cache

I really liked the oxygen appearance of KDE SC 4. I wrote a program to apply these icons to windows. The program is written in NSIS, and is currently nearly fully functional. However, the only way I found to make Windows aware of the icon changes is to kill explorer.exe, delete the icon cache, and respawn explorer.exe. SHChangeNotify wit...

How to make 64 bit dll compatible with 64-bit editions of Windows Server 2008, Windows 7, and Windows XP?

I have compiled a dll on Windows Server 2008 64 bit edition. It works fine on that version of Windows, but if I switch to Windows 7 or XP 64 bit edition the dll does not work. How can I make the dll compatible with all three versions of 64bit edition windows? I am using Visual Studio 2010. ...

Why does a simulated mouse click (using mouse_event) work on selected components only?

I have multiple cursors (which are actually forms) that can be controlled by their respective mouse. (1 cursor for 1 user). I use SetCursorPos to position the default cursor (the original system cursor) in a position that will not take away the focus from my application, and use ShowCursor(false) to hide it. I have a class that gets ...

How to get the Last Active Date of a Process?

Hi all, I have an assignment were in I have to print the last active date of the process using a COM In Proc Server in C++. I tried doing that with getProcessTimes() function, but that gives me an access violation error. First of all, I want to know if there is anyother command that gives the last active date of the process.. Second wh...

Installing and distributing SQL Server without Management Studio

Have developed a small Windows application using SQL Server as its database. I need to give the installation pack to my customer, and include the required SQL Server 2005 Enterprise Edition. How can I distribute my database without including Management Studio? ...

Java Swing Run program when Windows startup

Is there possible to code the Java Swing application to run when Windows start up? ...

WPF program can't start with a hidden main window?

I have a WPF program that is auto run via an entry in the registry on user login. The program starts with its main window hidden, checks a few things and if the startup conditions are right, makes the main window visible, otherwise the program exits with status code 0. Sometimes when the program runs, windows will present a popup saying ...

Remove all redundant files in a directory

I have directoryA that gets populated as a replica of directoryB, and some files are changed or added. I want to automate the process of deleting all files from directoryA that have redundant copies in directoryB. Both directories have several layers of sub-directories, so the solution will likely have to be recursive. My first thought...

Selecting Word-Parts in C#

While collecting some training data for NLP, I discovered that it is impossible to select parts of 2 adjacent words in a RichTextBox. For example: you can not select "lect Me" from "Select Me" in a RichTextBox using mouse..!! However it can be done using SHIFT key Is there a property to be able to select parts of adjacent words not the...

Windows 2008 Firewall settings

Hi how do you Limit traffice within the firewall settings? what im trying to do is Limit one ip Traffic to use SQL, but when i do this it Limits all the Ip's ? could you give me some info ? thanks James Taylor ...

Pattern / methodology for communication between Windows and/or UserControls

Hello: I'm currently developing a application where I will have multiple windows open using C# and WPF. Is there a pattern or common methodology used to help faciliate communication between open Windows or/and UserControls? For example, a window, let's call it the 'Hierarchy Window', may displays a hierarchy of countries, provinces,...

Cross platform way to detect a symbolic link / junction point?

In java, a symbolic link in a Unix environment can be detected by comparing the file's canonical and absolute path. However, this trick does not work on windows. If I execute mkdir c:\foo mklink /j c:\bar from the command line and then execute the following lines in java File f = new File("C:/bar"); System.out.println(f.getAbsoluteP...

FTP an image over a TCP/IP wireless connection from a Windows Mobile 6 device

I have a mobile application that needs to FTP an image over a wireless TCP/IP connection to a server. I have searched the internet for resources only to find that some of the popular ways to do this are not supported by the dot net compact framework (such as System.Runtime.Remoting). Is using TCP/IP a viable solution or is there another ...