|
I have the following code execute:
if (Directory.Exists(exportFolder))
{
Directory.Delete(exportFolder, true);
}
Directory.CreateDirectory(exportFolder);
and then a database update, and then:
wiz57.PerformExport();
Occassionally, about 1 in 20 tests I run in the IDE, PerformExport fails because exportFolder does not exist. How can it not exist if I create it and no exception is thrown? I can only suspect that the Directory code is not truly synchronous, and has not completed before PerformExport executes.
Semicolons: The number one seller of ostomy bags world wide. - dan neely
|
|
|
|
|
hi,
can anybody tell me how to acces smart tag using C#.NET in MS word 2003.
smart tag present under Tools--> Auto Correct Options-->Smart Tags in MS word 2003.
Regards:
Biswajit
biswajit nayak
|
|
|
|
|
biswajit nayak wrote: can anybody tell me how to acces smart tag using C#.NET in MS word 2003.
No. No one knows how to do that. And if anyone did it certainly would not be Microsoft and if they did they certainly would not document it.[^]
Good luck, you're going to need it.
led mike
|
|
|
|
|
hi mike,
I think you misunderstood my question.
I need to access the smarttag in MS word 2003 which is not there in the older version of MS word.
The link you send i worked on that but still it's not help full for me , From the last 5 days i am trying on this topic and searching in the net but till now i have not yet received the corerct solution.
So please help me.
biswajit nayak
|
|
|
|
|
Hi,
i am totally new to C#.NET, so please can any body tell me how to access the header and footer of a MS word document using C#.NET it's very urgent please help me.
Regards:
Biswajit
biswajit nayak
|
|
|
|
|
|
hi mike,
thank's to you.
ya i am new to .NET that means i don't know how to use the properties , i know every thing is present there ctrl+Spacebar but untill i am familiar with the usage of this thing it's tougher for me.
Again thank's to you ,
Now i got the solution how to access the header and footer but still it's not clear how to access the elements inside the header.
please help me.
Ex:
if inisde the header you insert created by , date , time etc..
Then my doubt is how to access the particular thing's that means how to access only date from the header.
biswajit nayak
|
|
|
|
|
How do I format a number so it only displays all available decimal places? I had a problem where the default formatting always wrote out four decimal places, even on whole numbers, e.g. 4 -> 4.0000, which I solved with the format string "0.####", but that rounds. Now I need to display the number 589.400000000001, which now renders as 589.4
In other words, I don't want rounding, but I don't want padding.
Semicolons: The number one seller of ostomy bags world wide. - dan neely
|
|
|
|
|
I can't say I've noticed the problem:
Console.WriteLine("{0}", 4.0);
Console.WriteLine("{0}", 589.400000000001); produces the expected:
4
589.400000000001 for me. Tested on both .NET 1.1 and 2.0 on Windows Vista.
The default is supposed to be the 'G' format.
DoEvents: Generating unexpected recursion since 1991
|
|
|
|
|
<br />
Console.WriteLine("{0}", 4.0000M);<br />
Console.WriteLine("{0}", 589.400000000001M);<br />
produces the following:
<br />
4.0000<br />
589.400000000001<br />
Semicolons: The number one seller of ostomy bags world wide. - dan neely
|
|
|
|
|
The Decimal data type preserves all decimal places. They are assumed to be significant so they are always displayed. You must call Round to round the number to a specific number of decimal places.
DoEvents: Generating unexpected recursion since 1991
|
|
|
|
|
Hi,
I'm using VB6 components referenced in VS 2005. Will VS 2008 support com components in the same way as VS 2005?
|
|
|
|
|
Yes, in exactly the same way.
DoEvents: Generating unexpected recursion since 1991
|
|
|
|
|
I have a pkcs12 file that contains two certificates. I'm using X509Certificate2 class like this:
X509Certificate2 cert = new X509Certificate2();
cert.Import(fileBytes, pwd, X509KeyStorageFlags.DefaultKeySet);
pkcs12 file is in byte array fileBytes.
The problem is that I can't define which one of the two certs to import.
Is there any way to import a specific certificate from the file?
Thanks in advance.
|
|
|
|
|
I've installed both .Net Framework v1.1 and v2.0 on my machine. Just wonder when I run a .Net Framework v1.1 application how does Windows XP know to launch .Net Framework v1.1 runtime for it, but not v2.0 runtime.
I'd like to know the mechanism behind this. Since Windows XP itself has no knowledge about .Net, I guess that when .Net gets installed, it must hook something to the OS. BTW, since Vista come with .Net Framework v3.0, does Vista works in a different way from XP or actually the same?
Thanks a lot.
|
|
|
|
|
|
Thanks so much
|
|
|
|
|
Through some fun in the binary. Let's actually use Windows 2000 as the example as Windows XP knows a bit more.
An executable contains an Import Address Table which the operating system loader fills in with the addresses of all DLLs that the executable references. It does this recursively with any DLLs that those DLLs depend on. Once it's finished doing this process, it then jumps to the Start Address that's listed in the executable's header.
.NET applications have their Start Address field set to the address in the Import Address Table that the instruction to call _CorExeMain in mscoree.dll points to. So the program effectively starts up in _CorExeMain.
mscoree.dll is one of the very few components of .NET that is shared between all versions. The version present is always from the newest version of .NET installed. It implements a pretty simple policy by default: if the application was built with .NET 1.1 and .NET 1.1 is installed, .NET 1.1 is used. Otherwise, .NET 2.0 is used. What mscoree.dll actually does is load mscorwks.dll from the specified version's folder and hand the program off to that.
You can override the policy by adding a configuration file (MyApp.exe.config, if the program is MyApp.exe) and setting the <supportedRuntime> element to say which version of .NET should be used. I've used this for an unmanaged program to control the version of .NET used for COM components.
Incidentally, ".NET 3.0" is just a set of new classes. The runtime, mscorwks.dll, is not updated after .NET 2.0 (except for .NET 2.0 SP1).
It gets even more complicated for 64-bit operating systems, which are .NET-aware. Here, if the executable is compiled with /platform:x64, it gets a PE 2.0+ header indicating that a 64-bit process is required, and the 32-bit OS will reject it. If compiled with /platform:x86, it gets an original PE header indicating a 32-bit process (and a flag is set in the CLR header). However, an executable compiled with /platform:anycpu is compiled with an original PE header but runs in a 64-bit process on 64-bit Windows. I think this can only be done by the CreateProcess code recognising that it is a .NET executable and choosing to create a 64-bit process rather than a 32-bit one.
DoEvents: Generating unexpected recursion since 1991
|
|
|
|
|
Thanks so much. I've got the rough idea, but is there any relevant materials on MSDN available?
|
|
|
|
|
Hi,
I have developed an application in C#.Net,
where Im converting Html file to word.
I have two images embedded in html file.The converted word file shows the images also.
But if delete the images from the disk (path), the images will not be displayed in word file.Please provide solution for this ??
Reagards
Shiva
|
|
|
|
|
I need to make my c# app always executing. I tried using RunAppAtTime but it didn't worked well.
Is there another way to do this?
thanks
Ale
|
|
|
|
|
That depends on what you mean by "always executing". If the application is supposed to be running for the lifetime of a user being logged in, you launch the app from either the All Users or the individual users Startup folder. If the app is supposed to be running so long as Windows is running, then you write your application as a Windows Service (no user interface allowed!)
|
|
|
|
|
How shall i read windows address book using .net framework ?
if possbible give sample code.
|
|
|
|
|
There is no support in the .NET Framework to specifically read an address book file.
Try Googling for "vb.net windows address book" for possible solutions and libraries that do what you want.
|
|
|
|
|
Here is an issue that is driving me crazy. If someone has an idea, I'd love to hear it:
When I try to set a reference to a dll that was not built on my machine (in C#, either .NET 2.0 or 3.5), I get a yellow !-mark in the explorer and the project will not build. It has no problem with dll's built on this machine. It doesn't matter what the other machine was... it won't take them.
Here are the warnings I get when the build fails:
The referenced component 'whatever' could not be found
and
Resolved file has a bad image, no metadata, or is otherwise inaccessible. Could not load file or assembly 'C:\whatever.dll' or one of its dependencies. The module was expected to contain an assembly manifest.
If I just copy the same dll to another machine, and add a reference to it, the project builds fine. So there is nothing wrong with the dll.
If I actually copy a project from another machine into this one, with the references already set and include the dll's, it will build on my machine without a problem. If I remove the reference (on my machine) and then try to add it back, I get the error.
Also, dll's built on this machine will run fine on another.
So the issue is apparently not in the dll, but in whatever is setting the reference in the project. Does the dll contain some information that is unique to the machine it's from? Is this being processed incorrectly when the reference is trying to be sent?
Thanks for any ideas,
Bob.
|
|
|
|