|
this way it diffenatly wil make just one appointment
|
|
|
|
|
Shouldn't
Outlook.AppointmentItem oAppointment = (Outlook.AppointmentItem)outlookApp.CreateItem(Outlook.OlItemType.olAppointmentItem);
be inside the foreach loop? That way the loop creates a new appointment and saves it instead of overwriting the same object and saving it each time.
|
|
|
|
|
Yes that's the solution, thank you all, great help
|
|
|
|
|
I am having a data source containing millions of records. Is there any data controls (like datagrid/listview) which will bind the data acoording to the region visible to end user i.e. when the grid is scrolled, the data will be loaded & displayed
If you can suggest me any idea on developing a new component also will be helpful. I am thinking about overriding the WndProc method for the message WM_VSCOLL in a grid.
Thanks
*jaans
|
|
|
|
|
As Led Mike explained in the topic just below this, a virtual ListView will do exactly that. Here's a link: [^]
|
|
|
|
|
Thanks Alan.
I have posted my query without reading the latest thread
*jaans
|
|
|
|
|
Hi,
I'm trying to create a ListBox that will only get the items that are currently visible. There could be up to millions of items, so storing them all simultaneously is slow and inefficient.
I tried setting the ListBox's DataSource to a custom object that implements IList, but when I do this, it immediately requests ALL the items.
I tried changing the DrawMode to OwnerDrawFixed, but it exhibits the same behavior.
Can anyone suggest a way of making the ListBox only request the items it's drawing, short of reimplementing it myself? Thanks!
|
|
|
|
|
Why don't you use paging?
Ah and, are you having milions of items in ListBox?
[ My Blog] "Visual studio desperately needs some performance improvements. It is sometimes almost as slow as eclipse." - Rüdiger Klaehn "Real men use mspaint for writing code and notepad for designing graphics." - Anna-Jayne Metcalfe
|
|
|
|
|
That is called Virtual Mode. I don't think ListBox has that but you should be able to satisfy your requirements by using the ListView which does have a Virtual Mode.
led mike
|
|
|
|
|
Thanks Led Mike! That's just what I needed. In case anyone else has a similar problem, I found this article which explains how to use a virtual ListView: [^]
modified on Thursday, January 24, 2008 11:22:37 AM
|
|
|
|
|
FYI, here's a link to the next ListView article. (There's no link in the first article.) [^]
|
|
|
|
|
Hi all,
I'm trying to write some code to upload files from the machine where the windows application is installed to a server, for example from "C:\MyFolder\file.wav" to "http://ip/Project/folder/file.wav".
I tried:
WebClient objClient = new WebClient();
objClient.UploadFile(ServerURL, LocalFile);
but it always give me this exception:
An exception occurred during a WebClient request.
InnerException = {"Unable to write data to the transport connection: An established connection was aborted by the software in your host machine."}
Any idea?
Thanks.
|
|
|
|
|
Is a firewall blocking the port?
|
|
|
|
|
how can i be sure of this? i don't have firewall installed!!
|
|
|
|
|
If you don't have a firewall installed, the windows firewall is probably running. Look in the security center on the control panel, and see if the windows firewall is running. If so, add the port you are using to the exclusions list and try it again.
I'm going to become rich when I create a device that allows me to punch people in the face over the internet.
"If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
|
|
|
|
|
Hi,
I am using a ListBox on my form. My ListBox.Items property (which is ObjectCollection) contains objects of my-defined class type, whose ToString() methods are overriden. As I know, a ListBox calls the ToString() method of each item in its Items property to build a "string" to display. When adding a new object item ot Items affects display strings as a result.
So far everything is good and reasonable. The problem is that, when I MODIFY an object's content held by ListBox.Items, I expect the ListBox control redraw its content. Cause my modification affects the overridden ToString() method of an object of ListBox.Items. So I expect that the ListBox control to change display string of related object.
Unfortunately it does not work even if I have tried to call ListBox.Refresh(), or Update() method. Any other method I should call or my way thinking about ListBox.Items and displaying mechanism is wrong?
|
|
|
|
|
Maybe my thinking here is wrong, but how about simply clearing the listbox and re-add your object collection?
I'm going to become rich when I create a device that allows me to punch people in the face over the internet.
"If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
|
|
|
|
|
Ok, thanks. I have just tried and it works.
|
|
|
|
|
Great
I'm going to become rich when I create a device that allows me to punch people in the face over the internet.
"If an Indian asked a programming question in the forest, would it still be urgent?" - John Simmons / outlaw programmer
|
|
|
|
|
IMO removing and adding the collection is too much effort and causes flickering.
Invalidate() should be sufficient, unless you are in an event handler and want an immediate
repaint, if so use Refresh().
If that does not work for you, then something is wrong and you may want to show some code.
Luc Pattyn [Forum Guidelines] [My Articles]
This month's tips:
- before you ask a question here, search CodeProject, then Google;
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get;
- use PRE tags to preserve formatting when showing multi-line code snippets.
|
|
|
|
|
The displayed text does change for my business object collection when bound to a list box.
Are you setting the items manually (using Add) or you set the DataSource to your object collection? Which interface did you implemented on the collection? (IList, BindingList, ICollection etc)?
Also check out the ListChangedEventArgs[^]
|
|
|
|
|
In my current project I need to customize ListView control's appearance. I need to change the groups heading style. Is there any way to do this ? I have inherited a new control from ListView class. But I couldn't find any helping methods to override. Anyone having any idea on doing this ?
Thanks
|
|
|
|
|
|
Thanks, I will check that
|
|
|
|
|
N a v a n e e t h wrote: I need to change the groups heading style.
First there is no single ListView Control, there are different versions of it. Some messages for the control like LVM_MOVEITEMTOGROUP are still documented as "not implemented". My interpretation of the Vista ListView documentation is that you can now assign an image from the controls image list to a Group. This might mean that you could use images to control the Group Header. I did not research the 3.0 BCL ListView to see if those messages have been included in the ListView class. However you could always do it yourself with C++/CLI or even *gulp* PInvoke.
led mike
|
|
|
|