|
Are you trying to overcome the System.NullReferenceException Object reference not set to an instance of an object?
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
Hi All,
I desperately need a help from u.
I have a requirement where a background service runs and picks up all the files under it. I should print those files in the background , the file can be of any type Eg; *.txt,*.pdf,*.gif,*.doc etc
Any help is really appreciated.
Many Thanks
Hari.
|
|
|
|
|
for printing file of any type you should be able to read it...
there is no single reader for all types of files...you should check the file type, get appropriate reader...and get it printed.
Keep DotNetting!!
GeekFromIndia
|
|
|
|
|
Hi,
for all the file extensions that open a file by double-clicking in Windows Explorer,
the following should be true:
1.
you can OPEN the document by executing the single line of code: Process.Start(filespec);
or a more elaborate variant where you instantiate a Process object, and a ProcessStartInfo
object. If unfamiliar with it, look it up in the documentation.
2.
you can PRINT the document in the same way, this time set
ProcessStartInfo.Verb="PRINT";
You will be facing one problem though: each of the above typically launches a new
process and opens a new window, and these they alive and open even when you are done;
this is not due to the C# code, it is inherent to Windows (try right-clicking on
a document and select either OPEN or PRINT).
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.
|
|
|
|
|
Hello everyone,
Any of your favorite C# File I/O tutorials to recommend?
thanks in advance,
George
|
|
|
|
|
|
Thanks stancrm!
Good start point.
regards,
George
|
|
|
|
|
Hi All,
I have C# Console Application which references java.util.zip
to zip the folder. Now on Client it worked fine but on server it doesn't
I am Building setup using InnoSetup.
Isn't this dll shipped with .Net2.0
Or does I need to Assembly Reference
<compilation debug="true">
> <assemblies>
> <add assembly="vjslib, Version=2.0.0.0, Culture=neutral,
> PublicKeyToken=B03F5F7F11D50A3A"/>
> </assemblies>
> </compilation>
Thanks in Advance
Develop2Program & Program2Develop
|
|
|
|
|
You will find this files in the root folder where your .net is installed. Copy them to the bin dir of your applications.
I dont know why but some times i too see this files missing
Thanks
Laddie
Kindly rate if the answer was helpful
|
|
|
|
|
|
This is from the J# redistributable <a href="http://msdn2.microsoft.com/en-us/vjsharp/bb188598.aspx">http://msdn2.microsoft.com/en-us/vjsharp/bb188598.aspx</a>[<a href="http://msdn2.microsoft.com/en-us/vjsharp/bb188598.aspx" target="_blank" title="New Window">^</a>]
only two letters away from being an asset
|
|
|
|
|
System.AccessViolationException was unhandled
Message="Attempted to read or write protected memory. This is often an indication that other memory is corrupt."
Source="System.Drawing"
StackTrace:
at System.Drawing.SafeNativeMethods.Gdip.IntGdipDeleteFontFamily(HandleRef fontFamily)
at System.Drawing.SafeNativeMethods.Gdip.GdipDeleteFontFamily(HandleRef fontFamily)
at System.Drawing.FontFamily.Dispose(Boolean disposing)
at System.Drawing.FontFamily.Finalize()
|
|
|
|
|
Here[^]
IF you want more specific help, try asking a specific question and posting some code to go with it
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hello Sir,
As i also don't know why this error occur...
and when this error occur then it does not show error in any life of my code it simply shows close my application an show this error without telling that where and why it occur....
|
|
|
|
|
Have you tried debugging to find out where it occurs?
He who makes a beast out of himself gets rid of the pain of being a man
|
|
|
|
|
Yes but the result is same
|
|
|
|
|
What do you mean the result is same? It happens in the same place? If so, maybe you could help us to help you by posting a relevant code snippet.
He who makes a beast out of himself gets rid of the pain of being a man
|
|
|
|
|
I ran into the same issue after upgrading to Windows 7 (and IIS7) A WCF service that was previously working started to get this error.
To fix, I went into the Build properties of my projects (Project/properties/Build Tab) and changed the Platform Targer to "x86". Then the problem was gone.
|
|
|
|
|
Hello everyone,
I have made some search, but can not find C# samples of using XmlDocument, either from MSDN or other sources.
Any recommended samples?
thanks in advance,
George
|
|
|
|
|
George_George wrote: I have made some search, but can not find C# samples of using XmlDocument, either from MSDN or other sources.
You didn't try very hard then. 5 seconds with Google threw up this[^].
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
Thanks pmarfleet!
I like this one. I add an additonal "sample" keyword to do the survey, and do not find as much as you did.
regards,
George
|
|
|
|
|
Can we have an string array and add strings elements to it at random points of time, without using a for loop??
Som
|
|
|
|
|
You can not add element to array. Array has fixed lenght. You can only change any element in array any time:
myArray[0] = "hey bob!";
if you need to add element to array you need to create a new array(with more elements) and copy elements from old arrray to it together with you new elements. But this is pretty much what List<t> does, so if you need to add elements to array often at runtime I would recommend you to use List<t> which also has a method called ToArray which return current state of List<t> as regular array.
hth
|
|
|
|
|
you can use arraylist for this purpose
|
|
|
|
|
Nouman Bhatti wrote: you can use arraylist for this purpose
No one uses the ArrayList anymore. The generic types in C# 2.0 have rendered it obsolete.
I suggest you check out the Generic List<>[^] type instead.
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|