|
The life span in C# is a lot different than in C/C++ or other non-garbage collected languages. The "aWatcher" is a pointer to the created instance, and that pointer will expire when the method is finished, while the lifespan if the instance will be as long as, in easy terms, "somebody knows where it is".
Internet - the worlds biggest dictionary
|
|
|
|
|
So in this case, the watcher instance's lifespan is until either the program terminates or I explicitly unregistered the event handler at some point later in the code and I guess that would need to be in the specified callback method itself since I don't actually have a way to get to that watcher instance once the setup method is done.
Thanks for the clarification on this.
|
|
|
|
|
Correct. Generally if you need to unregister an event handler you need to save the needed instance information in class variables.
--
Rules of thumb should not be taken for the whole hand.
|
|
|
|
|
OS :XP
Visual studio 2003
controls . RichTextbox
I have two richtextbox one is input and
other one is display.
I place some text in input then added
it will show in display window.
In display richtext I could not find the last send item.
the scroll is on the top
How can bring the scrollbar to down in run time.
for shwo the last send item from input richtext.
anybody help me
Continue...
|
|
|
|
|
textBox.Select(textBox.length, textBox.length);
i guess that will work
|
|
|
|
|
Hi
Is there any column like datagridDateTimePicker in vs-2003 version?
sivamyneni
|
|
|
|
|
FlexGrid can do something like this (www.componentone.com)
VirtualVoid.NET
|
|
|
|
|
didnt get anything from that
sivamyneni
|
|
|
|
|
you can code the customeditor(s) in that control (flexgrid)... there are a lot of good examples and explantations
VirtualVoid.NET
|
|
|
|
|
hi,
thank you.i got it.
sivamyneni
|
|
|
|
|
Hi Code project people,
can anyone help me out with how to page table control?
will be expecting your responses.
thanks in advance.
|
|
|
|
|
AFAIK you can't. Take a look at the DataGrid instead.
"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
|
|
|
|
|
how can i open(visualize) a System.Windows.Forms.MenuItem of System.Windows.Forms.MainMenu by code?
jaye
|
|
|
|
|
if this menuItem has other menuItems under it you use the following statment
<br />
menuItem1.ShowDropDown();<br />
if it doesn't have you show use the above statment on its parent menu item
|
|
|
|
|
|
jaimeaye wrote: sorry but this metod (ShowDropDown) isn´t appear in my Visual Studio 2003 C#.
It can't. The ShowDropDown method is member of the ToolStripMenuItem class that is new in .NET Framework 2.0.
I think the classes in Framework 1.1 provide no support for what you're trying to achieve, so you're somehow at a loss.
"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
|
|
|
|
|
I suggest you try MenuItem.PerformClick()
Luc Pattyn
|
|
|
|
|
|
jaimeaye wrote: with menuItem1.PerformClick(); you send a event of Click.
that's right, but if you do this on the parent menuItem it will do what you wish
cz the click event of the parent menu item is to open its drop down items.
for example if your have a File menu item and under it New.
if you like to view nuew you write:
fileMenuItem.PerformClick();
|
|
|
|
|
Did you tested this? I've tried and it doesn't work. Also the PerformSelect method doesn't show the menu.
"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: Did you tested this?
Sorry i didn't do that, but i assumed it will work.
anyway i will try to figure out another solution
|
|
|
|
|
quiteSmart wrote: Sorry i didn't do that, but i assumed it will work.
No need to apologize. I was just curious if it may work on other computers.
quiteSmart wrote: anyway i will try to figure out another solution
Maybe one could disassemble the ToolStripMenuItem and see what they are doing inside the ShowDropDown method. Or use Windows API to really simulate a mouse click on the menu item.
"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
|
|
|
|
|
I need to develop an application, in C#.Net . I have two Touch panles connected to the system. My program have display different frames in different touch panels. Have anybody worked in such application? If so please tell me how to design it? How we can tell windows GDI to distinguish frames for different display?
Thanks
Bil
|
|
|
|
|
When you have a multi-monitor setup the two monitors are seen as one continuous area. e.g. You have two monitors of 1024x768 each. The screen will be 2048 pixels wide. 0-1023 is on one monitor and 1024-2047 is on the other. So, telling GDI which monitor to display something on is just a matter of drawing at the appropriate coordinates.
|
|
|
|
|
Thanks Colin for your reply.
Your answer gives me some idea what to do.
I have some more questions to ask you.
Do we need to tell the windows that we are using 2 monitors. If so where we need to configure it?
If I am creating an application I have to create in such a way that it will cover up the the 2 monitors? Do c# allows to do so?
Is there any way we can configure GDI?
Thanks and Regards
Binil
|
|
|
|