|
hi everybody,
can anybody tell me how to convert a xml file to doc,htm,pdf and doc file to pdf,htm,xml through C# code.
any help would be appreciated.
thanks in advance
|
|
|
|
|
yes
but you should know what you want to give
what i think you need can be worked out as follows
create a report and let the user save it in desired format (crystal report have it built in)
if you want to do more you should use some more dlls provided by microsoft (for doc rtf xls ) and from adobe (for pdf)
and you should read office automation (sampels provided by microsoft will work fine)
hope that will help
It is Good to be Important but!
it is more Important to be Good
|
|
|
|
|
Hi!
I want to receive and send data from local computer( in network LAN) with modem(GSM/GPRS) through GPRS. My computer is connected the router that have static IP. Modem can communication with this static IP. But the problem is ... I don't know how to communication my computer with data of router from internet (using C#)? I can process all data incom router? I don't know how ? who can help me, please?
|
|
|
|
|
You have to specify more clearly what you want to do
Yes, in C#, you can make an application that listens for incoming calls/transactions from the internet, or contact another application/server over the internet.
Find out exactly what you want/need to do and take a look at all the excellent tutorials here on CodeProject.
Best regards.
-Larantz-
for those about to code, we salute you
|
|
|
|
|
I get the thing published and everything but the moment that I run the Installer I get the following error and I have no idea what it means.
PLATFORM VERSION INFO
Windows : 5.1.2600.131072 (Win32NT)
Common Language Runtime : 2.0.50727.42
System.Deployment.dll : 2.0.50727.42 (RTM.050727-4200)
mscorwks.dll : 2.0.50727.42 (RTM.050727-4200)
dfdll.dll : 2.0.50727.42 (RTM.050727-4200)
dfshim.dll : 2.0.50727.42 (RTM.050727-4200)
SOURCES
Deployment url : file:///C:/Temp/Brim/BrimApplication.application
IDENTITIES
Deployment Identity : BrimApplication.application, Version=1.0.0.8, Culture=en-ZA, PublicKeyToken=dae4239a16c6c729, processorArchitecture=msil
APPLICATION SUMMARY
* Installable application.
ERROR SUMMARY
Below is a summary of the errors, details of these errors are listed later in the log.
* Activation of C:\Temp\Brim\BrimApplication.application resulted in exception. Following failure messages were detected:
+ Exception reading manifest from file:///C:/Temp/Brim/BrimApplication_1_0_0_8/BrimApplication.exe.manifest: the manifest may not be valid or the file could not be opened.
+ Manifest XML signature is not valid.
+ The digital signature of the object did not verify.
COMPONENT STORE TRANSACTION FAILURE SUMMARY
No transaction error was detected.
WARNINGS
There were no warnings during this operation.
OPERATION PROGRESS STATUS
* [2006/10/24 02:25:56 PM] : Activation of C:\Temp\Brim\BrimApplication.application has started.
* [2006/10/24 02:26:16 PM] : Processing of deployment manifest has successfully completed.
* [2006/10/24 02:26:16 PM] : Installation of the application has started.
ERROR DETAILS
Following errors were detected during this operation.
* [2006/10/24 02:26:16 PM] System.Deployment.Application.InvalidDeploymentException (ManifestParse)
- Exception reading manifest from file:///C:/Temp/Brim/BrimApplication_1_0_0_8/BrimApplication.exe.manifest: the manifest may not be valid or the file could not be opened.
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri)
at System.Deployment.Application.DownloadManager.DownloadApplicationManifest(AssemblyManifest deploymentManifest, String targetDir, Uri deploymentUri, IDownloadNotification notification, DownloadOptions options, Uri& appSourceUri, String& appManifestPath)
at System.Deployment.Application.ApplicationActivator.DownloadApplication(SubscriptionState subState, ActivationDescription actDesc, Int64 transactionId, TempDirectory& downloadTemp)
at System.Deployment.Application.ApplicationActivator.InstallApplication(SubscriptionState subState, ActivationDescription actDesc)
at System.Deployment.Application.ApplicationActivator.PerformDeploymentActivation(Uri activationUri, Boolean isShortcut)
at System.Deployment.Application.ApplicationActivator.ActivateDeploymentWorker(Object state)
--- Inner Exception ---
System.Deployment.Application.InvalidDeploymentException (SignatureValidation)
- Manifest XML signature is not valid.
- Source: System.Deployment
- Stack trace:
at System.Deployment.Application.Manifest.AssemblyManifest.ValidateSignature(Stream s)
at System.Deployment.Application.ManifestReader.FromDocument(String localPath, ManifestType manifestType, Uri sourceUri)
--- Inner Exception ---
System.Security.Cryptography.CryptographicException
- The digital signature of the object did not verify.
- Source: System.Deployment
- Stack trace:
at System.Deployment.Internal.CodeSigning.SignedCmiManifest.Verify(CmiManifestVerifyFlags verifyFlags)
at System.Deployment.Application.Manifest.AssemblyManifest.ValidateSignature(Stream s)
COMPONENT STORE TRANSACTION DETAILS
No transaction information is available.
Any help will be appreciated
He who laughs last is a bit on the slow side
|
|
|
|
|
NeroToxic wrote: the manifest may not be valid or the file could not be opened.
There's your problem, you'll have to take it from here I'm afraid.
Sig cops got me...
|
|
|
|
|
Is this a Visual Studio 2005 Tools for Office problem?
If so, Visual Studio 2005 Tools for Office doesn't use ClickOnce manifest files, even though they are very similar. As a result, you can't run the .application file. The only way to run the solution is to start the Office program.
|
|
|
|
|
edboe wrote: Is this a Visual Studio 2005 Tools for Office problem?
I have no idea, never used either technology (ClickOnce or VSTO, although I'm looking into trying out ClickOnce for one app I'm working on).
Sig cops got me...
|
|
|
|
|
edboe wrote: Is this a Visual Studio 2005 Tools for Office problem?
No. I use Visual C# Express 2005.
So I created a basic windows app and used the ClickOnce Publish to create the deployment files needed. That part completes fine, the moment that I run the executable file created by the publisher, I receive the error.
He who laughs last is a bit on the slow side
|
|
|
|
|
Hi all,
I am downloading a file from remote machine using webclient
as like as below,
<br />
WebClient oclient = new WebClient();<br />
<br />
oclient.DownloadFile(hostPath,localpath);<br />
1. here how can i ensure that the file is existing at the remote machine's path(hostPath) -(eg. same as like File.Exists() function ??)
2. during this operation if the file(localpath) had already opened, this download operation will throw the exception, in this case how should i show the opened file to the user.
3. During this download operation how can i detect the LAN connection failiure (disconnected )
|
|
|
|
|
1- The DownloadFile method will throw a WebException if the file does not exits. Examine the WebException's Status and Response properties.
2- Opened by the current process or another process?
3- Again, an exception will be thrown if this occurs.
You should experiment to know what exceptions are thrown in each of the cases, and what information those exceptions provide.
--------
"I say no to drugs, but they don't listen."
- Marilyn Manson
|
|
|
|
|
Hello
Can anyone give me a hint as to how I can override the font handling in a groupbox? I need to set the font style of a groupbox title/header to Bold, but that automatically results in all labels and other controls within the groupbox doing the same. Of course one can just set each of the childcontrols' font style to regular, but that gets more complicated when using more complex user controls/custom controls.
Therefore having the ability to set the header font of the groupbox to bold without affecting child controls is what I could need help to achieve.
Thanks!
-- modified at 9:09 Tuesday 24th October, 2006
All needed for evil to prevale is for good men to do nothing.
C
|
|
|
|
|
when i am inserting data by inline sql then i am getting error like
Server: Msg 241, Level 16, State 1, Line 1
Syntax error converting datetime from character string.
and my inline sql is :-
INSERT INTO MShift (DayName,ShiftDate,ShiftEntryDate,ShiftStartTime,ShiftEndTime,
TotHour,PositionID,Department,Rate,HospitalID)
VALUES ('Wednesday',CONVERT(VARCHAR(10),'10/04/2006',121),'NULL','1200','2100','NULL','1','2','100',1)
due to the date i am getting error so pls tell me where i am wrong and pls rectify my error.
thanx....
xzv
|
|
|
|
|
I don't understand why you are converting the date. I assume that ShiftDate is a DateTime or SmallDateTime column then you should just be able to put the date in a string and it will work.
My only suggestion is that, as a general rule, you should use the ISO format yyyy-mm-dd so that the format of the date is culture independent.
|
|
|
|
|
take the quotes off of the nulls
|
|
|
|
|
how to select the border of the picture box in run time?
plez help
|
|
|
|
|
hello everyone.
Do you have an easy way when resize my windows form, proportionally to resize all components(Picturebox, buttons,textboxes, graphics etc.)
Thanks.
|
|
|
|
|
Check out the Anchor, Fill and Dock properties of the controls...
Splitter controls can help as well.
Good luck...
|
|
|
|
|
it depends what you need. Anchor and docking can do alot, but the only way I could grow two groupboxes 50/50 in a form was by handling resize manually. Everything inside the groupboxes was handled by a combination of standard means but the 50/50 thing proved elusive.
|
|
|
|
|
Is there a way of casting a generic list to another one, best way to explain what I want is, imagine the following scenario
public class Customer : Person { ... }
public class Criminal : Person { ... } Now there's a dictionary object to provide a lookup table:
Dictionary<Type, List<Person>> lists; And I'd like this dictioanry to contain a list of Customers and Criminals so...
lists.Add(typeof(Customer), new List<Customer>());
lists.Add(typeof(Criminal), new List<Criminal>()); However this complains that there's no conversion between List<Customer> and List<Person>.
This code will be accessed later on, for arguments sake through a method like this:
public List<T> GetList<T>() where T : Person
{
return lists[typeof(T)];
}
Anybody have any ideas on how to accomplish this. The objects (Customer and Criminal) can be cast to Person and back again but it does not like casting the lists. Any ideas on "fooling" the compiler into doing what I want?
Sig cops got me...
|
|
|
|
|
I've found a work-around (not very nice but it works), declare Dictionary<Type, object> lists;
Sig cops got me...
|
|
|
|
|
You could use a Converter
<code>
List<Customer> customers = new Converter<Customer, Person>( CustomerToPerson )
private Person CustomerToPerson(Customer c)
{
return (Person)c; // More complicated I know, but you get the idea
}</code>
only two letters away from being an asset
|
|
|
|
|
I did think of something along those lines but doing that would result in potentially thousands of casts. (Maybe I'm being stupid though), but the way I'm doing it at the moment only has one cast and it's hidden in the internal implementation anyway so I'll go with that for the time being until I can think of a better way, or MS decide to fix the "problem".
Sig cops got me...
|
|
|
|
|
You cannot cast a List<customer> to List<person> because List<person> supports .Add(person), but you then you could add criminals to your customers list.
|
|
|
|
|
Yep, I agree, that's why it's complaining, but then again it won't let me add a List<Criminal> to the dictionary in the first place which would have solved these "problems".
I think that the only half-decent way around this is to use the dictionary to store object s. I just have to make sure that it never returns the wrong object to cast.
Sig cops got me...
|
|
|
|