|
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
|
|
|
|
|
Hi Kristian
Your suggesstion is for global resource wheras in my situation is local resource (for example: Form1.resx file)
|
|
|
|
|
Hi,
hdv212 wrote: where does my problem and how to solve it ?
If you put all the action in one big line of code you can be sure of two things:
1. if there are any problems, they will be in that one line;
2. it will be difficult to debug.
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
modified on Sunday, June 12, 2011 8:28 AM
|
|
|
|
|
Hi Luc
You mean which i wrote this code :
System.IO.Stream stream= this.GetType().Assembly.GetManifestResourceStream("DevExpressLoadingTest.Form1.resources.wait1.gif");
this.pictureBox1.Image = Image.FromStream(stream);
|
|
|
|
|
How about:
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("wait1.gif")));
I think that would work. And the chances are that in the code you have now "MyAppNamespace.Form1.wait1.gif" is incorrect, although I 'm not sure what it should be if that is the case.
My current favourite word is: Delicious!
-SK Genius
Game Programming articles start - here[ ^]-
|
|
|
|
|
Thanks SK Genius
i was tried your suggesstion like this :
System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(Form1));
this.pictureBox1.Image = ((System.Drawing.Image)(resources.GetObject("wait1.gif")));
it's no coused error, but does not show show image. when i trace my code, i saw that this.pictureBox1.Image is null.
|
|
|
|
|
I want to place a MDI form at a certain position in relation to the MDI background application window.
Ie. When I display a certain form I would like to display the form on the right of the applications MDI window and locatthis child form in the top right corner.
How could I achieve this in c#.
|
|
|
|