|
Hi I am new to C#. I want print a document in Bill format.before that i have to display preview of bill to me.I am taking item,rate in textbox.Please help me . I want to display Store name in one corner of page. Items in table format and total at ent of page.Please help me
IT is urgent
|
|
|
|
|
umesh.nevase wrote: I want print a document in Bill format.
You should use the .NET Printdocument Class[^].
umesh.nevase wrote: IT is urgent
This is not considered polite; however urgent it may be to you, we have our own priorities.
|
|
|
|
|
there are different different way u can build report.u need crystal report and show the data source
|
|
|
|
|
khosnur wrote: u need crystal report
You really do not like this person do you, Crystal Reports is one of the greatest PITA on the market today, recommending this poor person, who is obviously a newbie, to use CR is a great disservice to him/her. There are many, better options than CR for report processing.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
khosnur wrote: u need crystal report
No you don't. There are better options, like SSRS, Active Reports, etc. Besides, the OP just wants to print the document, not create a report.
only two letters away from being an asset
|
|
|
|
|
I have completed a simple windows project and wish to deploy it. I wish to create a proper installer like those that appear in professional applications. I don't wish to use the publish option form project properties as it just creates an executable. I also tried the Setup and Deployment project in other project type but got confused and messed up.
|
|
|
|
|
right click on solution-add new project-Expand other project type-Select setup and deployment...
try this way.
|
|
|
|
|
Khosnur,
I have completed till this step(before i posted the problem) but now there are three folders in list view appearing. Now what should i do?
|
|
|
|
|
|
|
You waited over six hours for this. A google search with decent keywords would have yielded a similar result in less than six seconds.
It's not necessary to be so stupid, either, but people manage it. - Christian Graus, 2009 AD
|
|
|
|
|
I am trying to execute Command Prompt(Ms-DOS) commands through C# like shutdown -s -t 0(and several other commands) by creating an object of System.Diagnostic.Process class. When the Start method is executed a new Command Prompt window opens but the command does not execute.
public static void ExecuteCommand()
{
Process p = new Process("cmd.exe", "shutdown -s -t 0");
p.CreateNoWindow = true;
p.UseShellExecute = false;
p.Start();
}
I have imported the System.Diagnostic namespace.
Banking establishments are more dangerous than standing armies.
|
|
|
|
|
Why do you need to put the program as a parameter? CMD doesn't accept parameters like that. Just replace the line which creates your Process instantiation with
Process p = new Process("shutdown -s -t 0");
That will run the actual program, not just open a command prompt.
|
|
|
|
|
Computafreak,
The statement you gave gives a file not found exception.
|
|
|
|
|
That's odd. Try just invoking Process.Start(...) instead of manually instantiating the Process class.
|
|
|
|
|
C:\>cmd /?
Starts a new instance of the Windows XP command interpreter
CMD [/A | /U] [/Q] [/D] [/E:ON | /E:OFF] [/F:ON | /F:OFF] [/V:ON | /V:OFF]
[[/S] [/C | /K] string]
/C Carries out the command specified by string and then terminates
I think you need the /C parameter.
|
|
|
|
|
Hi,
Process.Start("shutdown", "-s -t 0"); is all you need assuming you have sufficient rights.
shutdown.exe is one of the Windows utilities, no cmd.exe required here.
[ADDED]
And with an amended 4-line approach like yours, the DOS window flashing can be avoided.
[/ADDED]
Luc Pattyn
Local announcement (Antwerp region): Lange Wapper? Neen!
modified on Sunday, September 27, 2009 2:37 PM
|
|
|
|
|
I don't have visual studio 2005 to run the chess program. But I have downloaded visual studio 2008 express because it is free. However I cannot succeed to make the program run on this plateform. Is there a simple way to make it running and what must I do?
Thanks,
Marcel Jacon
marcel.jacon@wanadoo.fr
|
|
|
|
|
Marcel51 wrote: However I cannot succeed to make the program run on this plateform. Is there a simple way to make it running and what must I do?
You could start by explaining what it is that does not run. Does the project compile cleanly, Do you have the full SDK libraries to support it, etc.?
|
|
|
|
|
I'm trying to add a button onto the toolbar so that everytime I click the button the dll file will be copied to a specific folder.
I used Assembly.GetExecutingAssembly().GetName().Name to find the assembly name of the current project, but instead it returns the assembly name of the add-in.
Also Directory.GetCurrentDirectory() only returns "C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE" instead of the path of current executing project.
Can anyone help me please?
|
|
|
|
|
I have no experience with VS add-ins, however (1) there must be several CodeProject articles on the subject, and (2) CP has a Visual Studio forum.
FYI: you can add "DOS commands" as pre- or post-build step to the build process; that is how I copy DLLs from one project to another. Disadvantage: you have to add the command once, advantage: it copies automatically.
Luc Pattyn
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
Luc Pattyn wrote: pre- or post-build step
That's my suggestion also.
On the other hand, you can change the directory where the DLL/EXE is built -- I do that some times as well.
As an even more advance and unexpected solution, you could have the destination directory be a junction to the real directory -- I've done that.
|
|
|
|
|
Thank you guys for the quick replies.
However users can't add post-build event every time they create a project.That's what the button is for, it copies the assembly file of the current project to a folder(which should be specified by the user).
But Since the executing file is the add-in instead of the project, I dont' know how to get the file name and path.
|
|
|
|
|
|
I'm new to C# and new to programming in general, so please forgive me if I don't have my nomenclature down. I'd like to recreate one of my favorite utilities, Vitrite, a tiny open source program that allows you to right-click on any window, make it "always on top" and adjust its transparency. I've been reading up on hooking and writing background services, but I'm having some trouble finding a good primer explaining how to define properties for a global system object (is that the correct term?), or even if that's possible in C#.
To clarify, in case I'm not wording it correctly, I want to be able to define focus for any window that opens on my system. I'm teaching myself, so I'm happy to figure out the details on my own, but if anyone could get me pointed in the right direction, I'd appreciate it.
Thanks!
modified on Saturday, September 26, 2009 10:37 PM
|
|
|
|