|
Well, your program contains an infinite (or too deep) recursion. We cannot really tell where, since you have not posted your whole program. As adviced above, set breakpoints in the constructors at InitializeComponent of both forms you are instantiating. Then, step into the code and observe what is happening there... Have you manually modified the IDE generated InitializeComponent method? Have you used Designer to put your form together or have you done it manually?
By the way (to the english native speakers): does the verb "to squrid up" really exist?
|
|
|
|
|
I want to create ' a button ' on Excel 2007 ribbon, File tab, Font group to change Font of select cells.
If possible I want to create Add-In file in Visual Studio 2010/ VS2008.
|
|
|
|
|
And what is the problem you have with this task?
If you want to add a button to an existing group on existing tab, I think it would be easier to do it in VBA.
Don't forget to rate answer, that helped you. It will allow other people find their answers faster.
|
|
|
|
|
|
sardar.nale wrote: classes for video chat
You want to take online night classes, or do you want us to do your work for you? Tell you what, you write an efficient routing algorithm that can load and manipulate 120GB worth of major and minor road networks for a wide variety of vehicle types, allowing varying levels of speed restrictions per vehicle type, in realtime, and I'll write your video chat classes. Do we have a deal?
|
|
|
|
|
|
I'm sorry that I didn't take you seriously. Now, what you need to do is implement the Liquid Nitrogen[^] framework.
|
|
|
|
|
You might have more success if you google: "video chat tutorial" which will give you loads of hits.
Lazy, lazy, lazy...
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
|
|
|
|
|
|
i tried to create a transparent panel it worked using the
protected override CreateParams CreateParams<br />
{<br />
get<br />
{<br />
CreateParams cp = base.CreateParams;<br />
cp.ExStyle |= 0x20;<br />
return cp;<br />
}<br />
}
but now i'm trying move a rectangle in this panel,when doing this the transparency goes and the panel goes to it normal back color. any one having an idea how to solve this
i'm using this panel to because under this panel there is another panel that contains a screen shot,so when i'm moving the rectangle in the transparent panel, use sees it as in the 2nd panel.
thanx in advance.
|
|
|
|
|
Instead of that, use a single panel, and draw the background image yourself in the Paint event. Then draw your rectangle on top of that.
Why complicate things with two panels?
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
|
|
|
|
|
thanx for your suggestion, but i can't use that panel because two panels are used by two different panels.
any more suggestions..!
thank you.
|
|
|
|
|
prasadbuddhika wrote: hat panel because two panels are used by two different panels
Any chance of that in English?
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
|
|
|
|
|
oh... sorry ..! i meant two panels are used by two threads..!
|
|
|
|
|
|
I have a custom collection which wraps a List<T> . I want to provide a conversion operator for the consumers convenience to List<T> but would you recommend:
1. Just returning the innerList
public static explicit operator List<T>(MyList<T> myList)
{
return myList.innerList
}
2. Cloning by creating a new List<T> from the innerList
public static explicit operator List<T>(MyList<T> myList)
{
return new List<T>(myList);
} ?
Obviously the first is way faster, but then any changes after an explicit cast would also be reflected in the collection :undecided:
DaveIf this helped, please vote & accept answer!
Binging is like googling, it just feels dirtier.
Please take your VB.NET out of our nice case sensitive forum.(Pete O'Hanlon)
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
modified on Thursday, August 26, 2010 7:03 PM
|
|
|
|
|
You can just return a readonly version of the list, which is just as fast as returning the list unaltered (with the added benefit that the caller cannot modify the contents of the underlying list):
public static explicit operator System.Collections.ObjectModel.ReadOnlyCollection<int>(MyList<T> myList)
{
return myList.innerList.AsReadOnly();
}
|
|
|
|
|
Thanks, but I'm already implementing that in a method AsReadOnly() to provide consistant operation with the standard List<T> plus that would be an explicit cast to ReadOnlyCollection<T> and not List<T> .
I'm not concerned about keeping it read only, but more concerned about what a consumer of my collection would expect the behaviour to be. Maybe I just shouldn't provide the operator so there can't be any confusion?
DaveIf this helped, please vote & accept answer!
Binging is like googling, it just feels dirtier.
Please take your VB.NET out of our nice case sensitive forum.(Pete O'Hanlon)
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
|
|
|
|
|
Yeah, if you're adding the operator just because you can, then I'd say there's probably not much value in doing so. If you want to provide some shorthand method so the user can get a list, you might want to provide a method, "CopyToList" or "GetList". If you are not worried about the list being readonly (i.e., the user can modify the list and it won't cause problems), then you could provide a public readonly property that returns the underlying list (perhaps call that property "InnerList").
If you do decide to go with an implicit conversion operator, I'd say it would be really unexpected for an operation as massive as a list copy to occur for a simple assignment to another reference type.
|
|
|
|
|
aspdotnetdev wrote: "CopyToList" or "GetList"
I might go with that - thanks
DaveIf this helped, please vote & accept answer!
Binging is like googling, it just feels dirtier.
Please take your VB.NET out of our nice case sensitive forum.(Pete O'Hanlon)
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
|
|
|
|
|
If I got a copy of the collection, I'd expect it to be consistent. I wouldn't expect it to change on me unexpectedly as a result of something manipulating the original list, so I'd clone the original list.
|
|
|
|
|
I was leaning that way too - thanks Pete
DaveIf this helped, please vote & accept answer!
Binging is like googling, it just feels dirtier.
Please take your VB.NET out of our nice case sensitive forum.(Pete O'Hanlon)
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
|
|
|
|
|
Hi Dave,
I assume you had good reasons when you decided not to derive from List<T>.
I would not offer access to internal data, just like List<T> does not provide direct access to its internal array.
What I would consider, is adding a method ToList() which creates a List, probably by just cloning the internal List, and similar to List<T>.ToArray() .
Cloning a List isn't really expensive, it basically is an Array.Copy(); it also offers the advantage of independent enumeration, i.e. no foreach-cannot-modify-this problem.
|
|
|
|
|
Luc Pattyn wrote: I assume you had good reasons when you decided not to derive from List<t>.
Yeah, not overwhelmingly great but good enough.
Good points - thanks as always
DaveIf this helped, please vote & accept answer!
Binging is like googling, it just feels dirtier.
Please take your VB.NET out of our nice case sensitive forum.(Pete O'Hanlon)
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
|
|
|
|
|
You're welcome, as always.
|
|
|
|