|
No 1.1 . How come you came to know that it's not working ? Can you show me the helprequested event code ?
|
|
|
|
|
There is nothing special with the case:
private void button1_HelpRequested(object sender, HelpEventArgs hlpevent)
{
MessageBox.Show("ok");
}
this.button1.HelpRequested += new System.Windows.Forms.HelpEventHandler(this.button1_HelpRequested);
I tested it on both of the frameworks (1.1 and 2.0) and still with the same result.
"la dolce ossessione degli ultimi suoi giorni tristi,
Venezia, la vende ai turisti" rechi
|
|
|
|
|
It's firing form's help event even though it's disabled. But it's not firing button's help event when it is disabled. I came to know that this is the default behavior.
|
|
|
|
|
OK, thank you.
It's better this way rather than not firing anything at all...
"la dolce ossessione degli ultimi suoi giorni tristi,
Venezia, la vende ai turisti" rechi
|
|
|
|
|
just wondering if someone has implemented something that calculates the TotalMonths (or Weeks or Years) between two DateTime values. The TimeSpan class obviously provides things like TotalDays, TotalMinutes and the like but as it doesn't have any reference to a DateTime it can't give you the TotalMonths, TotalWeeks or TotalYears.
has anyone done that already?
|
|
|
|
|
It doesn't probably because "month" is rather ambiguous. Is it 28 days if the starting date fall in Feb, or the ending date fall in Feb? Or Feb is in the middle of the data range? Probably the same for "Year". How about leap years?
For weeks, you can divide total days by 7.
|
|
|
|
|
just discovered that the (VB.NET) DateAndTime class has a method called DateDiff which calculates such things...
|
|
|
|
|
Hi,
I want to develop an application in C# to access the remote computer like VNC, Remote Desktop Capture. I would like to know how to start to develop such type of application. Please give me some useful link or document or source code for initial starting.
Regards
Rajesh
rajesh
|
|
|
|
|
Initilay u can start with simple socket programing. try to use client server programm . After that start with capturing a single image on client system, by accessing Printscreen keboard port and try to display it your own system say in a picture box.....
in this way u can move on..
Good luck !!!
|
|
|
|
|
start the remote desktop process mstsc.exe through Process.startInfo
Koushik
|
|
|
|
|
He, wants to devloped an aplication like VNC viewe, that he can get's all the control of client system, but if he use remote desktop connection , client system automatically logged of [ xp] and for windows server he has to use mstsc/console to open a separate windows .
but this is not his objective.
He want to bulids a application.
|
|
|
|
|
hi, did u find the solution? i have u're same problem, if so what did u do ?
|
|
|
|
|
I have a likely problem.
I would like to develop my own application that uses mstsc to remotely connect to servers for administration. But the result should be shown in my own panel on my own form.
How can I for example capture the result of a process with Process.Start (mstsc.exe) and show it in my own panel like a proxy.
It should be possible, but I can't find anything on it in the net. An example of application is VisionApp.
|
|
|
|
|
Hi I also look for something like this. Did you find any solution.
I may be very interested to know the result.
What I want to do is exactly use even mstsc or connect with sockets over port 3389 and capture the result in my own application for example in a panel.
|
|
|
|
|
Hello
I got a list of words I need to show the user of my application.
The list is around 1000 words.
I have tried to fill the words in both a listbox and a listview(with view set to detail and 1 columns)
I have a button which refres the data in the list, simply by removing them all and then re-fill them, if the list isnt too long it doesnt bother the user, but if the list is 1000 lines (as in my situation) it takes too long time to enter all the data again.
I thought there might be some alternative to listbox/listview which is made to handle alot of lines?
Otherwise it is probably my code which is wrong, however i'm still in the beginnign phase
To make an easy test I use this funktion (same for-loop to add data to the listview)
private void Test()
{
this.listBox1.Items.Clear();
for (int i = 0; i < 1000; i++)
this.listBox1.Items.Add(i);
}
if anyone got something else I can look up in a book or on the internet to find another way to handle this I would be really happy.
|
|
|
|
|
Hi,
whenever you change a Control's property, it will recalculate itself, redo its layout,
repaint itself, etc since it does not know in advance whether your change is just one
of many, the only one or the last one.
When you want to do a lot of changes, you should consider calling Control.SuspendLayout
at the beginning, Control.ResumeLayout at the end of the massive change.
(or maybe suspend, do a lot, resume, suspend, do another lot, resume, etc).
Some Controls also offer an AddRange() method that acts like a "multiple add"; that too
can result in speed ups (AFAIK it does not make sense to combine both suspend and addrange).
Give it a try on whatever Control suits you most.
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Thanks for the good answer
I couldt get the Suspend thing to work, but the AddRange() works perfect
|
|
|
|
|
OK, so I've recently picked up C#. Actually, I knew Jack about it until I dumped some VB code into it, ran some regexs, cleaned up the errors and have finally whittled it down to a total of 16 errors.
I fixed 12 of the "Object reference is required for the nonstatic field, method or property [blah]" but there's 4 left.
In VB it works great with: frmMain.pnlDisplay.Invalidate()
but to fix the CS0120, MSDN basically recommends replacing it with "new frmMain()".
Yeah, great, what that does is creates an infinite loop of new forms being created within one another. It hasn't overloaded any stacks yet but I do have heaps (bad pun) of memory.
Basically I'd like to know how I can access a control on a form from within another class, without having to create new instances and preferably without having to pass references to "this" around everywhere. Or can I get away with in the constructor only?
Ninja (the Nerd)
Confused? You will be...
|
|
|
|
|
Make a method in the other class that accesses its own controls, then call the method from where ever you need to.
My current favourite word is: Waffle
Cheese is still good though.
|
|
|
|
|
Would seem logical I suppose...
Thanks
Wish I'd stuck with VB. *thinks* Wish I knew how to work C# better.
Ninja (the Nerd)
Confused? You will be...
|
|
|
|
|
Perhaps not.
Double post, yeah, but I've only just put the change in.
It now reads "Object reference required for nonstatic [...] 'frmMain.paintDisplay()'"
Ninja (the Nerd)
Confused? You will be...
|
|
|
|
|
Are you trying to call this stuff from a static method? Because if so, that'll be the problem. You'd need to make the method not static, or make everything else inside the method static.
Or wait, if your using a static method, pass frmMain as a parameter, and then it should work:
static void myMethod(Form myForm) {
myForm.paintDisplay();
}
...
myMethod(frmMain)
and if your method isn't static, then im not sure. Keep at it though.
My current favourite word is: Waffle
Cheese is still good though.
|
|
|
|
|
Hi,
I'm looking for a code sample in C# or java for bluetooth.
I want to make a simple application for the desktop to log all bluetooth devices that are nearby my bluetooth dongle.
I've been searching for 3 days. So far i can only find code samples for mobile phones.
Thanks in advance!
|
|
|
|
|
|
I have a if statement and a table with 2 atributes. They are description and date. I will check if there is in the table some date like 01-01-2008.
String test "01-01-2008";
if (test.Equals(here I will a SELECT query like SELECT date FROM appointmentTable))
{
textbox1.text = "The description on this date is: " + Here I will the descripton of the selected date
}
Does someone know how I can make something like this in C#?
|
|
|
|