Ben - ECM's Q&A profile
Software Development for Windows Vista UAC filtering WMI
I am developing an application that will run on Windows Vista. My goal is that I am trying to access the current CPU load percentage. I tried to do this via WMI with mixed results. If the program runs in elevated mode I am able to see a LoadPercentage variable that contains the current CPU load percentage. If I run the program in normal user mode everything gets populated except for the LoadPercentage variable. I believe that this behavior is due to the fact that UAC is filtering my WMI results. Does anyone know a way around this Is there another way to access the current CPU load percentage without requiring admin privileges Here is my C# code: using System; using System.Collections.Generic; using System.Text; using System.Diagnosti ...Show All
SQL Server Report Builder Formatting Currency
Hi all I need Report Builder to format Certain Numbers as Currency by default. According to the documentation I need to set the culture setting in the report's datasource. I'm using a SSAS2005 Cube The Report Manager then let's me create the Model wich is used by Report Builder. My Question is: Where do I set the culture setting I cannot find it in the Cube and viewing the model's xml hasn't helped. Any help will be dearly appreciated G http://localhost/Reports/ click on Your model name Properties Tab: General DataSources Security ...Show All
Visual Basic Two Decimal Point For Double Value
How to get two decimal point value for a double value For example 231.321312321312132 = 231.32 and 231 = 231.00. Thank you. lucerias wrote: Is there any way to check how many zero(s) of an integer, for example 2000000 has 6 zero(s) I am thinking of using For Loop, is there any other way else Besides that, how to round the value from 3,242,423,432 to 4,000,000,000 Thank you. 'DISCLAIMER: Note this code doesn't round up or down specifically. 'It just takes the 1st number and adds the noughts!! Dim myValue As Double myValue = 3242423432.456789 myValue = Int(myValue) Dim myLength, index As Integer Dim newString1, newString2 As Strin ...Show All
.NET Development (XslCompiledTransform) Cannot process XML containing DTD
WHAT I'M TRYING TO DO I simply want to transform an XML file using an XSLT file. But the process throws an exception with XML files referencing a DTD. My research uncovered that I must set the "ProhibitDtd " property to false. As you can see in my code sample below, I did this. For some reason, the setting wasn't effective. I suspect I am making some sort of syntax error that is resulting in an improperly set property. SYSTEM Windows 2000, Visual Basic Express 2005 ERROR MESSAGE: For security reasons DTD is prohibited in this XML document. To enable DTD processing set the ProhibitDtd property on XmlReaderSettings to false and pass the settings into XmlReader.Create method. CODE USED (EDITED FOR SIMPLICTY OF T ...Show All
SQL Server Advanced SQL Generation Options in VS2005
Hi There im not sure if im in the right place but i was wondering why the above option is greyed out when creating a new sql datasource. This occurs even when i select all fields within the table (including primary key fields) Thanks Todd I have the same problem. I set the primary key in the table I'm trying to access to ArticlesID with the value of int, I select all the proper settings, but the Advanced SQL Options is still greyed out. I cannot seem to get this to work. ...Show All
Windows Forms How to calculate the coordinates of text-entry fields in pre-printed forms?
I would like to write an application in C# to collect data from users and then print them on pre-printed forms (examples of pre-printed forms: visa application forms, employment application forms, social insurance application forms, etc...). The forms have hundreds of text-entry fields. What is the best way to print the data on the forms I guess I have to calculate the coordinates of each text-entry field to do printing. If so, what approach would you recommend By the way, is C# a good programing language to write this type of application Is there any other programing language that you you would recommend I am pretty new to C#, so I don't mind switching to another language if it's better suited to my need to write the application. T ...Show All
Software Development for Windows Vista How can I do to fix Hybrid sleep function?
Dear All, I have a problem in my NB. When I install vista X86 and then open "Hybrid sleep" mode. It is fail! How can I do to fix Have any suggese My setp by step: 1. Enable hybrid sleep function. 2. Enter S3 (start menu choose “sleep”). 3. Remove AC and DC. 4. Plug-in AC or DC. 5. Power on the unit. 6. System resumes from S4. And then it will show error message as below: The last attempt to resume the system from its previous failed. Attempt to resume again (Use the arrow keys to highlight your choice) Continue with system resume Delete restore ...............................menu. This forum is geared for developers creating ...Show All
.NET Development WebClient.UploadFile
I am using WebClient class to upload files from client side to server side, the system succeed to copy the file but fails to open it due to header lines were added, Please advice How can i upload the file from the client to the server successfully Nadia That's a multipart/form-data request. If your web application consumes "raw" posts, don't use UploadFile() . Instead, use UploadData() or OpenWrite() . ...Show All
Windows Forms Visual Basic - printing to a listbox
How do I make Visual Basic enter values in a listbox while the program is running, instead of waiting until the end and then displaying all values Thanks for the link. Wow, Euler is my favorite mathematician. Because he was practical AND a genius. Fourier needs to kiss his mantle, and then nobody for a while until Leibnitz and Newton. Way too tuff for me... ...Show All
Visual C# Retrieving info from other windows
How can I retrieve info from other windows For example, what should I use to get the http adress from Firefox from the most active window Or the playlist in currently running WMP Ok so I got the adress: "0x001c02a4, class: "MozillaUIWindowClass" what next should I do Something with Interop DLL, but I'm weak in this subject, pls if possible add a simple code to this particular problem.. Thx alot for prev answer! ...Show All
Windows Forms How to hide form from Alt-Tab dialog
Hi, I'm creating a borderless form by setting this.FormBorderStyle = FormBorderStyle.None When I show the form, if users press Alt-Tab to switch among applications, they can still see it. How can I disable it Thanks a lot. Paste this code into your borderless form: protected override CreateParams CreateParams { get { // Turn on WS_EX_TOOLWINDOW style bit CreateParams cp = base.CreateParams; cp.ExStyle |= 0x80; return cp; } } ...Show All
.NET Development Importance of CLS Compliance in code and its consequences if code is not compliant
Hello Friends, I am Rajiv. I am currently working on Dot.Net Framework to develop an application for GIS domain. During application developement, I found CLS compliant warning. What is this CLS compliance and why it is important How to generate the code which is compliant to CLS Hope for positive response from you guys... thanks. Hello Rajiv, Hope following help you http://www.summsoft.com/blogs/garyvsta/archive/2006/08/21/Warning_3A00_-_2700_AppAddIn_2700_-is-not-CLS_2D00_compliant-because-it-derives-from-_2700_Application_27002C00_-which-is-not-CLS_2D00_compliant.-.aspx ...Show All
Visual Studio Team System Answering some user questions about TFS failures
Hi, I also posted this in Visual Studio Team System General, but I think it was the wrong place to post. So here goes. I'm the administrator for the Team Foundation Server at my company. I installed it as a single server (Xeon 2.8 GHz, Nocona, 1 GB ram ecc, 2 sata disks in raid 1 config) and it works fine. However, there are times when the users (i.e. the developers) complain that they can't check-in items. There are no traces of the event in the event logs and there don't seem to be any other signs of a malfunction. After they try again, once or twice it usually works. My question really is: what do I tell them when they ask me "why can't I check in this file " (doesn't happen with check-in only, managers somet ...Show All
Windows Forms How to make mouse cursor disappear
I need help in Visual C# How do you make the 1) Mouse Cursor Disappear on Form Load & 2) Mouse Cursor Appear on Form Closed because I am using Touch screen monitor so I do not want the Cursor to appear when the Form Loads as the Form is Full Screen but when it closes the cursor will appear again How do I do it. Thanks in Advance! Hi You can changes the cursor to a cursor designed by you. If you create a Single Pixel Cursor and load it on form load then Virtually ur cursor will be disappeared. Or you can Set the Mosue position where you want on Mouse Move method you can get the coordinate and you can fix it to some posiition. ...Show All
Windows Forms ClickOnce and proxies
This year my company needed to release a bit of software that interacted with a government service, and as last year we had to change it so many times during its lifetime we decided that ClickOnce would be perfect for deployment, as it is quick and simple for the user and has automatic updates. However, we have run into problems with a few customers where they have proxy servers set up (usually isa). In this situation ClickOnce doesn't activate, and you have to edit the file machine.config on the users computer and add the section <system.net><defaultProxy><proxy usesystemdefault="true"/></defaultProxy></system.net>. My question is this: How is a user, or even an IT department, ever supposed to find ...Show All
