|
I need to create an intranet website (stored within a company firewall) where a customer can call our support desk and the system checks which reps are currently available to answer a phone call, then routes the phone call to the rep via VOIP.
In other words, each rep will not be speaking through a phone but rather their PC (which I'm assumming only VOIP can handle).
I'd prefer to create my own .NET app to handle this so if anyone knows of a tutorial or a good starting point to begin researching, that would be great. Also, if anyone knows of a commercial solution already out there that can handle this, I'd appreciate that info as well.
Thanks in advance.
-Goalie35
|
|
|
|
|
No, I don't mean hiding it under a box or something.
I need a way, from a console app, to completely hide the mouse cursor. Back in the days of Window 3.1, I think I did something like that once. You think I still have the code for that? HAHAHA!
So, how do you do it?
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
|
|
|
|
|
Cursor.Hide
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Stefan Troschütz wrote: Cursor.Hide
That doesn't work for a console app.
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
|
|
|
|
|
namespace HideMouse
{
class Program
{
static void Main(string[] args)
{
while (true) {
Cursor.Position = new Point (-10, -10);
}
}
}
} This doesn't hide the mouse, but renders it effectively useless.
/ravi
|
|
|
|
|
Ravi Bhavnani wrote: but renders it effectivly useless.
I tried that. The mouse doesn't actually move beyond (0, 0), so there's still a piece of it visible. Possibly because I'm using UltraMon and/or Synergy. I need a system-wide way of doing this.
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
|
|
|
|
|
Try (2048, 2048) .
[edit]
And of course I was brain damaged when I wrote that code. You want to set the cursor's position to a static Point instead of newi ng one up zillions of times per second.
[/edit]
/ravi
|
|
|
|
|
Ravi Bhavnani wrote: Try (2048, 2048).
It must be something I have installed, perhaps, but that only moves the mouse cursor to the bottom right of the screen. I can still see a piece of it.
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
|
|
|
|
|
Bummer.
Are you running dual monitors? Do you have better luck with outlandishly large (yet valid) coords like (16384, 16384) ?
/ravi
|
|
|
|
|
Ravi Bhavnani wrote: Are you running dual monitors?
Not on this computer. But I am running Synergy. That may be causing problems.
There must be some way though of telling Windows at the system level to turn off the mouse pointer.
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 you could try setting it to a custom cursor that's transparent and has no hot spot?
/ravi
|
|
|
|
|
System.Console.CursorVisible = false , does that work Marc?
|
|
|
|
|
Judah Himango wrote: System.Console.CursorVisible = false,
That nukes the blinking cursor in the console window. But the mouse cursor is still staring at me.
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: That nukes the blinking cursor in the console window. But the mouse cursor is still staring at me.
Calling the Cursor.Hide from the Windows Forms APIs doesn't work either, eh?
|
|
|
|
|
Judah Himango wrote: Calling the Cursor.Hide from the Windows Forms APIs doesn't work either, eh?
Nope. I think that's too intimately tied to a form. Some of the methods in Cursor work, like setting the position, while others don't, like Show/Hide and Clip, it seems.
Ain't console mode fun! This is for a turnkey app that displays some videos where user doesn't even have a mouse, so I want to be able to completely remove the Windows mouse pointer from the screen. I tried negative coordinates and positions > screen extents, but no luck.
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
|
|
|
|
|
You mention some of the cursor methods work... It'd be a hack, but how about creating a custom cursor that simply is a completely transparent bitmap. If it actually affects the cursor, it would be invisible.
|
|
|
|
|
Have you checked any of the Win32 API calls? I know it's possible since Windows Media Player in full screen mode hides both the task tray and the mouse cursor after a few seconds of no keyboard/mouse activity.
[edit]Look at the ShowCursor[^] function or the SystemParametersInfo[^] function and setting SPI_SETMOUSEVANISH.[/edit]
-----------------------------
In just two days, tomorrow will be yesterday.
|
|
|
|
|
Hello,
I have the following problem, In a window form I have a panel (with autosroll enabled) and inside this panel I would like to add dynamicly other panels. I have a variable that holds the number of panels inside the main Panel. So whenever I add a new panel,its location is calculated by (number_of_panels+space_between_two_panels)*panel_height
The code works fine.. until I scroll down the mainpanel to the bottom, then when I add a new panel inside it there is a huge gap between the last panel and the newly added one.
Any one can tell me why? and how to solve it ?(I dont want to scroll the main panel all the way up just to add a new panel).
Help appreciated,
Pawel
|
|
|
|
|
I think you have to somehow consider the value returned by the AutoScrollPosition property in your calculation.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Hi,
what your are doing sound principally correct and the fact that you have scrolled shouldn't matter. I assume there is some little mistake in your implementation (probably you are using a wrong property at some place). You probably have to post some code.
Instead of calculating all positions yourself you could also with panel.Dock = DockStyle.Top to the container panel. This way the framework should handle the correct positioning.
Robert
|
|
|
|
|
Hi,
I write an application in C# 2003. this program should list all the available serial ports on the computer and display it for the user. I tried with MSComm and AXMSComm to identify the Serial ports. But this components have only a function by the name of “commport” that return the index of one port to be used. Is there any way to identify all the serial ports and theirs name?
Thanks for your help
/Babak
|
|
|
|
|
Hi,
I usually search the registry (HKEY_LOCAL_MACHINE\HARDWARE\DEVICEMAP\SERIALCOMM) for this information.
Regards,
Tim
|
|
|
|
|
Hi guys!
I need some help please, I have a treeview with many nodes and the nodes and sub nodes. i.e.
-Root
---Nodes
-----sub nodes
My nodes have a context menu which allows me to disable the subnodes and hence change the imageindex of the subnodes to an inactive icon. When I make this change I reload all the nodes and I would like to reload and go to the NODE on which I made the change. Basically refresh the treeview and jump to the make the selected node the node that I made the change on.
Please help!!!
sasa
|
|
|
|
|
With this c# code I try to write vb6 code. I am a newbie in C# and I think this is not a good approach to my need. I want to create a list of different objects that write the code, but list admit only the same kind of classes (type-safe, right?). I Know i can resolve this using List<object>, but your opinions are useful.
In the example below I do this.
root (form)
|
|--- eFrame
| |
| |--- eTxt (TextBox)
|
eLbl (label)
Example.
--------
public class Tester
{
static void Main()
{
FormControl root = new FormControl("Main", "frmMenu");
Element eFrm = new Element(root);
TextBoxControl txt = new TextBoxControl("txtName",false, " ");
Element eTxt = new Element(txt);
LabelControl lbl = new LabelControl("Name", " ");
Element eLbl = new Element(lbl);
FrameControl frame = new FrameControl("Frame", " ");
Element eFrame = new Element(frame);
frame.AddChild(eTxt);
root.AddChild(eLbl);
root.AddChild(eFrame);
Console.WriteLine(root.GenerateCode());
}
public class BaseControl
{
protected string name;
protected string indent = "";
protected List<element> elementsList;
public BaseControl(string name, string indent)
{
this.name = name;
this.indent = indent;
elementsList = new List<element>();
}
public string Indent
{
get { return indent; }
set { indent = value; }
}
public string Name
{
get { return name; }
set { name = value; }
}
public void AddChild(Element e)
{
elementsList.Add(e);
}
}
public class FormControl : BaseControl
{
private string caption;
public FormControl(string caption, string name)
: base(name, "")
{
this.caption = caption;
}
public string GenerateCode()
{
string code = "";
code += indent + "Begin Form code\n";
foreach (Element e in elementsList) { code += e.GenerateCode(); }
code += indent + "End Form code\n";
return code;
}
}
public class FrameControl : BaseControl
{
private int index;
public FrameControl(string name, string indent)
: base(name, indent)
{
index = -1;
}
public FrameControl(string name, int index, string indent)
: base(name, indent)
{
this.index = index;
}
public int Index
{
get { return index; }
set { index = value; }
}
public string GenerateCode()
{
string code = "";
code += indent + "Begin Frame code\n";
foreach (Element e in elementsList) { code += e.GenerateCode(); }
code += indent + "End Frame code\n";
return code;
}
}
public class LabelControl : BaseControl
{
private string caption;
private static int index;
public LabelControl(string caption, string indent)
: base("", indent)
{
this.caption = caption;
index = 0;
}
public string GenerateCode()
{
string code = "";
code += indent + "Begin label code\n";
code += indent + " ....\n";
code += indent + "End lable code\n";
return code;
}
}
public class Element
{
private delegate string GenCodeDelegate();
private GenCodeDelegate doCode;
#region ' Contructor overloaded '
public Element(LabelControl lbl)
{
doCode = new GenCodeDelegate(lbl.GenerateCode);
}
public Element(TextBoxControl txt)
{
doCode = new GenCodeDelegate(txt.GenerateCode);
}
public Element(FormControl frm)
{
doCode = new GenCodeDelegate(frm.GenerateCode);
}
public Element(FrameControl frame)
{
doCode = new GenCodeDelegate(frame.GenerateCode);
}
#endregion
public string GenerateCode()
{
string code = "";
code = doCode();
return code;
}
}
Thanks in advance.
Gerard
Sorry for my english.
|
|
|
|
|
Hi,
I would define your class BaseControl as abstract (public abstract class BaseControl... ) and add a abstract method to it:
public abstract string GenerateCode();
Now every inheriting class needs to overwrite it:
public overridestring GenerateCode() {
}
Now its sufficient that your list only hold BaseControl instances and you won't need the class Element anymore.
Robert
|
|
|
|