|
this community is for helping not for findng mistakes only
This code was posted by me...
|
|
|
|
|
Vivek Vijayan wrote: this community is for helping not for findng mistakes only
Finding mistakes is helping
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
I would say you have a compile error for no catch/finally block but that's the best I can give you for the example you have shown...
Oh, no wait... it's coming to me... 'the.. answer.. is.. .. ..' ..Damn, lost it!
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
if i am writing code for try{}
i know how to write catch and finally
tnx
This code was posted by me...
|
|
|
|
|
Vivek Vijayan wrote: if i am writing code for try{}
i know how to write catch and finally
Er... Where is the logic in that?
you are writing code for database insert but that evidently does not mean you know how to write it
And it's a good example of why your need to make your example better in order to get a good response - you didn't put the catch/finally in your example so how do I know that is not your error?!
Hmmm... a little thought can go a long way.
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
|
To get the path of your executable:
System.Reflection.Assembly.GetEntryAssembly().Location
Then just get the directory with System.IO.Path.GetDirectoryName(), and use System.IO.Path.Combine() to tack on the PDF filename.
(Better to use System.IO.Path than string parsing, to make sure it'll work regardless of the location... forward slashes / backslashes, etc)
|
|
|
|
|
Use the code below. Application.StartupPath gives you the path of executable
Process.Start(Application.StartupPath + @"\sample.pdf");
|
|
|
|
|
Or you could try this: (assuming the PDF file will always be in the same directory as your application executable)
Process.Start(Environment.CurrentDirectory + @"\file.pdf");
Hope this helps.
Regards,
Jason Pezzimenti.
If you liked the answer that I have provided, then please click the 'Good Answer' link on the bottom-right of this post. Thank you.
|
|
|
|
|
i have devloped windows application
i want to create linces key
and user should enter key while setup
and also how do i specify the duration like trial version for 1 month
|
|
|
|
|
Licensing systems are a little more complicated than just setting a few properties, unfortunately...
A couple quick searches, and I found an article here on CP that might help you:
Using XML Digital Signatures for Application Licensing[^]
If that's too advanced, you might be better off going with a third-party solution... There are some out there... Just google for "C# licensing system"
|
|
|
|
|
im having a hard time coding a simple calculaor especially on its buttons function.everyone willing to help me?...tanx!looking forward to your help.
|
|
|
|
|
So what about your homework project specifically are you having a hard time with?
|
|
|
|
|
Can you be more specific about the problems you are having. I'm sure then people are more pleased to help.
I think you should not expect someone to do all the job for you.
|
|
|
|
|
Search the articles; there are all too many simple calculator articles here.
|
|
|
|
|
Hi
i want to inject code into .net assemblies. for this, i found some useful tools such as Reflexil that can some changes to an assemblies limited, but u can not add more class or change an existing properties of that assemblies.
Is there any better tool or way to accomplish this ?
thanks
|
|
|
|
|
What is your intent? I am asking you since you have went to extremes like Reflexil.
|
|
|
|
|
i want to analysis some our applications and it's security leveles.
i don't want to make virus, .... it's only for testing.
if u can't help me, plz don't post
|
|
|
|
|
Cool down, Use your energy to solve the problem. Try Mono Cecil. You can edit IL, add\remove functionality and do more.
|
|
|
|
|
Hi,
My application contains several forms and if any of them shows MessageBox i can't close other forms normally. Forms works normally but i cant use close method at all, only dispose() method works. please help!
James Hunt
|
|
|
|
|
Close them like this
Form.Close();
remember that the Form should be an object of your form.
Vuyiswa Maseko,
Few companies that installed computers to reduce the employment of clerks have realized their expectations.... They now need more and more expensive clerks even though they call them "Developers" or "Programmers."
C#/VB.NET/ASP.NET/SQL7/2000/2005/2008
http://www.vuyiswamaseko.somee.com
http://www.vuyiswamaseko.tiyaneProperties.co.za
vuyiswa@its.co.za
http://www.itsabacus.co.za/itsabacus/
|
|
|
|
|
MessageBoxes are Modal Forms, you cannot move to another Form in the same application while they are showing!
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
I have a situation when i have to move to another form in the same application while messageBox is showing.
I do it by using SetForegroundWindow method.
|
|
|
|
|
Yes you can do it programatically, but not manually, as far as I know anyway.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
If you're showing a MessageBox, then you have a modal window in operation. This needs to be dismissed before your application can receive user input again.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|