|
The Shopkeeper was subsequenlty arrested on numerous accounts of GBH, and spent 7 years in Broadmoor after his lawyer pleaded "reduced responsibility".
Me: Can you see the "up" arrow?
User:Errr...ummm....no.
Me: Can you see an arrow that points upwards?
User: Oh yes, I see it now!
-Excerpt from a support call taken by me, 08/31/2007
|
|
|
|
|
martin_hughes wrote: The Shopkeeper was subsequenlty arrested on numerous accounts of GBH
WARNING: Pedantic hat too tight. Please adjust pedantic hat before...
Well, since I'm in Scotland and we don't have GBH I don't think that would happen. Our nearest equivalent is attempted murder.
... Pop! That's better.
|
|
|
|
|
Colin Angus Mackay wrote: Well, since I'm in Scotland and we don't have GBH I don't think that would happen. Our nearest equivalent is attempted murder.
I understand GBH is considered to be more of an affectionate greeting, than an attempt to harm, north of the border
Me: Can you see the "up" arrow?
User:Errr...ummm....no.
Me: Can you see an arrow that points upwards?
User: Oh yes, I see it now!
-Excerpt from a support call taken by me, 08/31/2007
|
|
|
|
|
Yes, it's a very common homework/teaching problem to learn about threading (producers/consumers).
|
|
|
|
|
Hello,
I'd like to enable antialiasing in WPF's Viewport3D control, under Windows XP.
I tried RenderOptions.EdgeMode="Aliased" (in XAML), but it does not seem to change anything.
Any ideas?
|
|
|
|
|
Quote from MSDN[^]: 3D anti-aliasing is only supported on Windows Vista.
Guess XP is starting to show it's age and it's time to move on
|
|
|
|
|
Well said, and thank you for your reply. I'll then suggest the upgrade to my prospective clients because on XP my WPF app will look ugly (or I'd rather look for some other gimmick ).
|
|
|
|
|
I'm experiencing a brain freeze and am battling to come up with an elegant design pattern for control break processing, i.e. grouping in a report. Can anyone please give me some pointers?
I do not believe they are right who say that the defects of famous men should be ignored. I think it is better that we should know them. Then, though we are conscious of having faults as glaring as theirs, we can believe that that is no hindrance to our achieving also something of their virtues. - W. Somerset Maugham
My New Blog
|
|
|
|
|
I would like to show a reminder message each time the user shutdown or logoff his machine. How can I achieve it.
|
|
|
|
|
.net provides "Windows Service" projects for these type of work.
jayasshc
|
|
|
|
|
Errm - no it doesn't. There's no guarantee that your service will be running when windows is shut down.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hi
i want select a node from treeview nodes and call the form that i have selected its node.
here is my code.
node1 = "Company";
node2 = "Process";
node3 = "Script";
node4 = "Group";
node5 = "User";
if (node1 == "Company" )
{
cmsCompany.Show();
}
else if (node2 == "Process")
{
cmsProcess.Show();
}
else if (node3 == "Script")
{
cmsScript.Show();
}
else if (node4 == "Group")
{
cmsGroup.Show();
}
else if (node5 == "User")
{
cmsUser.Show();
}
Mamphekgo
|
|
|
|
|
Hello,
I think the 'AfterSelect' event will help you.
yourTreeView.AfterSelect+=new TreeViewEventHandler(yourTreeView_AfterSelect);
private void yourTreeView_AfterSelect(object sender, TreeViewEventArgs e)
{
switch(yourTreeView.SelectedNode.Text)
{
case "Company":
cmsCompany.Show();
break;
case "Process":
cmsProcess.Show();
break;
case "Script":
cmsScript.Show();
break;
default:
break;
}
}
All the best,
Martin
|
|
|
|
|
Whenever I see code like this, it makes me think that there's a Factory missing somewhere (and I'm not having a go at your code here - it's the OP requirement that is prompting me here). I hope that he's managing his form disposal as well, but I bet that he isn't.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Hello Pete,
Pete O`Hanlon wrote: it makes me think that there's a Factory missing somewher
So true!!! (Got my 5 for that)
Pete O`Hanlon wrote: I hope that he's managing his form disposal as well
You are write, I should allways point this out at answers.
Pete O`Hanlon wrote: but I bet that he isn't.
Let's wait and see, what he is answering.
All the best,
Martin
|
|
|
|
|
I'm trying to use different functions like SendInput and SendKeys to send input for controlling a DOS program running in a Command Prompt window (very old DOS program - no source code). Both of the above functions work on a standard Command Prompt, but it doesn't work on the DOS program once I run it. It also seems that many of keyboard macro programs don't work on these types of DOS programs either.
Does anyone know of how to send the key input in the way that many DOS programs are reading input from the keyboard?
I solved this once a very long time ago using libs in Windows XP (still running this OS) but lost the code and my source of information .
|
|
|
|
|
It may be almost impossible. Some DOS programs talked directly to the hardware to get input and you can't do that in Windows unless you write a kernel mode driver. Even then it may still be infeasible. Get real and junk the DOS program - this is 2007!!!!
Phil
The opinions expressed in this post are not necessarily those of the author, especially if you find them impolite, inaccurate or inflammatory.
|
|
|
|
|
Actually it is totally possible with a project right here on CodeProject!!! http://www.codeproject.com/cpp/sendkeys_cpp_Article.asp
It took me this long to eventually find my functioning code, which led me back to the article. Now I just have to check that a C# version exists and if not I will convert the project myself.
I am real, and I can't junk the DOS program because I work in the real world where you can't just re-write software on a whim to meet the latest craze, especially where it would be dangerous to do so (people's limbs at risk).
|
|
|
|
|
I am glad you have found a solution that works in your particular case.
I am real too, I make my living writing programs for the real world. DOS programs started to die ten years ago and no critical applications should rely on such programs any longer - hardware and software support is non-existent; it is a matter of chance whether they can be made to run now and there are absolutely no guarantees for the future (i.e. next week). Development of an alternative to the DOS app should have started at least five years ago.
Whatever may be said against Windows there has never been a more universal, stable and consistent operating system on which to develop software for all sorts of applications. To speak of it as a "whim" and "the latest craze" is dangerously short-sighted, especially if people's limbs are at risk!
Phil
The opinions expressed in this post are not necessarily those of the author, especially if you find them impolite, inaccurate or inflammatory.
|
|
|
|
|
how should i use the parametercollection class , i mean i have the following information like
Stored procedure Parameter Name
Stored procedure Parameter direction (input/output)
stored procedure Parameter value
stored procedure Parameter Type (decimal , string)
Now how should i use the parametercollection class , in order to insert this information i the add function
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
i tried the following code
class abc
{
ParameterCollection p;
public ParameterCollection ab
{
get
{
return p;
}
}
}
public class waste
{
public waste()
{
abc a;
a = new abc();
a.ab.Add("ParameterName", TypeCode.Decimal, "ParameterValue");
a.ab[0].Direction = ParameterDirection.Output;
a.ab[0].Size = 100;
}
}
can i improve the code?
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|
|
I generally use a set of helper methods. Roughly, they do the following:
public static DbParameter Parameter<T>(string parameterName, DbType parameterType, T value, int size)
{
DbParameter param = Parameter(parameterName, parameterType, value, ParameterDirection.Input);
param.Size = size;
return param;
}
public static DbParameter Parameter<T>(string parameterName, DbType parameterType, T value)
{
return Parameter(parameterName, parameterType, value, ParameterDirection.Input);
}
public static DbParameter Parameter<T>(string parameterName, DbType parameterType, T value, ParameterDirection direction, int size)
{
DbParameter param = Parameter(parameterName, parameterType, value, direction);
param.Size = size;
return param;
}
public static DbParameter Parameter<T>(string parameterName, DbType parameterType, T value, ParameterDirection direction)
{
DbParameter param = new DbParameter();
param.Direction = direction;
param.Name = parameterName;
param.DbType = parameterType;
param.Value = value;
return param;
} Then, all you need to do is
cmd.Parameters.Add(Parameter("@ID", DbType.Int, 100));
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Pete, that seems a lot of work for what I usually do:
<br />
int value1 = 10;<br />
cmd.Parameters.Add(new SqlParameter("@param1", value1));<br />
Or am I missing something?
I do not believe they are right who say that the defects of famous men should be ignored. I think it is better that we should know them. Then, though we are conscious of having faults as glaring as theirs, we can believe that that is no hindrance to our achieving also something of their virtues. - W. Somerset Maugham
My New Blog
|
|
|
|
|
Brady Kelly wrote: Or am I missing something?
Sort of. The full version that I have takes care of a lot more than this, and is standardised so that more complex types of parameter can easily be created.
There's been a lot of work put into the library to ensure that it copes with a wide variety of cases - including things like automatically putting the right parameter modifier (e.g. @) onto a parameter name, based on the database type. It's sort of a cut down version of the Enterprise Library, and it means that we can target multiple databases with the same codebase, just by changing an entry in the config file.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Aah, thanks. Would you mind clearing something up for me please? The excerpt generates a compiler error for trying the call the protected constructor for DbParamter. Were you just generalising for the example? If so, I'm curious to know how you implement concrete helpers.
I do not believe they are right who say that the defects of famous men should be ignored. I think it is better that we should know them. Then, though we are conscious of having faults as glaring as theirs, we can believe that that is no hindrance to our achieving also something of their virtues. - W. Somerset Maugham
My New Blog
|
|
|
|