|
Hi,
i have a problem handeling powerpoint presentations with c# .net.
I have to copy all shapes and slides from an existing presentation to
another.
Only to copy the whole presentation doesn't work for me.
But when using .copy() and .paste() the formatting is lost.
Also the background and the slide master is not in the new
presentation.
Can anybody give me a little code how to handle this?
I've looked everywhere but found nothing about it.
Thanks a lot!
|
|
|
|
|
Could I ask which IPC techniques for C# applications work on all Win98, WinMe, Win2000 and WinXP platform ?
Thanks
|
|
|
|
|
hi
i am working with mapi and i want to use it to send a mail thorough my c# code.. i have managed to write a pice of code.. but i cant send any mails through it.. my code compiles and runs perectly ... but deosnt send any mails.. that is wen i run it no error or exception occurs.. but wen i turn to my in box there are no mail there either.. can anyone help me with this...
here is the code..
if (strServerType == "MAPI")
{
MAPI.SessionClass oSession = new MAPI.SessionClass();
// Will use vEmpty for Empty parameter
Object vEmpty = System.Reflection.Missing.Value;
// Logon
oSession.Logon(strHostName,
System.Reflection.Missing.Value,
false,
true,
0,
System.Reflection.Missing.Value,
@"outlook\smehmood");
MAPI.Folder outbox = (MAPI.Folder)oSession.Outbox;
MessageEmail MailToBeSent = new MessageEmail();// this is class which i derived from MAPI.message interface...
MailToBeSent.Session = oSession;
MailToBeSent.Recipients = strTo;
MailToBeSent.Subject = strSubject;
MailToBeSent.Text = strMessage;
MailToBeSent.Signed = true;
MAPI.Attachments at = (MAPI.Attachments)MailToBeSent.Attachments;
MailToBeSent.Send(true,false,System.Reflection.Missing.Value);
// Log off session.
if (oSession != null)
oSession.Logoff();
}
|
|
|
|
|
Hi all,
I have one question about the installer. I've set the RemovePreviousVersions of installer to true, and have changed the installer version every new release(it also changed the product code).
However, the installer still can't detect the pervious version of application. Do I miss any important steps?
Please hlep.
Regards
|
|
|
|
|
Hi
My installer is unable to remove assembly from Cache.i tried to run rd/s/q assemblyName command by starting Process but it`s giving access denied error,following is my code:
Assembly a = Assembly.LoadWithPartialName("MyAssembly");
curdir=Directory.GetCurrentDirectory();
getParent=Directory.GetParent(a.Location.ToString());
Console.WriteLine(getParent.ToString());
getParent=Directory.GetParent(getParent.ToString());
Console.WriteLine(getParent.ToString());
getParent=Directory.GetParent(getParent.ToString());
Console.WriteLine(getParent.ToString());
Directory.SetCurrentDirectory(getParent.ToString());
Console.WriteLine("Current Directory");
curdir=Directory.GetCurrentDirectory();
Console.WriteLine(curdir.ToString());
a=null;
System.Diagnostics.Process myproc=new Process();
myproc.StartInfo.RedirectStandardOutput=true;
myproc.StartInfo.UseShellExecute=false;
myproc.StartInfo.FileName="cmd.exe";
myproc.StartInfo.Arguments="/C rd/q/s MyAssembly";
myproc.StartInfo.WindowStyle=ProcessWindowStyle.Normal;
myproc.Start();
Console.WriteLine(myproc.StandardOutput.Read().ToString());
myproc.WaitForExit();
Console.WriteLine("Current Directory After Finishing of Process");
curdir=Directory.GetCurrentDirectory();
Console.WriteLine(curdir.ToString());
The executed command gives following O/P
MyAssembly\100~1.0__\MyAssembly.dll - Access is denied.
-1
|
|
|
|
|
intresting thing that when i run rd/s/q assemblyName on Command Prompt,it removes the file successfully
is there some .NET restriction to remove assemblies within framework?
|
|
|
|
|
|
hi,
I am a new .net programmer.Can any one tell what are the major classes and the that i need to go through in .net.Just like java has utill package which we use a lot in the programming.Can any one tell where I can find the description of these classes.
Satish
|
|
|
|
|
|
Ok here's my take, from most used namespaces (packages in java?) to least used (but still used alot).
1. System - all things common to the framework, eg object, string, primitives.
2. System.Collections - few handy list classes.
The above is common to most, my personal preferences follows.
3. System.IO - all stream related classes, including the overlooked StringReader/Writer classes.
4. System.Reflection - allows you to get info at runtime for any class (including your own).
5. System.ComponentModel - type convertors.
6. System.Windows.Forms - all UI classes.
7. System.Xml - basic XML goodies.
8. System.Text - most notably StringBuilder class.
9. System.Net - basic network client classes.
10. System.Text.RegularExpressions - RegularExpressions.
11. System.Xml.Serialization - XML (de)serialization.
12. System.Runtime.InteropServices - support for calling lecagy dll's.
And finally you might wanna look at System.Data that has support classes for database interopablity, and the ASP.NET related namespaces (System.Web.* ) for web stuff.
HTH
xacc-ide 0.0.15 now with C#, MSIL, C, XML, ASP.NET, Nemerle, MyXaml and HLSL coloring - Screenshots
|
|
|
|
|
If you have Visual Studio, try typing "System." in a function. It'll bring up a list of all the namespaces and objects there, along with brief descriptions. SharpDevelop does the same thing, if you want a free IDE.
|
|
|
|
|
hi,
Thank you all for giving this information.I think this will help me a lot to learn.
Satish
|
|
|
|
|
hi
1.how i can determine the current user keyboard language in web application when page load?
2.how i can change it to specefic language?
thanks
|
|
|
|
|
1. I doubt you can.
2. I sincerely hope there is no way to do this.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
1) Keyboard language? You can't determine the web client keyboard from the server side. There is nothing that passes that information from client to server.
2) You can't! There is no way you can change a system-wide setting from inside the client web browser.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
hi
How i can do an "Open Window" in C# code area with getting a specific URL?
thanks
|
|
|
|
|
You'll have to be more specific about what you want to achieve. What do you mean by "Open Window" and "code area"? And how does this URL come into play?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
i want to do some thing like : a redirect in a new window with a specific URL , in code area : c# code behinde file.
as like as HyperLink tag or link tag.
|
|
|
|
|
I have no idea how to do it. This question really belongs in the ASP.NET Forum.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi all,
In my code I have a bottleneck which consists of a cpu-intensive loop of
size LENGTH. What I did was to divide that loop into two threads, Thread1
doing the 0 to LENGTH/2 part, and Thread2 doing the LENGTH/2 to LENGTH part.
There is no synchronization between threads, so they should work pretty
freely.
My machine has two processors (dual P3, Windows 2003 server). Now comes the
problem: when running the program, both threads are scheduled on the *same*
processor! I checked many things, for example:
1) Added a while(true); infinite loop, and it resulted in each thread be
scheduled to another processor (this was a test of course, I don't need an
infinite loop!).
2) Added the following code the loops in each thread:
for (int i = 0; l < 10000000; i++);
Just an empty loop that wastes CPU. Strangely enough, this somehow signals
to the scheduler that the threads are cpu-intensive and so each thread is
scheduled on different processor.
I would like to mention again that even without this wasteful loop each
thread is already 100% cpu-intensive, and so it is very strange that the
scheduler does not assign each thread to seperate processor.
As a last resort, I tried using a Win API call to SetThreadAffinityMask to
manually assign each thread to seperate processor. This to no avail, as my
request was ignored! (although the SetThreadAffinityMask function did not
return a fail status.) Again, strangely enough, when I use
SetThreadAffinityMask in the while(true) example above to ask the scheduler
to assign both threads to same processor, the scheduler does respect the
request and assigns both threads to same processor.
Finally, I have to mention that within the loops many memory accesses are
done (though no memory allocations). Is it possible that because of this the
scheduler places both threads on same processor to share L1 cache? (Though
after many years of parallel programming in C/C++ I have never encountered
such a strange behavior).
And if not, is it possible that the problem is because of a bug in .NET
Framework thread handling?
Thanks in advance for any reply that might shed some light on this mystery.
|
|
|
|
|
|
I tried to use ProcessThread.ProcessorAffinity, but how do I get a ProcessThread object? In my thread I can get the current thread using Thread.CurrentThread property, but that will give me a Thread object. How do I move from that to a ProcessThread type?
|
|
|
|
|
The only way I've found so far is to use the Process.Threads property to get a ProcessThreadCollection of the threads. I can't find any decent way to figure out which ProcessThread is which Thread -- Thread has the Name property but not Id, and ProcessThread has Id but not Name.
One crazy way to figure it out might be by looking at the ProcessThread.StartTime property. The newer object would be the new thread that you created. It's absolutely horrible, but it might be a temporary solution if you're in a hurry. Maybe you can isolate it in a private function so that you can replace it easily in the future?
|
|
|
|
|
|
Hello,
Is it possible to find out how many methods are listening to a certain event? For example, can I find out if there are one or more methods listening to the DragDrop event of a control?
If I can't find out the exact number of methods listening to an event, can I somehow remove all listeners of that event at once?
Thanks for your help,
-Flack
|
|
|
|