|
Luc Pattyn wrote: CTRL/- goes to previous location ("navigate backward")
and CTRL/SHIFT/- is "navigate forward"
Very cool! I'd tried a few keywords in the keyboard customization to see if anything came up, but "navigate" wasn't one of them.
Marc
Thyme In The CountryPeople are just notoriously impossible. --DavidCrow There's NO excuse for not commenting your code. -- John Simmons / outlaw programmer People who say that they will refactor their code later to make it "good" don't understand refactoring, nor the art and craft of programming. -- Josh Smith
|
|
|
|
|
I am needing to find out the current CPU usage to determine if I need to run a service or not. If the computer is currently busy then I would like to pause my win-services for x-amount of time and then run it again so users don’t feel the repercussions of my programming and vice versa.
In the Task Manager (at the bottom status bar) we can see the # of processes, CPU Usage etc. How I can get/calculate that? Are there any classes available?
Thanks in advance.
|
|
|
|
|
Have a look at System.Diagnostics.PerformanceCounter .
If you want to run a process that does not degrade the performance, you can start a thread with the Priority property set to BelowNormal .
---
Year happy = new Year(2007);
|
|
|
|
|
This link[^] should help.
Marc
Thyme In The CountryPeople are just notoriously impossible. --DavidCrow There's NO excuse for not commenting your code. -- John Simmons / outlaw programmer People who say that they will refactor their code later to make it "good" don't understand refactoring, nor the art and craft of programming. -- Josh Smith
|
|
|
|
|
Thanks a lot
|
|
|
|
|
Microsoft lists System.Object as a reference type but how a value type like int or bool descends from System.Object?
There's arms,
Caetano
|
|
|
|
|
This link[^] should help explain the matter. It's a good read actually!
Marc
Thyme In The CountryPeople are just notoriously impossible. --DavidCrow There's NO excuse for not commenting your code. -- John Simmons / outlaw programmer People who say that they will refactor their code later to make it "good" don't understand refactoring, nor the art and craft of programming. -- Josh Smith
|
|
|
|
|
I'd like to completely prevent the "...has encountered a problem and needs to close. We are sorry for the inconvenience" dialog and handle the error internally.
Without using try-catch.
This is multithreaded console app. I've tried hooking Application.ThreadException, Application.SetUnhandledExceptionMode, and AppDomain.CurrentDomain.UnhandledException. Unless I'm doing something wrong, those don't prevent the dialog from appearing.
Any ideas?
Marc
Thyme In The CountryPeople are just notoriously impossible. --DavidCrow There's NO excuse for not commenting your code. -- John Simmons / outlaw programmer People who say that they will refactor their code later to make it "good" don't understand refactoring, nor the art and craft of programming. -- Josh Smith
|
|
|
|
|
Marc Clifton wrote: Without using try-catch
Just currious but ... why?
led mike
|
|
|
|
|
Argh. I just hit the ESC key and wiped my entire reply.
The short of it is that I'm experiencing this dialog even though the entire Main is wrapped with a try-catch block. It occurs when I'm using DirectX / DirectShowLib when playing a bad DVD. But it's hard to reproduce.
Turning the question around, I'm wondering if it's possible to prevent the catch from working. The DirectShowLib code has this interesting error handler:
Marshal.ThrowExceptionForHR(hr);
Also, I'm wondering if there's a thread (not created by me) that is throwing an exception. However, I thought thread exceptions were usually silent.
So, that's why I asked. Because it appears to be occurring with something not in my control.
Marc
Thyme In The CountryPeople are just notoriously impossible. --DavidCrow There's NO excuse for not commenting your code. -- John Simmons / outlaw programmer People who say that they will refactor their code later to make it "good" don't understand refactoring, nor the art and craft of programming. -- Josh Smith
|
|
|
|
|
Perhaps the Application.XXXX exception mechanisms rely on a GUI thread or WinForms framework which you don't have.
Have you tried reproducing the behavior from a WinForms application?
led mike
|
|
|
|
|
led mike wrote: Perhaps the Application.XXXX exception mechanisms rely on a GUI thread or WinForms framework which you don't have.
I was worried about that.
led mike wrote: Have you tried reproducing the behavior from a WinForms application?
Not yet. It's on the list of things to try. But first I want to figure out how to consistently, with a test jig, create the problem.
Marc
Thyme In The CountryPeople are just notoriously impossible. --DavidCrow There's NO excuse for not commenting your code. -- John Simmons / outlaw programmer People who say that they will refactor their code later to make it "good" don't understand refactoring, nor the art and craft of programming. -- Josh Smith
|
|
|
|
|
Hi, does anyone know how i determine the class wich member can not be serialized ?
For Example:
Lets say i have a class A that have a member wich is from class B. But class B ist not serializeable.
So now, how do i find out, that it is class A wich can not be completely serialized cause class B ?
|
|
|
|
|
MarkPhB wrote: So now, how do i find out, that it is class A wich can not be completely serialized cause class B ?
You can use reflection to get the Type information for a class, then test the myType.IsSerializable property.
Marc
Thyme In The CountryPeople are just notoriously impossible. --DavidCrow There's NO excuse for not commenting your code. -- John Simmons / outlaw programmer People who say that they will refactor their code later to make it "good" don't understand refactoring, nor the art and craft of programming. -- Josh Smith
|
|
|
|
|
I am wondering if there is a way to notify a control that had something dragged off of it that the object dragged was successfully dropped on another control or object.
Like a DragDropCallback delegate function.
Brent
|
|
|
|
|
When you start a drag/drop, you pass in the object being dragged, you could create a struct that contains what you want to drag/drop, and a reference to the control that was the source
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
hi,
I'm working on a web setup project. I need to perform a custom action, for that purpose i've created an installer class. It works well when the user enters a single word as the name for virtual directory, but in case if user inserts more words, it fails . If I change the customactiondata : /vdir="[TARGETDIR]" it also thwros an error. Did someone know the solution to this problem?
Thanks
|
|
|
|
|
i want to show capslock status in c# status strip, it should be very small coding...
we are in illusionary life
|
|
|
|
|
The easiest way is by polling, so use a Forms.Timer to periodically (say every 1000 msec)
execute:
bool capsLocked=(Control.ModifierKeys & Keys.CapsLock)!=0;
// now adapt UI according to capsLocked
Luc Pattyn
|
|
|
|
|
Hi!
I am looking for a way to draw the items of a ToolStripComboBox (DropDownStyle = DropDownList) on my own. It is a ToolStripComboBox that contains all fonts and I want to show the names of the fonts in their own font - erm, like in Word
I think there is no way to draw the items on my own with a ToolStripComboBox, but with a ComboBox there is one. I intended to host a ComboBox in a ToolStripComboBox ToolStripControlHost, but even when I set the FlatStyle to Popup, the ComboBox looks not like a normal ToolStripComboBox.
Here is a picture that shows, both normal and focused state: link
-- modified at 9:39 Friday 19th January, 2007
|
|
|
|
|
|
Hi all,
I am creating an Windows service using c# 2005, it will check my mail box and has to dispaly the subject of the new mails. I created an service to check the new mail, but I didn't get an idea to dispaly the list near the Task bar. I tried for notify icon's ballon, but it allows only 256 characters only.
Plz any one suggest me to how to display an alert window near the Task bar using the windows service
Thanks in advance
Know is Drop, Unknown is Ocean c
|
|
|
|
|
how can i use monitoring a computer
services in csharpdot net in my project(network_monitoring programing)
and store the servics the client run it in log files (maybe database)
|
|
|
|
|
|
Hi Guys,
I'm looking for a really simple method of retrieving the name of the class using reflection? I only want the Name of the Current class?
Does anybody have any pointers?
|
|
|
|