windows

How can I create a file with invalid Windows timestamps?

I'd like to create a file with an invalid created/modified/accessed timestamp to use in unit tests to ensure that my application can handle files with invalid timestamps. It's a Windows application written in C# that could run on both NTFS and FAT32 filesystems. ...

Persistent system / processor ID that stays across reinstalls and drive changes (C#)

I'm looking to produce a unique ID for some embedded systems I manage. The systems are running Windows Embedded 7 Standard and .NET 4.0. The IDs must: Be relatively unique -- each embedded system is running on the same motherboard, drive, etc. and I can't have collisions. Persist across reinstalls -- these computers get reimaged with n...

How to resize the windows form dynamically in mobile application ?

I am developing mobile application in C#. I am using the keyboard launch functionality to launch the keyboard on mobile device when one of the textbox gets focused. I am using the following code. private void inputPanel1_EnabledChanged(object sender, EventArgs e) { InputEnabled(); } private void Inpu...

I cant reach my new SQL instance

I was using a older version of SQL on my server, and it worked fine when only typing the servername,, I could directly connect to the server, I recently installed a new instance of SQL, and Iam trying to connect to the new instance but it dowsne't work. SERVERNAME/New_instance CAn someone help me out? How can I reach the new SQL se...

GetPixel in GDI

Using GetPixel, Is that right that you retrieve the pixel information that HDC temporarily store after you draw on each WM_PAINT call? ...

How does one find out if a Windows service is installed using (preferably) only batch?

I need to check if a Windows service is installed from a batch file. I can dip into something other than batch if I need to, but I would prefer not to. Is there any way to do this? ...

horible problem in windows 7

i am using windows 7 ultimate i suddenly downloaded some i think virus file and after that every program is opened by windows photo viewer i can't access google chrome and internet generally also some programs has the same problem too i have not antivirus please help me?what to do? ...

Block MsgBox From External Application Using VB.Net

Is there a way to intercept a MsgBox() from an external application and block it using VB.Net? For this discussion, let's say the MsgBox Title is "SQL Application" and the Message is "SQL Error - Try Again". I have found some examples of looking for the MsgBox to pop-up (by watching for the Window title) and then sending key(s) to pre...

Refresh a region in window before drawing text

I'm drawing text on window at WM_PAINT message, is there any way i can refresh that window region before drawing a new line of text so the old text at the same location would get erased? ...

LRU file cache and the cost of finding a file in a Windows directory

I have an application that will download and cache, at a minimum, 250,000 8KB* files totaling about 2GB. I need to remove the least recently used file when updating this cache. *These tiny files span two 4KB sectors. What is the relative cost of obtaining a file handle by name for this type of file in a directory on an NTFS-formatted 5...

VBA get list of available languages on current machine

I have a muulti-language Access application that needs access to languages/keyboard layouts installed on the machine. I have certain fields that accept input in various languages. I would like to be able to change the active language/keyboard layout when these fields are entered and exited. I'm sure that there is some sort of windows AP...

How to distinguish different types of NaN float in Python

I'm writing Python 2.6 code that interfaces with NI TestStand 4.2 via COM in Windows. I want to make a "NAN" value for a variable, but if I pass it float('nan'), TestStand displays it as IND. Apparently TestStand distinguishes between floating point "IND" and "NAN" values. According to TestStand help: IND corresponds to Signaling NaN ...

How can i change the name of windows service?

I have a windows service application developed in c#, The same service needs to be run with different config files. To run on these on the same machine i would need to change the name of the service. I can create multiple copies of the solution, but not sure how to change the names of the service. Thanks ...

RDOSession object with python

I want to Create RDOSession object win python for outlook addins can any tell me hoe to create RDOSession object inpython ??? Regards Thank You... ...

Tkinter Cxfreeze Error

I'm trying to make an exe in Windows out of python I developed in Linux. The program works on it's own in python under Windows, and when I use cxfreeze it completes and makes the exe. However when I run it I get: C:\projects\0802001S\dist>listen.exe Traceback (most recent call last): File "C:\Python26\lib\site-packages\cx_Freeze\ini...

writing a sbkey in registry in vb.net

Dears good morning to all I'm using the following code to open and then write a subkey in the registry Private Sub RegSubKeyCreates(ByVal sKeyPath As String) Dim RegKey As RegistryKey Dim SubKeyParam() As String = Nothing SubKeyParam = Split(sKeyPath, "\") RegKey = Registry.CurrentUser.OpenSubKey(SubKeyParam(0...

WP7 Toggle switch in a Pivot control?

Is there any way to control the threshold of the flick action to on/off a toggle switch so that it doesn't mess with the pivot control's navigation? ...

What is the best practice making a job queue system in php?

There are plenty of queue systems like beanstalkd, gearman, etc., but what if you want to run the daemon as a service on windows, and do the processing of the jobs, stored in a sql database, your self? Mainly I'm asking for suggestions for the best method to process jobs, locking them, etc. ...

How Can I pass message from DLL to Application

I have a ATLCOM Shell Extension which adds Right Click Extension to Windows Explorer. How Can I pass a message from my DLL to another MFC application. To Sumarize, I want to pass a Message from DLL to MFC application. ...

Power off WiFi on Windows 7 for battery saving

I need a way to "cut the power" of my WLan device. Currently I use a PowerShell script to disable the network interface, but I'm not sure if this also really stops the device from scanning and so on. If its possible I'd like to implement this with C++ or C# via WinAPI/WMI. Current PowerShell Script: $WLanDeviceID = 11 $WLanAdapter = g...