windows

How do I style Windows.Forms.Datagrid numbers to show like Excel?

I want my datacolumns in my Windows.Forms.Datagrid to show like Excel, red for negative numbers in brackets, and black for positive numbers. Also i want to right align the cells, but left align the header. Is this possible? ...

.gitignore does not understand my folder wildcard on windows

I'm encountering a weird issue with .gitignore on Windows. I want git to ignore all .exe files, except those in the Dependencies folder (and all subfolders). So I have: .gitignore: *.exe !/Dependencies/**/*.exe This, unfortunately, does not work. Meanwhile, this does: *.exe !/Dependencies/folder/subfolder/*.exe So I'm won...

Launching Web Browser from Windows Service

Is it possible to launch a web browser from a windows service? I have created a basic service in C# and installed it under the "LocalSystem" security profile. The code for the service looks as follows: namespace Bootloader { public partial class Service1 : ServiceBase { public Service1() { Initializ...

monthcalendar control selected range not drawing correctly

I have a monthcalendar control in my form and when I select a range, the range just whites out. I checked the titlebackcolor (Highlight) and titleforecolor (AliceBlue) and they are not set to white. Anyone know what I can do to correct this? ...

How can I add the Assembly* values back to my executable?

As part of the solution to another question I asked I have added a resource file to my project. I was able to set the icon for the application in the resource file but I'm not sure how the other attributes (ie: File Version, Description, Copyright, etc.) should be set. I imagine I need to put them in the resource file but I'm not clear o...

Windows DataGridView BindingSource Index out of range exception

Scenario: Basically i have a System.Windows.Forms.DataGridView A class that inherits BindingSource and IBindingList A class that has 2 standard List as private properties DataGridView dgv = new ... MyBindingSource bindingSource = new ... MyList list = new ... The DataGridView.DataSource property gets set to the BindingSource and...

Is passing a windows security token between processes permitted

Imagine I have an existing process running under windows as a particular user. Would it be permitted for that process to take its current token (with something like OpenThreadToken and DuplicateTokenEx), pass it to another process on the same machine (perhaps through a network socket or some other IPC), and then expect that process to be...

menu item selection issue on wince

Hi friends did anyone out there have experienced the following issue? I have a Microsoft Windows CE .Net device. The problem is with menu's i.e when i Click Start > Settings (has submenu) the Control Panel is opened immediately without waiting for the user to select "Control Panel". This sort of behavior is caused due to overlapping ...

Unusual high cpu utilization in ntkrnlpa:FsRtlAreNamesEqual and ntkrnlpa:RtlUpcaseUnicodeString

I am profiling a networking workload application on Windows XP. The VTune profiling result shows unusual high utilization on ntkrnlpa:FsRtlAreNamesEqual and ntkrnlpa:RtlUpcaseUnicodeString functions. From the module level, the workload spends 73% cpu time in ntkrnlpa.exe. In ntkrnlpa.exe module, 42% time is spent in FsRtlAreNamesEqual fu...

COM Deployment for VISTA

Hi, What is the COM interface that need to be implemented in order to deploy COM dll in a vista/win7 machine. I heard that there is something to deal with UAC accounts with COM, but I could not find MSDN page for this, Please help. Thank you ...

C++ crash dump, stack unwinding on Win32 exceptions (when catch(...) used) - VS 2003

Like in Just In Time debugging, does VS 2003 compiled apps catch Win32 (or asynchronous) exceptions in a catch (...) and unwind the stack? before the dump file is written... ...

c++ sending image to printer , (PRINT) .

Hello , this is code which i use to make image. Bitmap bitmap; bitmap.CreateBitmap(715, 844,1,1, NULL); CDC memDC; memDC.CreateCompatibleDC(NULL); memDC.SelectObject(&bitmap); CString SS="Sun Goes Down"; memDC.TextOutA(1,2,SS); CImage image; image.Attach(bitmap); image.Save(_T("C:\\test.bmp"), Gdiplus::Image...

What happens to open handles when an application crashes? (Windows XP onwards)

I was under the impression that if an application has an open handle and it crashes, the handle isn't released and if you try to access that handle (let's say of a file) then you would get an error. However, I have tried this in Windows XP onwards and the handle seems to get released if I close the exe from task manager, before it has c...

Window handling manager

I have a Windows box that is running three applications. When the applications are started each application creates a borderless window which is positioned such that they overlap in a particular way. At the moment, when I click on a control on the bottom window, it comes to the top of the window stack. I need to ensure that each windo...

Bypassing Windows HW Installation Wizard

I am developing USB product on an AVR32 which is going well. We have used a USB library and have the USB Device working. The USB library came with an .inf file that we simply point the windows hardware installation wizard at and our USB Device which then appears as a COM port on the windows machine. I am now writing a VB application f...

To run Phonon on Windows XP sp2

can anyone tell me from where i can get a fully functional phonon that runs on windows, if compilation needed , then from where i can download directly the compiled output. Or tell me which other multimedia toolkit can be used with QT and how ? ...

Performance Counters in Windbg Crash Dump

Is it possible to see thread performance counters in dump of native c++ application in windbg. ...

need code for communication through serial port to QT

hi, can anyone send me the syntax for establishing the communication through serial port to QT? ...

Windows Mobile:Creating button controls through resource?

Hello, I am creating a Windows Mobile 6.0 Professional SDK based Win 32 smart device project in Visual Studio. I need to create three button controls in the center of the home screen window of my app. I am new to Windows Mobile development. After i created the project, i am seeing in the project resource (.rc file), none of the item sh...

Is there any real point compiling a Windows application as 64-bit?

I'd confidently say 99% of applications we write don't need to address more than 2Gb of memory. Of course, there's a lot of obvious benefit to the OS running 64-bit to address more RAM, but is there any particular reason a typical application would be compiled 64bit? ...