|
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.
|
|
|
|
|
Hi.. someone please telling me how to connect MySQL.
|
|
|
|
|
|
|
Hey!
I'm having trouble using different colors to make parts of surfaces transparent. I'm using a ColorKey and I'm setting high and low values and then I set the colorkey to the surface, but the only color that works is Black (that is: RGB 0,0,0) . Does anyone have any experience in this and can anyone tell me how to conquer this problem...?
I'm using C# and VS.NET...
thanks
|
|
|
|
|
I'm looking into event properties, and I've found that there's very little out there that discusses them. Why? It seems that they are very useful.
Anyway, with event properties, you can do custom handling of the addition and storage of event delegates. It would seem that you can also do custom handling of the invocation of those delegates. Is this correct? In my case, I'm wanting to stop invoking event delegates when a Handled property in the event's EventArgs is set to true.
Also, I heard that event properties are slower than normal events. Why is this? Is there a way to minimize/get around this?
Thanks in advance!
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
What are you talking about?
Those add/remove accessors for events?
leppie::AllocCPArticle("Zee blog"); Seen on my Campus BBS: Linux is free...coz no-one wants to pay for it.
|
|
|
|
|
Yes. They're called event properties, because they have accessors just like properties.
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
OK, just wanted to know if it wasnt something I have not ever seen or heard about
ANyways. The C# compiler allows one to define an event in a "shorthand" format, ie the way we all use. Behind the scenes however, the compiler does this:
Your input:
event EHandler MyEvent;
Compilers ouptut:
private EHandler MyEvent;
event EHandler MyEvent
{
add
{
this.MyEvent = ((EHandler) Delegate.Combine(this.MyEvent, value));
}
remove
{
this.MyEvent = ((EHandler) Delegate.Remove(this.MyEvent, value));
}
}
This can be easily seen in Reflector.
leppie::AllocCPArticle("Zee blog"); Seen on my Campus BBS: Linux is free...coz no-one wants to pay for it.
|
|
|
|
|
Thanks for the info. What I don't understand is:
* Why would this type of event be slower?
MSDN says: "Note that event properties are slower than event fields, as each event delegate has to be retrieved before it can be invoked. "
But wouldn't the cost of retrieval be minimal?
* Would I be able to handle the invoking of the delegates myself? Since I have access to each delegate, this shouldn't be too hard.
* In order to do what I'm wanting to do, I would have to call each of the delegates separately, rather than combining them and calling them together. What are the performance costs of this?
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|
|
jdunlap wrote:
Why would this type of event be slower?
Too small to notice
jdunlap wrote:
Would I be able to handle the invoking of the delegates myself? Since I have access to each delegate, this shouldn't be too hard.
No problems here either
jdunlap wrote:
In order to do what I'm wanting to do, I would have to call each of the delegates separately, rather than combining them and calling them together. What are the performance costs of this?
Multicast delegates are stored as a linked list. By defining a property, one can use a different container such as a hashtable, array, arraylist or some other ingenious datasource (SQL/XML).
leppie::AllocCPArticle("Zee blog"); Seen on my Campus BBS: Linux is free...coz no-one wants to pay for it.
|
|
|
|
|
OK, thanks for the info!
"Blessed are the peacemakers, for they shall be called sons of God." - Jesus
"You must be the change you wish to see in the world." - Mahatma Gandhi
|
|
|
|