|
Thanks for the help
Now, the Services run on my machine, I'm trying to make a Installer with the Deploy Template, but isn't work, the application installutil is installed with the .NET Distribution???, I don't wanna install de .NET Framework SDK into the server.
|
|
|
|
|
Yes it is, but you have to add the Framework path to your PATH environment variable or execute installutil.exe using the fully-qualified path. The path for .NET 1.0 is %WINDIR%\Microsoft.NET\Framework\v1.0.3705 and for .NET 1.1 %WINDIR%\Microsoft.NET\Framework\v1.1.4322.
Make sure your Installer class is attributed with the RunInstallerAttribute . For an example, see the ServiceInstaller class documentation (for the class itself).
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
It's Works Finally, Thanks you are so helpful. The WinService now is running, and I installed into the server, I didn't need add manually.
I'm happy now
|
|
|
|
|
Today I start some playing with Cryptograhy classes and I encounterd a problem,I hope someone can display it for me.
I create a file and encrypt it to another file to see the value. It works Ok,then I do it again with the same key but changed the value of IV for the key,the output changed ! Now I decrypt these two output with the same key but different IV and they decrypt to original values correctly. The question is:
I changed vectors(IV) for the key and I get different ENCRYPTED value but changing IV return the same DECRYPTED value.
Thanks
Mazy
No sig. available now.
|
|
|
|
|
Different initialization vectors (IV) should produce different content with symmetric encryption. It's the key that is important and must remain the same. The encrypted content is often different - especially with asymmetric algorithms - because a number of factors are used to encrypt the content. For example, often the IV is randomly generated, and random generators are often seeded with an aspect (like ticks) of the current time.
If you're interested in cryptography, you should read Applied Cryptography, 2nd Edition[^] by Bruce Schneier, one of the leading cryptoanalysts (and a good writer to boot) today.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
Thanks Heath,I don't understand whats the role of IV from the docs I have,can you give me your view about it?
Thanks for the book too,I'll buy it,now I'm reading .NET Framework Security[^]. Its a little hard for me but little by little I'm going through it.
Mazy
No sig. available now.
|
|
|
|
|
An IV is a way to increase security by introducing variance when encrypting the input data. It is a nonsecret (not necessarily shared) key.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
hmmmmmm,I got some clues.
Mazy
No sig. available now.
|
|
|
|
|
I want to get international names of menu items on mouse right click. How to get them using standard .net classes without using Win functions?
Hi,
AW
|
|
|
|
|
ResX files. Read about localization in the .NET Framework and see the ResourceManager class documentation for details and examples. Basically, you use ResX files to store localized strings for your application. For properly named ResX files (like ClassName.de.resx for culture-neutral German language), a satellite assembly is created that the CLR loads when the Thread.CurrentUICulture is set to something other than the neutral resources language (the language of the resource in your source code, see also the NeutralResourcesLanguageAttribute for more information and use this to increase assembly resolution performance).
You'll have to put all the values for Cut, Copy, Paste, and anything else in the ResX files. I recommend using a Singleton pattern for the ResourceManager like Microsoft does so that you can 1) eliminate wasted memory resources by having a single instance of a ResourceManager , and 2) easily share localized resources amongst many classes. If you use a disassembler or decompiler to look at Microsoft's BCL assemblies, you'll notice this in their SR classes (usually one per assembly).
This won't get them from Windows, but there really isn't a way to do that. Windows MUI usually stores localized resources per application or library. This way with .NET is pretty much the same thing (specially named libraries or similarly named libraries in specially name directories is common).
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
I thought I can get option names from standard context menu for right mouse click. Thx.
Hi,
AW
|
|
|
|
|
I'm designing a Calculator application in C#. However, I have some
questions about it.
1.) How can I enter multiple lines in a Message Box? For example:
MessageBox.Show("This Calculator was originally designed on Java. It was modified by Alex in C#.", "About this Calculator");
It will display it in a whole sentance like this:
This Calculator was originally designed on Java. It was modified by Alex in C#.
However, I want to split into two sentance like this:
version v1.0
This Calculator was originally designed on Java.
It was modified by Alex in C#.
2.) Also, I wonder if it is possible to include a link to my e-mail in
the Message Box?
3.) How can I stop people from resizing the form (frame)?
4.) How can I disable the maximize button (but I want to keep the
minimize and close buttons) like how the Calculator in the Windows
XP did it.
Thanks.
|
|
|
|
|
1. Inject Environment.NewLine in to the string at the appropriate point.
2. Not that I know of
3. Choose a FormBorderStyle that does not permit resizing (e.g. FixedSingle)
4. Set MaximizeBox to false
--Colin Mackay--
|
|
|
|
|
First of all, thanks for your reply.
I'm a C# and windows programming newbie, can you be more
specific with some codes?
1. Inject Environment.NewLine in to the string at the appropriate point?
What do you mean?
3. public class Calculator : System.Windows.Forms.Form
that is the class. so how do I choose FixedSingle?
4. How can I set the MaximizeBox to false?
|
|
|
|
|
|
Alex Ngai wrote:
2.) Also, I wonder if it is possible to include a link to my e-mail in
the Message Box?
No. You'll have to create your own dialog class that looks like the dialog that MessageBox.Show displays. Otherwise, just put your email address in a LinkLabel in a Form to be used as your About box from the Help menu.
Since you're a newbie and asking pretty basic questions, you should also read the .NET Framework SDK, especially reviewing the class library to see what's available. Many of the properties on the Form class are easily set (as Colin showed you). Being familar with the class library (not necessarily memorizing it) and truly understanding the .NET Framework (like that all compilers for all languages targeting the CLR produce IL so the source language really doesn't matter, which is a common misunderstanding) is important.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
I appretiate your help if you tell me how can i build start menue-like in my program using C#....
please respons to me on:
sfayoumy@hotmail.com
or
sfayoumy@yahoo.com
|
|
|
|
|
Put a Button in your application. Create a ContextMenu and when the user clicks your button call ContextMenu.Show passing the Button reference and the position (like the Button.Location property value) to the method. See the ContextMenu.Show method in the .NET Framework SDK documentation for more information and even an example.
But again - like we told you the first time - this is way-overdone and will most likely only confuse users. Read the Windows UI guidelines I linked you.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
hi,
how can i set a brush to a hatch style brush in runtime if i know the name of hatchstyle brush(a string) ia sth like "Cross", ???
Help Please!
|
|
|
|
|
string name = "Cross";
HatchStyle style = Enum.Parse(typeof(HatchStyle), name); See Enum.Parse in the .NET Framework SDK documentation for more details.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
hi,
i tried that but it won't work and says that:
Cannot implicitly convert type 'object' to 'System.Drawing.Drawing2D.HatchStyle'
There is no SaveGame in real life.
|
|
|
|
|
Sorry, I forgot the cast. The word "implicitly" should've given you a clue to explicitly cast, though.
-----BEGIN GEEK CODE BLOCK-----
Version: 3.21
GCS/G/MU d- s: a- C++++ UL@ P++(+++) L+(--) E--- W+++ N++ o+ K? w++++ O- M(+) V? PS-- PE Y++ PGP++ t++@ 5 X+++ R+@ tv+ b(-)>b++ DI++++ D+ G e++>+++ h---* r+++ y+++
-----END GEEK CODE BLOCK-----
|
|
|
|
|
hey i found that , thats it , just it!!! :::
HatchStyle style = (HatchStyle)Enum.Parse(typeof(HatchStyle),"Some Value");
There is no SaveGame in real life.
|
|
|
|
|
What is beter convention in C#:
1) To keep each class in seperate .CS file
OR
2) Keep all classes of same namespace in a single .CS file
i know both ways work.. but just wanna know what is a better convention
Muhammad Shoaib Khan
http://geocities.com/lansolution
|
|
|
|
|
One Class - One File (In my opinion)
Having all of one namespace in a single cs file could get very very crowded.
--Colin Mackay--
|
|
|
|