Imagine you have two buttons on the win form. What do you think should be the behavior when user presses the "button 1" with the below code?
Should it display all 5 message box in one go, or one by one - MessageBox.Show statement is inside a lock statement?
public partial class Form1 : Form
{
public Form1()
{
Initializ...
I have an application that opens up IE browser windows at certain intervals throughout the day. I would like to control the monitor that the browser window opens up to (for example browser1 opens on monitor1 and browser2 on monitor2 and browser3 on monitor1 and browser4 on monitor2). Is there a way using C++ (app is written in C++) to co...
If you stare at a monitor for 8-12 hours a day looking at code, I have a couple questions for those that may have researched the health factors of this or have tried a few options.
To be easy on the eyes, can a monitor be "too big"?
Is there a particular type of display technology over another that reduces eye fatigue?
How bright shoul...
I'd like get a notification if a particular process starts. For ex., if xyz.exe starts in the background, I need a messagebox stating the same.
I'm a little familiar with Windows Hooks in VC++. Can someone point me to some similar links or methods to achieve my goal? Thanks.
...
Hi,
I'm already using some code to turn off the monitor power but I'm still with a little problem.
The code works fine most of times but once a in a while, the monitor turns blank. What I mean by this is that the screen is totally black, you can't see anything, but you can see it's still lit. The LCD light is still turned on but the sc...
In the very near future my development setup will be upgraded and part of the deal will be dual monitors (yay!)
At least one of the monitors, possibly both, will be widescreen.
I've heard of developers using a second monitor, especially a widescreen monitor, in portrait mode. It allows for many more lines on the screen (albeit narrower...
I have a bit of code, which I can't figure out properly. The problem is that the program is multithreaded and within there is a bit of code that should be synchronized so I wrote this:
lock (lockObject)
{
if (!Monitor.TryEnter(lockObject))
Monitor.Wait(lockObject);
//do stuff...
Monitor.PulseAll(lockObject);
}
Monitor.Exi...
Since quite a few here spend 10+ hours a day in front of their monitors and stress their eyes with it would you consider it worthwhile the investment to go with a LaCie, NEC or EIZO display instead of the common HP/DELL office screens?
The biggest advantage even if you do not work with imaging seems to be the build in colorimeter to wor...
In my application I want to be informed by events, that another application has been started or stopped. I have an existing API to the running application which cannot be changed to accomodate notification which would be the obvious solution.
What I have is a function call in the API (isRunning), so I decided to make a polling thread wh...
I'd like to monitor HTTP traffic to/from my PC so I can watch web services interaction. (SOAP and RESTful services) There seems to be a lot of different software out there for this. What do you all recommend?
...
I followed the example from http://www.ruby-doc.org/stdlib/libdoc/monitor/rdoc/index.html and modified the code a bit:
require 'monitor.rb'
buf = []
buf.extend(MonitorMixin)
empty_cond = buf.new_cond
producer = Thread.start do
# producer
line = "produce at #{Time.now}"
#while line
buf.synchronize do
puts "==> #{line}"
buf.pu...
Hello,
I have a LAN setup with multiple computers connected (wired) to it. I have a regular D-link dir 300 router. Am wondering how can I monitor the bandwidth? See what sites are being viewed? Monitor IM chats?
Is this possible?
Thank you.
...
I wanted to see what happened if you change the reference of an object exclusively locked by Monitor.Enter(). As expected a SynchronizationLockException was thrown. But I was surprised to see several threads getting past the Monitor before the exception was thrown.
Here's what the code below is doing.
create and start 100 threads
mak...
I'm looking for some recommendations for website tools to ensure that deployed sites are always live and available. Ideally, I'd like to have a decent reporting / messaging mechanism from it to report when any faults occur.
I've considered using CruiseControl and having some custom .Net libraries ping each site and analyse the response ...
How would I go about creating an HTTP Proxy in Java for use recording and playing back HTTP Sessions? This would be for entirely legitimate performance monitoring purposes.
Are there any classes in the standard JDK or does anyone know of any examples that are available?
Thanks.
...
I want to write a program, which will launch a child process. The child process may be windows mode or console mode program.
I want to monitor the child process status and resource usage. e.g. I want to know the child process is still running or terminated. If it terminated, I want to know the reason (is terminated normally or because o...
Hi.
I'm trying to detect video-off by "Power Option" - "Turn off monitor" configuration.
When system goes sleeping, it broadcasts WM_POWERBROADCAST. Is there any event broadcasted when monitor goes off? Or is there any settings which I should check periodically?
TIA.
...
What's the difference between a monitor and a lock?
If a lock is simply an implementation of mutual exclusion, then is a monitor simply a way of making use of the waiting time inbetween method executions?
A good explanation would be really helpful thanks....
regards
...
Many C/C++/Fortran and other programmers would have come across "stack overflow" errors.
My question is, Is there a tool, a program or a simple code snippet, that allow us to monitor or check the size of the stack while the program is running? This may be helpful to pinpoint where the stack is being accumulated and eventually causing ove...
.Net's odd locking semantics are bugging me again.
I'm launching a thread, the child thread in turns starts a form. The parent thread should wait until the form is created.
My first attempt was to use a Monitor to watch the Form variable:
private void OpenForm()
{
if (FormThread == null)
{
Monitor.Enter(Form);
...