|
hi all,
i think everybody in this forum are very busy their jobs.Yes,i have a
problem in opening a pdf file using hyperlink or linkbutton or anything
in .NET.Please tell me some control name by which i can open the PDF file or
Please tell me the steps to be followed to open it.I have delivery of my
project it is very urgent.Please give me solution as early as possible.
Thnak you all in advance.
bye.......
K.vamsee Krishna
|
|
|
|
|
Aspose.PDF[^] has a viewer I think.
The Welsh will always support two teams: The Welsh, and anyone playing England
|
|
|
|
|
On event LinkClicked use this function : Process.Start("myfile.pdf")
The file is opened with default pdf reader.
|
|
|
|
|
i have a document in crystal report and i want to save that report as pdf, in windows application.. could anybody help me...
|
|
|
|
|
hi
try this
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;
ReportDocument pdfReport = new ReportDocument();
pdfReport.Load(myReportFileName);
pdfReport.SetDataSource(myDataSet);
pdfReport.Refresh();
MemoryStream ms = (MemoryStream)pdfReport.ExportToStream(ExportFormatType.PortableDocFormat);
// Write the MemoryStream (i.e. ms) to file
regards
joe
|
|
|
|
|
Don't forget to call Dispose() on the ReportDocument object too.
|
|
|
|
|
how i can make connection between windows form and sql server through code?
|
|
|
|
|
|
hi all,
i am trying to load a page in a webbrowser.
how can i be sure that the page i am trying to open is completely loaded ?
then again i want to refresh that page for couple of times. (but it must be loaded completely before each refresh)
how can i check this ?
help please.
thanks in advance,
bye.
|
|
|
|
|
Monitor the ProgressChanged event, the DocumentCompleted event isn't that reliable I've found, sometimes kicks in too early. Once you've decided the whole page has loaded then you can refresh it and start monitoring again.
The Welsh will always support two teams: The Welsh, and anyone playing England
|
|
|
|
|
Hi to all,
How/where to add libraries req. for C# project in Visual Studio 2005 framework.
Best Regards & Thanks,
Aniket Salunkhe
|
|
|
|
|
In the solution explorer you can right click on the name of the project and click "Add Reference". I believe that you can also go to the Project item in the menu and select "Add Reference"/
|
|
|
|
|
I am making a form that will will Generate a report. It will display the report from the reporting services.
From that form, I have a preview and print buttons. Preview will display the report.
and print will print the report. Printing of reports would be possible even if the report isn't displayed yet.
How will i print the report though it hasn't beens shown yet?
What could be my possible code for it?
|
|
|
|
|
Hi I've never really understood the use in this peice of code, ive been told its good practice/programming to use it and its been mentioned it had somthing to do with security but personaly i cannot see why.
<br />
private int x;<br />
public int X()<br />
{<br />
get {x}<br />
set {x = value;}<br />
}<br />
(the code might be slightly wrong doing this on the fly)
whats the use in it though surly unless your only using one of the get or the set you might as well just use a public variable that way u decrease on the code thats needed to be written, compiled and read.
any comments would be apreciated
-- modified at 6:16 Wednesday 21st June, 2006
|
|
|
|
|
Yes it is definately good practice. There is a slight mistake in it, it should be
get
{
return x;
}
And no () parentheses after X.
X is called the property of x and the reason it is good practice is because in the GET and SET section you can write code to perform any operation you want. For example, you might have a boolean variable (call it 'ready') in your class and you would only allow users to retrieve the value of x if 'ready' is true. So you could do the following:
get
{
if (ready) return x;
else return 0;
}
The same thing can be applied to the SET section, where you could for instance only allow writing of a value if 'ready' is true:
set
{
if (ready) x = value;
else x=0;
}
Now, if a variable only has a get property, it's said to be read-only. Obvsiously, since you cannot set its value to anything.
I hope this helps a bit.
Talal
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
--Rich Cook
|
|
|
|
|
i realised that you could enter other code into the get and set but i hadn't thought of using it in that way, which makes alot of scence.
but that was well explained thx
so as far as good practice gose its good to use it on a normal variable without any aditional code just so if somone comes along in the futre they dont have to adjust a ton of code?
|
|
|
|
|
yes, it is a good idea to always have your class variables as protected or private and expose them to the user by mean of properties.
Another common practice is to have the propery name the same as the variable name but with a capitalized first letter. i.e. roleName and RoleName.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
--Rich Cook
|
|
|
|
|
It is just usefull when u want to trace a code where u can use value of 'x' and change value of 'x'. And it is more usefull for large project.
regards,
Divyang Mithaiwala
System Engineer & Software Developer
|
|
|
|
|
There are already good answers to your question, but I'll give you the simple answer...
One of the corner stones of object oriented programming is encapsulation. Which means hiding implementation details from the user. When you expose a field you are allowing the user to set that field to anything they wish. When you encapsulate that field with a property, you allow the class the ability to validate data that the user tries to set to that property/field.
When designing a class, it's important to state in some fashion what the expected behaviour of the class is within a finite range of inputs. It's up to the class to determine what valid inputs are so that it can guarantee valid behaviour. Properties allow the class to take input from the user of the class and verify that it can guarantee correct behaviour with the data provided.
Granted, most people just use the most basic functionality for a property, which is to just return or set the field. But when clients of the class are using the property, you can easily change the property to do data checking later without changing how the clients use the class.
Hope that helps.
Visit BoneSoft.com
|
|
|
|
|
Hi all! I want to start programming for smart devices, I have installed smart mobile device 2003 and each time I run it, it keeps telling me that an error occured continue yes or no. I want to find out if there's any other software I need to install.
Thanks
AC
|
|
|
|
|
It might be a little more helpful to explain the error a little more. Are you getting the error when you run Visual Studio or when you are trying to run the application you have created? Are you trying to use the emulator or a device?
|
|
|
|
|
hi
I'm trying to execute an MSI installation file from inside a windows application. Here's what I'm doing:
Process p = null;
p = new Process();
p.StartInfo.WorkingDirectory = path;
p.StartInfo.WindowStyle = ProcessWindowStyle.Normal;
p.StartInfo.FileName = "Microsoft_WSE_20_SP3_Runtime.msi";
p.Start();
p.WaitForExit();
When I run it, I get a message saying the installation package could not be opened. When I run it from the command prompt, it works.
I use the same code to run osql commands and those work fine.
Any ideas what I'm doing wrong?
thanks,
Talal
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
--Rich Cook
|
|
|
|
|
Try setting the UseShell property of the Process.StartInfo class.
The Welsh will always support two teams: The Welsh, and anyone playing England
|
|
|
|
|
Thanks! It works. I have just tested it on the dev machine.
I couldn't help noticing your signature...I get that you were supporting Sweden yesterday?
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning."
--Rich Cook
|
|
|
|
|
Talal Sultan wrote: I couldn't help noticing your signature...I get that you were supporting Sweden yesterday?
Not really, but I couldn't have cared either way. It's just we Welsh like taking the **** out of the English but on the whole we prefer if a British team wins (we think of it as Britain rather than England playing).
The Welsh will always support two teams: The Welsh, and anyone playing England
|
|
|
|