|
You can certainly do it using Exchange Web Service - a bit cumbersome but straight forward. Google for Exchange Web Service or EWS
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
hi
in C language we use ellipses for unlimited arguments
is it possible in C#
|
|
|
|
|
Yap, you can do it this way
public static void SuperCoolMethod(params int[] list)
{
}
...
SuperCoolMethod(1,2,3,4,5);
|
|
|
|
|
AFAIK no. You can use a List instead.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
have a look at the params keyword.
Luc Pattyn
I only read code that is properly indented, and rendered in a non-proportional font; hint: use PRE tags in forum messages
|
|
|
|
|
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
i copy this code from an article which is use to take a run time parameters when i run it,it show an error "String doesnot have a definition for ApplycurrentValues" i think i miss a directive for it plz help as i m novice in crystal report reporting. i use only one directive which is
using CrystalDecisions.Shared;
ParameterValues ParamCurrentValues = new ParameterValues();
ParameterRangeValue p_OrderDate_Value = new ParameterRangeValue();
p_OrderDate_Value.StartValue = this.txtOrderDateFrom.Text;
p_OrderDate_Value.EndValue = this.txtOrderDateTo.Text;
ParamCurrentValues.Add(p_OrderDate_Value);
rep.DataDefinition.ParameterFields();
("Date1").ApplyCurrentValues(ParamCurrentValues);
|
|
|
|
|
The code you have copy-and-pasted is almost certainly wrong.
I don't know the 1st thing about Crystal Reports (thank higher-being of your choice), but a quick search on the web brought up this (which is similar to your code)
public void SetParameter(string name, object value)
{
CrystalDecisions.CrystalReports.Engine.ParameterFieldDefinition parameter = _reportDocument.DataDefinition.ParameterFields[name];
CrystalDecisions.Shared.ParameterValues currentValues = parameter.CurrentValues; currentValues.Clear();
CrystalDecisions.Shared.ParameterDiscreteValue newValue = new CrystalDecisions.Shared.ParameterDiscreteValue();
newValue.Value = value;
currentValues.Add(newValue);
parameter.ApplyCurrentValues(currentValues);
}
So it looks like ApplyCurrentValues is a method on the parameter.
CCC solved so far: 2 (including a Hard One!)
|
|
|
|
|
Hi...
Code Project community .
I need ur help in the following issue :
I am developing window application in C# 2005 in which I have to print a bank statement.I am using Microsoft.Office.Interop.Word and creating Word.Application object.There is a specific format in which I have to generate the word file like (Bank logo on the top and Advertisement at the end of page)only on first page of each statement. A statement may contain multiple pages. We are creating one word file for all the accounts for a particular account type. In this case the image of the bank logo and the advt. will be coming for each new statement in that file. When I start generating the word file every thing working fine coming in required format but randomly after creating say 15 or 50 pages the alignment for the image on the top (bank logo) is distorted. Hence the all the following pages the header portion gets haywire. We to manually press 2 enter keys to bring the header down and reformat the file. This is not manually possible a single file may contain 100-150 pages.
You tips and tricks on this will be appreciated.
So please help me out to solve this problem its urgent.
Thanks....
|
|
|
|
|
Have you looked at OpenText? Open text is a library for creating pdf's. OpenText was origianlly developed as Java library, but has a cSharp port. The interface is a bit ugly at first, but the original author has a book out on the library that makes using it very easy. If you take this route, it simplifies deployment because your application won't rely on an appropriate version of word.
|
|
|
|
|
Oops, the library is iText, not OpenText -- Too many libraries, not enough time.
|
|
|
|
|
thanks..
I will try this option.
|
|
|
|
|
Hello,
i have a tree view ,were an After Selection event occurs after selecting a node.
i also have a function called refresh which refreshes the tree View by building it from scratch.
the problem is that when the refresh is made, the selected node is not changing, which is fine, but the after Select event is not fired, which is not fine at all (since this event retrieves necessary data).
my question is: how (if possible) can i fire an after Selection event without changing my selection.
attached is relevant code
Thanks
private void tvwProject_AfterSelect(object sender, TreeViewEventArgs e)
...
//this code mainly constructs the tree View
private void refreshProjectTree()
{
if (isProject)
{
BLFunctions.BuildProjectTree(tvwProject);
BLFunctions.ExpandNode(tvwProject, tvwProject.Nodes[0]);
}
else
{
BLFunctions.BuildSchemaTree(tvwSchema);
}
}
|
|
|
|
|
Factor the code out to a method you call at the end of your refresh method.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Hi Christian,
could you be more specific ?
i couldn't understand what you mean by your answer.
|
|
|
|
|
It's painfully obvious. you have some code inside an event, that you need to run in a situation where the event does not fire. So take this code, move it to a new method, and then call this method from your event, and from the method which you were hoping would fire this event.
And buy a basic book like 'Code Complete', and read it.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Ok mr.Graus
so if you say so, how would i get the TreeViewEventArgs if im calling a method where no such args are sent to it ?!?!?!?
|
|
|
|
|
You could build an instance of TreeViewEventArgs using tvwProjects.SelectedNode and pass it to the factored method.
|
|
|
|
|
I am running Windows Vista using Visual Studio 2008 to build a Office 2007 Plug-in making use of WPF. Everything used to work fine until I installed .NET 3.5 SP1 and the WPF Toolkit. What happens is that when I build the solution Visual Studio closes unexpectedly.
I have read up on this issue and the only related issues I could find was that the Powertools plug-in causes this problem. I do not have powertools or any other plug-ins installed. Other project types build fine... only Outlook plug-ins gives this problem.
Any help on this would be appreciated.
|
|
|
|
|
I had similar issue with, but it happened when I used SVN incorrectly. My Only solution was to create a new project and import only code files but not generated files such as .vsproj.
also don't forget to backup before doing this.
I Kinda deleted and imported from my own SVN and some files got corrupted. As described above, it helped me
|
|
|
|
|
Thank you for the reply Saksida, I have followed you're advice and now the solution builds 70% of the time. The rest of the time Visual Studio still crashes. I will do a clean install of Visual Studio and hopefully this will solve the problem.
|
|
|
|
|
Hi, all,
In WinForms with C#, a TableLayoutPanel custom control with, saying, 10 rows and 5 columns being designed in designer window. NumberOfRows was coded as a property of this custom control. I wish to change this property value and set it as a new RowCount of the TableLayoutPanel mentioned above, before the custom control running InitializeComponent() . Is this possible? I have tried to do it with a method in the SET of that property as below:
private void OnNumberOfRowsChanged()
{
tableLayoutPanel1.RowCount = numberOfRows;
}
and it didn't work while I change the value of NumberOfRows property, and set a breakpoint in the constructor method of that custom control, the RowCount remains as 10.
Btw, I tried to use tableLayoutPanel1.RowStyles.Remove() and tableLayoutPanel1.RowStyles.RemoveAt(index) as well, neither of these two works as well...
Any Idea?
Your kind help is so much appreciated!!
Br!
Sun
|
|
|
|
|
How to open a file with my c# project using open with pop up in windows?
i want to open an audio file with the media player that i have created in c#, i have deployed it and installed it on my pc. and want to open a file with my project using open with pop up for windows but it does not run my file..
can any1 help me out...
|
|
|
|
|
I can't for the life of me work out what you're talking about, or what your problem is. What is 'pop up for windows' ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
My guess is he wants OpenFileDialog.
|
|
|
|