|
|
Oh Thanks
|
|
|
|
|
Hello,
How do you create a program that has ability to run a bit of code only when the program first executes and then ignores it all subsequent times?
Many thanks.
Andy.
|
|
|
|
|
Keep track of whether the program has executed the code (by saving this piece of information in a config/ini file or the registry, for example).
/ravi
|
|
|
|
|
Hello!
I need code in C# to crypt data in RC2, DES or Rijndael algorythm.
Please, don't offer me realisation based on standart (built-in) .NET methods
|
|
|
|
|
_c2h5oh_ wrote: Please, don't offer me realisation based on standart (built-in) .NET methods
Why not?
/ravi
|
|
|
|
|
It is required for the project
|
|
|
|
|
OK, but it's going to be a lot of work!
/ravi
|
|
|
|
|
Thank you, but I wish to look at working C# code
It's really seemed to going to be a lot of work
|
|
|
|
|
_c2h5oh_ wrote: It's really seemed to going to be a lot of work
Yes, which is why it's built into the .NET framework.
/ravi
|
|
|
|
|
Of cource that's perfect that it is built-in ability, but it is required to have own realisation w/o standart features ... =(
|
|
|
|
|
Now that is a silly requirement. A bit like "print text to the console without using any build-in .NET code"
Are you allowed to use CryptAPI?
|
|
|
|
|
I know, that it's silly, but requirements are so.
No. I'm not allowed to use any external libraries etc.
So, do you know, where can I look for my headache?
|
|
|
|
|
You wont find any since the most used implementation in C# is going to be the .NET Framework's built-in library. Any custom implementation that goes outside the stanard is going to be proprietary and very secret to the organization using it. On top of that, noone is going to just hand over their own hard work to someone they don't know. Also, if you didn't write the implementation, how on earth are you going to debug and support it??
|
|
|
|
|
Yes, You are right. But it's sorrowful for us. We spent a lot of time searching for necessary info, but found nothing. Only source in C++. Probably, the best way is to rework it into c#?
|
|
|
|
|
Why do that when you can just compile the C++ source into a .DLL and use that from C#...
|
|
|
|
|
Hmm.. It's interesting idea, we hadn't think about it yet, thnx!
|
|
|
|
|
Hey all,
I was wondering if there is a way to change a single property on a couple of controls at the same time. Like in my app, I have to change the ReadOnly and BackColor of 10 TextBoxes at the same time.
Do I have to go like:
txtTextBox1.ReadOnly(True);
txtTextBox2.ReadOnly(True);
etc...
Or would there be something like:
txtTextbox1, txtTextbox2.ReadOnly(True) ?
That would save me a heap of coding....
Thanks!
Yup, I'm a NooB
|
|
|
|
|
Hi,
there is no special syntax available to indicate multiple controls.
This is what you can do:
1. either create a collection (say a List< Control> ) and put the references to the Controls of interest in there, then do a foreach(Control ctrl in myControlList) ctrl.DoSomething();
2. or enumerate all Controls on the Form and test some characteristic, e.g.
foreach(Control ctrl in this.Controls) {
TextBox tb = ctrl as TextBox;
if (tb!=null) {
if (tb.Name.StartsWith("aha")) || tb.Tag!=null) {
tb.ReadOnly=true;
}
}
}
Luc Pattyn [Forum Guidelines] [My Articles]
- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets
|
|
|
|
|
this must be in recursive method...else the textboxes in container controls will not be effected
TVMU^P[[IGIOQHG^JSH`A#@`RFJ\c^JPL>;"[,*/|+&WLEZGc`AFXc!L
%^]*IRXD#@GKCQ`R\^SF_WcHbORY87֦ʻ6ϣN8ȤBcRAV\Z^&SU~%CSWQ@#2
W_AD`EPABIKRDFVS)EVLQK)JKSQXUFYK[M`UKs*$GwU#(QDXBER@CBN%
Rs0~53%eYrd8mt^7Z6]iTF+(EWfJ9zaK-iTV.C\y<pjxsg-b$f4ia>
--------------------------------------------------------
128 bit encrypted signature, crack if you can
|
|
|
|
|
this is what you want is;
foreach (Control txt in this.Controls)
if (txt is TextBox)
((TextBox)txt).ReadOnly = true;
|
|
|
|
|
Wouldn't that be txtTextBox1.ReadOnly = txtTextBox2.ReadOnly = True ; ?
|
|
|
|
|
Thanks everyone!
Yup, I'm a NEWB
|
|
|
|
|
Hi
i have a form and i inserted a gif image to it's resx file (local resource). now, i want to retrieve it and display to picturebox, for this, i wrote this code :
this.pictureBox1.Image = Image.FromStream(this.GetType().Assembly.GetManifestResourceStream("MyAppNamespace.Form1.wait1.gif"));
but the following error message shown me :
Value of 'null' is not valid for 'stream'.
where does my problem and how to solve it ?
Thanks
|
|
|
|
|
Why don't you just do this?
this.pictureBox1.Image = Properties.Resources.wait1.gif;
Kristian Sixhoej
"You can always become better." - Tiger Woods
|
|
|
|