|
I always go for the newest solution. I consider it doing people a favor when I point out that they are wasting their own time on obsolete frameworks... Hmm... speaking of which... retreiving the items sorted using Linq is probably the best solution.
After all, we can as well be fancy instead of simply calling the Sort method available no matter if the integers are stored in an Array, ArrayList, or List<T>.
|
|
|
|
|
I agree, newest and shiny is always best You'd need linq to entity for this solution though and I'm not sure how performant that is at the moment.
--
Cheers,
Gary
http://www.garyshort.org
|
|
|
|
|
Linq for Entities provide uptimized queries when used with the Entity Framework, but it's not needed to query a collection.
From MSDN[^]:
.NET Language-Integrated Query defines a set of general purpose standard query operators that allow traversal, filter, and projection operations to be expressed in a direct yet declarative way in any .NET-based programming language. The standard query operators allow queries to be applied to any IEnumerable<t>-based information source.
With regards to performance I am quite sure it will be fast enough to handle the size of most collections encountered by someone who are at the level where they have to ask for help getting the item sorted in the first place.
|
|
|
|
|
After you set doublebuffer = true how do you swap buffers? Thanks in advance.
The most knowledge doesn't mean the most wise...
|
|
|
|
|
Hi,
GUI parts implement double buffering by:
- allocating a memory buffer
- drawing (both background and foreground) into that buffer
- then blitting everything to the screen
The painting code remains exactly the same, the Graphics class and the underlying stuff
takes care of it all.
As a result the paint operation seems much faster, in particular there is no
time gap between a paint background then paint foreground any more.
The programmer is not involved in this, he does not manipulate the buffer.
(it is not a ping-pong buffering system, where one buffer is painted in while the
other would be shown, and both would get swapped at the programmer's discretion).
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
|
|
|
|
|
Oh, well... thanks, so you just turn it on?
The most knowledge doesn't mean the most wise...
|
|
|
|
|
yep
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
|
|
|
|
|
It's cunning the way they named it DoubleBuffered and made it a boolean. Damn them for the way that they hide these things.
Deja View - the feeling that you've seen this post before.
|
|
|
|
|
Friends...
I am doing my project in asp.net 1.1 and when I am adding any new page and setting that page as "Set as Start Page".every time I am getting this error " Could not load type Namespace.classname".
What is the reason behind that???
Please do suggest....
Thanks in advance....
adil kazmi
|
|
|
|
|
Check on your markup view of new page on top the line where is defined class inherited, language... Sample:
...
<%@ Page Language="vb" AutoEventWireup="false" Codebehind="SamplePage.aspx.vb" Inherits="SampleProject.SamplePage"%>
...
Visit my blog at http://dotnetforeveryone.blogspot.com
|
|
|
|
|
How can you put an image in an imagelist from a file in your solution?
Dany
|
|
|
|
|
Add the images you want to add to the imagelist, to your project resources.
Then to add an image, you would do this:
ImageList1.Images.Add(Properties.Resources.Image1);
That should work.
Virtual1ty "Any fool can learn from his own mistakes, but a wise man learns from mistakes of others"
|
|
|
|
|
i want to capture the mjpeg stream from URL like http://85.235.16.143/mjpg/video.mjpg
what is the best way do to that
|
|
|
|
|
Use WebClient class on system.net:
<br />
System.Net.WebClient oWebClient = new System.Net.WebClient();<br />
oWebClient.DownloadFile(sUrl,sDestiny);<br />
Visit my blog at http://dotnetforeveryone.blogspot.com
|
|
|
|
|
i tried it but it saves the stream on hard-disk.
i need to open it in picturebox.
i tried to open the the saved file in picture box but it seems it is not an image.
|
|
|
|
|
Hi,
I am writing a print application, but I m not sure how to get the current file of the office products. it should be smthn like getcurrentopenfile or something.
I want to be able to print the open word document in Word, open powerpoint slides in powerpoint and the current outlook email on the screen.
Your help is appriciated.
Thanks
|
|
|
|
|
hello sir,
i am new in .net. i had made a window application in c#.net
as front end and sql-sever as back end.
now the problem is that how to install sql-server ,.netframework,and execute sql-script and my project on client computer step by step. plz give me details .
|
|
|
|
|
Hello there!
You need to create a setup project to install your application and its dependencies and to run your sql scripts to setup your database.
--
Cheers,
Gary
http://www.garyshort.org
|
|
|
|
|
|
Hi all,
I created an access database on my pc to be used in a windows application. I created too a setup project for this application. Will the application start on another pc where Access is not installed.
Thank you
|
|
|
|
|
dany_ch wrote: I created an access database on my pc to be used in a windows application. I created too a setup project for this application. Will the application start on another pc where Access is not installed.
If you are using the Office Interop, then no it will not work. This is why I never use the office Interop. If you use the ole db provider for the db then it will work.
I get all the news I need from the weather report - Paul Simon (from "The Only Living Boy in New York")
|
|
|
|
|
I am using the Oledb provider, do you have another idea or advise.
Thank you!
|
|
|
|
|
Hi,
I have been looking to find a way to draw lines onto a richtextbox control but have not been able to find anything on the web (or here). To clarify, the specific application I am working on has a requirement that the GUI looks like a piece of lined paper (i.e. I do not just want to put a bitmap into my control) which the user can type onto.
Solutions I have looked at so far include (but are not limited to):
1) Subclass richtextbox and override OnPaint to draw lines after calling base.OnPaint -> This does not work which seems to be because of the way MS implemented the base method, but I don't want to have to rewrite the entire drawing of the control if I can help it
2) Put a 50% transparent form over the top of the rtb and draw lines onto it -> I found this idea somewhere but it seems very messy, and makes it trickier to type into the rtb at the same time
3) Copy a row of - or _ characters to the clipboard and paste into the rtb -> User typing then messes up the look
4) Insert bitmap images into the rtb -> doesn't work for same reasons as 3
5) Place an rtb onto a user control or form and draw lines on the form in correct positions -> Lines get drawn underneath the control
6) Use BitBlt directly to draw on top of the control -> I haven't tried this one yet, but I would rather avoid using Interop if I can
Given that these solutions do not work (at least as far as I can tell), can anybody suggest any other approach or any references I might look at?
Thanks in advance,
Chris
|
|
|
|
|
I don't know how to do this with the WinForms RichTextBox, but have you looked at using the WPF RichTextBox? It's so much more powerful and flexible than that WinForms one, I suspect it would be relatively easy to do there.
|
|
|
|
|
Judah Himango wrote: Sender: Judah Himango
Date: 11:32 19 Oct '07
I don't know how to do this with the WinForms RichTextBox, but have you looked at using the WPF RichTextBox? It's so much more powerful and flexible than that WinForms one, I suspect it would be relatively easy to do there.
I hadn't heard of WPF until I just read your post so I have just looked it up - am I correct in thinking this is a .Net 3 feature? I haven't upgraded from 2 yet...perhaps it's time to get around to it! Anyway I will look into this a bit. Thanks for the reply
Does anybody have any other suggestions (.Net 2 or 3)?
Thanks,
Chris
|
|
|
|