|
Charlie Curtis wrote: Everything is Free... Until You Have to Pay for it...
Charlie Curtis wrote: Thanks for... Nothing
Well you paid nothing, so you got nothing, I'm not sure what you expected.
What is expected is a decent question, and reasonable politeness, you have failed point one in your first post, and point two in your second.
We aren't having your problem, you are.
We aren't getting paid to sort your problem, you are.
We aren't getting paid to scrabble round for information to help you sort your problem, so the least you can do is try and give us all a clue.
Try reading the FAQs at the top of this forum, that way you are more likely to get help.
Dalek Dave: There are many words that some find offensive, Homosexuality, Alcoholism, Religion, Visual Basic, Manchester United, Butter.
Pete o'Hanlon: If it wasn't insulting tools, I'd say you were dumber than a bag of spanners.
|
|
|
|
|
If you're going to use non-local resources, i.e.: Network Share, from your service, you service has to run under a different account. The LocalSystem account used by default does not have any permissions to any network resources. The fix is to setup a user account that has the appropriate permissions to the network resources it needs and change the service in the Service Manager to logon using that account.
|
|
|
|
|
Hi Dave,
Thanks for the info I will give this a shot. Sounds like it might be what the problem is.
Charlie
Everything is Free... Until You Have to Pay for it...
Platforms Windows 2000/XP Professional using Visual C++ 6.0 Visual Studio 2005
|
|
|
|
|
If you put the log on a network drive, how do you log that you have a network outage?
I prefer to keep log files local.
|
|
|
|
|
PIEBALDconsult wrote: how do you log that you have a network outage?
email.
Did you know:
That by counting the rings on a tree trunk, you can tell how many other trees it has slept with.
|
|
|
|
|
Correct.
Use the built-in speaker or buzzer to send a Morse message.
Don't forget to flash the screen too, so the hearing impaired can get the message also.
|
|
|
|
|
Luc Pattyn wrote: built-in speaker
Then they would interfere with my Westminster Chimes.
|
|
|
|
|
PIEBALDconsult wrote: they would interfere with my Westminster Chimes
We can't have that. Assuming your Westminster isn't an ancient one without any interface, you should plug it in a USB port; then download and install a little app that will temporarily stop the clock to keep exceptional alarms and regular time signals well apart.
|
|
|
|
|
Luc Pattyn wrote: Use the built-in speaker or buzzer to send a Morse message
Funny you should mention this.
About 3 years ago, at my previous job, we had a card printer that had a flaky power supply. I kid you not, when the power supply failed, it was very quietly tapping out "S O S" in one of the components. That was the most clever thing I've run into in a piece of hardware in 25 years.
|
|
|
|
|
I've seen many devices that emit a serial error code using a single LED (and a conversion table in the manual), however I've never seen one actually emit any Morse code. For internal subsystems such as a power supply, an audible signal makes perfect sense.
|
|
|
|
|
I don't have a built-in speaker on my machine. Can I just connect the mouse to the mains and send a gentle 240V message that way?
"A Journey of a Thousand Rest Stops Begins with a Single Movement"
|
|
|
|
|
There is no such thing as a gentle 240V, so when you try that, make sure you go to defcon 3 and raise your shields.
|
|
|
|
|
Defination:
"Through inheritance, a class can be used as more than one type; it can be used as its own type, any base types, or any interface type if it implements interfaces. This is called polymorphism".
But does it mean changing a behaviour of a method in a drieved class also means polymorphism. e.g
public class BaseClass
{
public virtual void DoWork() { }
public virtual int WorkProperty
{
get { return 0; }
}
}
public class DerivedClass : BaseClass
{
public override void DoWork() { }
public override int WorkProperty
{
get { return 0; }
}
}
|
|
|
|
|
This is indeed a case of polymorphism based on the definition here.
The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it.
|
|
|
|
|
So, polymorphism process cannot happen without inheritance. Can it be done without it.
|
|
|
|
|
Kind of, functional pointers (delegates in .NET) can achieve the same results as polymorphism in non-oo languages but by the strictest definition you need inheritance.
|
|
|
|
|
netJP12L wrote: ut does it mean changing a behaviour of a method in a drieved class also means polymorphism
Yes but not necessarily: The base class's method is the one that is called until it is overridden in a sub class.
If you need to define a method that you must change, the method must be abstract (as must the class in c#).
Dalek Dave: There are many words that some find offensive, Homosexuality, Alcoholism, Religion, Visual Basic, Manchester United, Butter.
Pete o'Hanlon: If it wasn't insulting tools, I'd say you were dumber than a bag of spanners.
|
|
|
|
|
so why did the polymorphism includes the behaviour word in its definition. It only talks about types. I think behaviour and type is two different things.
|
|
|
|
|
Behaviour and type are two things, otherwise we'd call them both behaviour or both type [edit] however, types exhibit behaviours. I think there has been some language based confusion here to clarify:
class A
{
public virtual void Write()
{
Console.Writeline ("Base Write Method");
}
}
class B : A
{
public override void Write()
{
Console.Writeline ("Class B's Write Method");
}
}
class C : A
{
}
class Foo
{
new A().Write();
new B().Write();
new C().Write();
}
As per my original post, you can override the default behaviour, but it isn't necessary.
Dalek Dave: There are many words that some find offensive, Homosexuality, Alcoholism, Religion, Visual Basic, Manchester United, Butter.
Pete o'Hanlon: If it wasn't insulting tools, I'd say you were dumber than a bag of spanners.
|
|
|
|
|
Suppose I open up Outlook 2007. On the bottom left, there are four folder buttons: Mail, Calendar, Contacts, and Tasks.
I will have a C# plug-in running and wondering if there is anyway to detect when the "Tasks" button is clicked.
Thank you very much in advance!
|
|
|
|
|
Hi Experts,
How to get the parent form name in custom control.
For ex: If the custom control is placed within tab control in mytest form, then my expected result in custom control shall be mytest.
I tried using following options available with custom control
1) this.parent.Findform() : returning null value (this works if the custom control is placed in form directly) fails if the custom control is placed in container i.e in tabcontrol,groupbox etc.
2) this.FindForm() : returning null value
3) this.Parent.Parent: not expected result
Note: In usercontrol there is option available as this.parentform which returns form name. same is not available in custom control
Appreciate to get help in this regard.
Regards
Kartheesh M
|
|
|
|
|
Control parent = Parent;
while(parent.Parent != null)
parent = parent.Parent;
Or
Application.OpenForms["formName"];
Or
ParentForm
|
|
|
|
|
Thanks Enis ur code worked
Control parent = this.Parent;
while (parent.Parent != null)
parent = parent.Parent;
Note:
1) when the page is loaded first parent returns the container.
2) When the control is edited then parent returns the form name, accordingly we need to code. For instance we can use the below code
if(this.FindForm !=null)
{
//code goes here
}
Anyways i got the expected result.
Thanks
Kartheesh
modified on Friday, July 9, 2010 5:04 AM
|
|
|
|
|
userControl1.TopLevelControl.Name
|
|
|
|
|
I think this may work for you:
if (this.FindForm() != null)
{
Form MyForm = this.FindForm();
string MyName = MyForm.Name;
MyForm.Dispose();
}
Alternatively, and I haven't tried this:
if (this.FindForm() != null)
{
string MyName = this.FindForm().Name;
}
The first works fine; the second builds okay, but I haven't tried executing it.
"A Journey of a Thousand Rest Stops Begins with a Single Movement"
|
|
|
|