windows

Draw Bitmap with alpha channel

I have a Format32bppArgb backbuffer, where I draw some lines: var g = Graphics.FromImage(bitmap); g.Clear(Color.FromArgb(0)); var rnd = new Random(); for (int i = 0; i < 5000; i++) { int x1 = rnd.Next(ClientRectangle.Left, ClientRectangle.Right); int y1 = rnd.Next(ClientRectangle.Top, ClientRectangle.Bottom); int x2 = rnd.Ne...

Python (windows) will open files from command line, but not from a script launched from eclipse

I'm pretty new to writing python for windows (linux is no problem), and am having problems getting python to recognize files when running scripts, though it behaves fine in the command line What am I doing wrong here? def verifyFile(x): # return os.path.isfile(x) This will return true (with a valid file, of course) when called ...

Windows Mobile 6.x How to explicitly lock the app in one orientation?

I'm trying to get an app on the WinMo App Store. As part of this, Microsoft App's Store has asked that I need to support landscape as well as portrait. What they've said is OK is: If dynamic switching is implicitly allowed, the app will be tested just as if it supports both portrait and landscape even if only a portrait or...

CAFF creation on Windows (or Linux)

On OS X I use this command to convert a sound file to CAFF for iPhone. afconvert -f caff -d LEI16@44100 file.wav file.caf I need to do the same on a Windows box. Any clues? I'd even settle for a Linux version. ...

Installing virtualenvwrapper on Windows

I've installed virtualenv and virtualenvwrapper on Windows using easy_install. But mkvirtualenv is missing. I tried to search on my machine but I couldn't find it. I don't know how to solve it. Do you have any idea? ...

QT: QPainter + GDI in the same widget?

I'm trying to use the method described here to use a QPainter and GDI calls on the same widget. Unfortunately this tutorial seem to have been written on an earlier version of QT and now it does not work. I set the WA_PaintOnScreen flag and reimplement paintEngine() to return NULL. Then on the paintEvent() I create a QPainter, use it an...

How to update application files using patching?

I am not interested in any auto update solution, such as ClickOnce or the MS Updater Block. For anyone feeling the urge to ask why not: I am already using these and there is nothing wrong with them, I would just like to learn about any efficient alternatives. I would like to publish patches = small differences that will modify existing ...

How to remove localization .NET Framework of russian?

I installed Windows 7. Install Visual Studio 2008 with .Net Framework 3.5. Then Russified Windows. And after this error message in Visual Studio suddenly appearing in Russian. How can I remove a Russian translation for error messages .NET Framework? ...

Run function on running application on execute

Alright so what I am trying to do is essentially create a program that, when it is already executed, can be "executed" again, detect the already existing process and instead of creating another process, execute a function in the existing process. Any ideas? It's possible I am going at this all wrong. I am trying to adapt this open-sour...

Windows Azure: Creating a subdirectories inside the blob

I wanted to create some subdirectories inside my blob. But it is not working out well Here is my code protected void ButUpload_click(object sender, EventArgs e) { // store upladed file as a blob storage if (uplFileUpload.HasFile) { name = uplFileUpload.FileName; // get refernce to the...

Where can i find a list of "Microsoft OS Descriptors" for USB?

I am trying to find a list of "Microsoft OS Descriptors" for USB. The best I could do is find a reference to "Appendix 1 of Extended Compat ID OS Feature Descriptor Specification". Of course I can not find this either. Any ideas? ...

C++ thread to separate process

Is there any way I can have a thread branch off into its own independent process? I know there's the CreateProcess function but as far as I can tell, you can only run external applications with it. Is what I'm asking for at all possible? ...

Can a Mono application be deployed using ClickOnce?

I am using Mono to write a cross-platform application. On Windows, is it possible to deploy this application using ClickOnce? ...

(Why) does Tomcat/Java perform better on Linux than on Windows?

I just read this (one) study in which Tomcat under Linux outperformed Windows. From your experience, is this generally true? Any deep reason that could explain the performance difference? ...

How to install a Linux Rails gem on Windows

I need to upload vendorize a gem which is causing problems at my host - in this case nokogiri. My host is using linux, my development system is windows. The gem contains binaries and so my local gem downloads the win32 binaries. Is there any way I can get gem to download the linux binaries, so I can vendorize and upload them? ...

Windows Azure: Creation of a file on cloud blob container

I am writing a program that will be executing on the cloud. The program will generate an output that should be written on to a file and the file should be saved on the blob container. I don't have a idea of how to do that Will this code FileStream fs = new FileStream(file, FileMode.Create); StreamWriter sw = new StreamWriter(...

How to get number of cores in C?

I'm writing a program in C on windows that needs to run as many threads as available cores. But I dont know how to get the number of cores. Any ideas? ...

DirectX Desktop

Hi. I'd like to make an animated desktop background for Windows 7 using DirectX. I'm using C#, SlimDX and a couple of P/Invoke imports of Windows API functions. I'm not brilliant with native Windows programming, but I've had a poke around online and I believe what I need to do is either: 1) Find the handle of the window containing the ...

C# .net windows application setup not running in windows 7

hello i have created one windows application in c# .net and its working fine in windows xp, but when i try to install the setup in windows 7 or vista,the setup never runs.. should i have to write some code for it...? please help Thanks & Regards Deepu ...

Need GDI programming Guideline

I want to change my window design rapidly. I have OnPaint function which I am calling when WM_PAINT message received. The design change only when the event occure. I want that design should automatically update doesn't depend on event kindly guide me how can I make it possible. ...