|
This[^] should explain everything...
Hawaian shirts and shorts work too in Summer.
People assume you're either a complete nut (in which case not a worthy target) or so damn good you don't need to worry about camouflage...
-Anna-Jayne Metcalfe on Paintballing
|
|
|
|
|
The names are descriptive as well. Multi-dimension array is obvious. And a jagged array can contain different length arrays - a jagged edge if you did a graphical representation.
|
|
|
|
|
How to do the realloc() in C# like in C?
|
|
|
|
|
What do you mean? How did you call malloc() in C#?
You can do it on anything you choose - from .bat to .net - A customer
|
|
|
|
|
Use ArrayList s rather than arrays. They will grow automatically.
|
|
|
|
|
I realize I can get a list of controls on the form by writing
this.Contols;
Is there a simple way to get the controls collection back sorted by tab order?
thanks
|
|
|
|
|
I don't think there is a way built into the framework to do this - would probably require the use of some kind of sortable collection EG SortedList or ArrayList...
|
|
|
|
|
That seems to be a good start. List the Controls in the SortedList and write a custom comparer:
//somewhere in the code
SortedList myList = new SortedList(yourComparer, this.Controls.Count);
foreach(Control ctl in this.Controls){
myList.Add(ctl);
}
//somewhere else
class ControlComparer : IComparer {
public bool Compare(object obj1, object obj2){
Control ctl1 = (Control)obj1;
Control ctl2 = (Control)obj2;
bool returnValue = false;
//compare and set [returnValue]
return returnValue;
}
}
|
|
|
|
|
I was thinking of something more like:
SortedList ControlListByTabIndex = new SortedList();
foreach(Control CurrentControl in this.Controls)
{
ControlListByTabIndex.Add(CurrentControl.TabIndex, CurrentControl);
}
for (int i = 0 ; i < ControlListByTabIndex.Count ; i++)
{
Console.WriteLine(((Control)ControlListByTabIndex.GetByIndex(i)).TabIndex);
Console.WriteLine(((Control)ControlListByTabIndex.GetByIndex(i)).Name);
}
|
|
|
|
|
Thank you.
It turns out that controls have a GetNextControl() property. This avoids the need to recursively iter throught tab controls and frame controls.
thanks again.
|
|
|
|
|
Thank you.
It turns out that controls have a GetNextControl() property. This avoids the need to recursively iter throught tab controls and frame controls.
|
|
|
|
|
Hello everybody
I'm new to codeproject, and new to .net c# ...
i've got a ListView, which is populate with files
Each file has got its own icon
the listview is displayed in largeicon Mode ...
But i ask myself if it's possible to set the size of the icon, in this listview (i'd like to have 400x300 for each icon)
is ther a way to do this ? i don't find it in the ms help ;-(
|
|
|
|
|
sorry about this stupid question
i've found the solution, and i'll give it, perhaps it could help someone ...
in fact, we cant act directly on listview ...
but we can set size in the "imagelist", like that :
imageList1.ImageSize = new Size(255,255);
and it goes
|
|
|
|
|
Hi all,
I wonder if there is some way to find out which control had input focus previously to an other... I.e. from a btn_Click(...) event handler, I want to know which control had focus before the user clicked the button.
Thanks in advance,
/Henrik J.
|
|
|
|
|
You can save the last focused control in the Leave event method:
private Control lastControl;
private void allControls_Leave(object sender, EventArgs e){
lastControl = (Control)sender;
}
|
|
|
|
|
That should do the trick! But how do I add the Leave event to all controls? Do I have to loop through all controls and add it one by one, or is is possible to add an event to a collection? (Doesn't seem to be possible with ControlsCollection)
Thanks!
/Henrik
|
|
|
|
|
dear All,
i am trying to access my laptop's IR port.
the laptop came with a driver and i thought i can access the stream
by using the kernel functions....
[Dllimport("kernel32.dll")]
private static extern int CreateFile(...)....
creating the file seems to work fine (i get a handle) instead of -1.
however, reading the file is still causing problems.
i found a method on the net and the guy is using the OVERLAPPED keyword
which my compiler doesn't seem to like.
does anyone have a snipped which doesn' usthe the OVERLAPPED keyword???
or: how can i crack the problem???
many thanks in advance, Dominik
|
|
|
|
|
Hi
I have the following problem with me...anyone of help
I want to read a existing PowerPoint presentation file and convert the entire contents against PowerPoints object model into XML.
I am getting all the help related to create and show the presentation but not how to read.
Any one has idea about how to read and convert to XML.
Thanks in advance
Mohammed Ali
Phone: +91-20-5538560, 5537626
Mobile: +91-98900-31169.
|
|
|
|
|
Hi,
Anyone has a code sample for capturing an image of the entire IE window?
I'm looking for a solution that will enable me to launch an IE process, navigate it to a specified URL and when done loading capture the entire contents of the window. I have found examples for capturing the currently visible parts of the screen but I want the entire window, top to bottom (as if I was scrolling down, taking screenshots as I go along and then stitching them together).
Thanks.
|
|
|
|
|
I'm looking for this too. If you find something please message me
"I have not failed.
I've just found 10,000 ways that won't work."
- Thomas Alva Edison (1847-1931)
|
|
|
|
|
I got clear idea about aggregation block theoretically. I was download and install the Aggregation Block Quick Start Example from Microsoft site. But the aggregation is not working properly. I need one help from you. Can you give me a small Sample? I am waiting for yours needful help
|
|
|
|
|
How to dynamically invoke a web services in stead of design time web reference? In my case the web service location is store in the database. How to do that?
|
|
|
|
|
|
Hi Guys!
i was vb programmers , in vb 6 whe can requery our souce by using recordSet.Requery , is there any thing like this in C#
Looking forward to ur help
Work Hard and Test your Luck
|
|
|
|
|
DataSet is working disconnected from database,you can update DATABASE with SqlDataAdapter.Update() ,this update database not DataSet.If you need to be coonected to your database,use SqlCommand.ExecuteReader() .If you really want to work with DataSet in this way you have to fill your SqlDataAdapter again.
Mazy
No sig. available now.
|
|
|
|