windows

How can I make a window in another process modal?

I have an application that calls some other utility application to set some settings for a particular device. That utility application is called using ShellExecuteEx. So as not to confuse the user, it would be better to made the window of the utility application modal to my main window. How does one do this? Things I've tried: WaitFo...

How can I uniquely identify a USB key from C#?

I'd like to be able to detect when a USB key is inserted. Furthermore, if I can distinguish between USB key A and USB key B then I am in even better shape. Lastly, if I can uniquely identify the key using some sort of hardware serial number, MAC address or whatever, then I'm in the best shape of all. Basically I am looking at using a ...

Effective use of gvim over a network

I currently use vim in a telnet window for editing code (very old school!). There is a lot of source code (mainly C), so I use tags, cscope etc. to get around. This is ok as far as it goes, but network latency can make every keystroke "laggy", which is not so good! I'd like to use gvim on my Windows PC (or any editor that can be set up ...

Window move and resize APIs in OS X

I'm trying to find documented (or, undocumented, if that's my only option) APIs on OS X to query a list of windows from the window server and then cause the windows to move and resize. Can anyone point me in the right direction? I guess I'd be starting with something like FindWindowEx and MoveWindow under Win32. Note that I want to do...

Which Qt DLL's should I copy to make my program stand-alone?

Hi, I'm trying to make a distribution directory with my application. I've copied several Qt DLLs to that directory, and the program seems to be working, with one exception: it doesn't seem to find SQL plugin for SQLite. Copying qtsqlite.dll to the directory, doesn't allow my application to open or create SQLite files. What must be the di...

Run a script on Windows startup without a user logged on

This is a Windows 2003 machine that gets switched on every morning, but no one logs on until some hours later. I want to use the time in between to run a backup script c:\script\backup.cmd How can I start this unattended after the machine has come up? I tried 2 registry keys, but this resulted in the script being run after a user logs...

How do I create a batch script that will delete a folder on a scheduled basis?

Exact Duplicates: How to write a batch file to delete the files which are 5 days or older from a folder? write a batch file to delete 6 days older files from a folder write a batch file to delete 5 daya older files from a folder How do I write a batch file to delete folders and files on a time basis? write a batch file to remove the fo...

Get List of All Regional Setting Formats in .net

Hi Everyone, Within Control Panel -> Regional and Language Options, there is a Formats tab, with a drop down of all possible language formats. I wish to retrieve this list using VB.NET. Could anyone point in the direction of which Windows API call to use? Thanks ...

How to get width and height from CreateWindowEx() window? C++

I have made a window with CreateWindowEx() function, now how do i get the width and height from that window i created? This sounds very basic thing to do, but i just couldnt find any answer ;_; This is needed because the window height is created automatically depending on how the Windows wants to create it. Language C or C++ ...

Does a DLL get removed if the DLL that loaded it is unloaded?

Take a standard Windows application. It loads a DLL using LoadLibrary to call a function in it (we'll call this DLL_A). That function loads another DLL (we'll call it DLL_B). The application now unloads the DLL_A DLL using FreeLibrary as it no longer requires it. The question is: Is DLL_B still in memory and loaded? Is this something...

Windows chooses wrong icon from multi-icon file and self renders to correct size

I have an .ico file with 5 icon sizes embedded in it being used as the main application icon and the System Tray icon. When it shows up in the task bar the icon is using the 16x16 format which is desired. When the icon shows up in the Notification Area/System tray, it is using the 32x32 format and Windows is rendering it down to a 16x16...

How do I get common file type icons in C#?

As seen in This SO question on getting icons for common file types, it's quite possible for a windows program to get the icons for a registered file type using the C++ Shell API. These icons may or may not exist on disk - for example, we wanted to make our own custom file browser and want to display the system-associated icon with the f...

Can the HWND from CreateWindow/CreateDialog be GetMessage'd from another thread?

Using the Win32 APIs, is it possible to create a Window or Dialog in one thread then collect events for it from another thread? Are HWNDs tied to threads? Trying the contrived example below I never see GetMessage() fire. HWND g_hWnd; DWORD WINAPI myThreadProc(LPVOID lpParam) { while(GetMessage( CreateThread(NULL, 0 myThreadP...

How to build a tunnel for file transfer between distant windows 2003 machines quickly

I have two distant locations with Windows Server 2003. Can I build a secure tunnel quickly? Is there secure VPN built into the OS? I have domain names and router control on both sides. I can build a "VPN" connection with the wizard (PPTP), I opened port 1723 TCP on the other router, do I need 47 GRE also? The router does not allow me to...

require_once with dotted (hidden) files in php on windows not working

my code works fine if I remove the leading dots on file names, but breaks otherwise. [edit] The file starts with a dot (period) character [end edit] require_once('.htMyClass.inc.php'); //fails require_once('htMyClass.inc.php'); //works I wanted to keep the dots for security -- the leading ht is just a hold over from apache. i don't...

What's your favorite Windows text editor?

Duplicate: What are the good free programming text editors for Windows? I'm looking for a good Windows programming text editor. I want something clean and simple, but that offers flexible syntax highlighting, line numbering, a right-margin indicator, and other creature comforts. My favorites: NotePad++ Vim ...

msync equivalent in Windows

what is the equivalent of msync [unix sys call] in windows? I am looking for MSDN api in c,C++ space. More info on msync can be found at http://opengroup.org/onlinepubs/007908799/xsh/msync.html ...

Prevent wxPython from showing 'Unhandled exception' dialog

I have complex GUI application written in Python and wxPython. I want it to be certified for Windows Vista, so it has to crash in a way that causes Windows Error Reporting dialog (The one that asks "Do you want to send report to Microsoft?") to appear. This is relevant to test case no 32 from "Certified for Windows Vista Test Cases" doc...

HTTP request with custom headers fields using Windows Scripts

Is it possible to perform a HTTP Request with specific header fields (like 'referer', 'cookies' or 'User-Agent') using Windows Script Host or any other Windows scripting technology?? Thanks. ...

MonoDevelop on Windows

My google-fu has failed me - can MonoDevelop be used on Windows? Preferably without having to compile from source? It works well on my home Ubuntu box, and while I have Visual Studio at work, it seems there might be some advantages to having MonoDevelop too. EDIT: I'm aware of SharpDevelop; I'd prefer to have MonoDevelop if possible, ...