|
Hi All,
I stuck in a problem please help me , My problem is that I have a windowsForm at this 4 buttons are there. I want to hide the "Text" property of one particular button from Property window so that no one can assign value to it from property window but at the same time he can be able to assing "Text" property programitically .
e.g. :
button1.Text = "Register";
it will be possible by programatically not from property windows .
thanx in advance...
|
|
|
|
|
I believe you have to create your own class that derives from Button like this.
using System.ComponentModel;
using System.Windows.Forms;
public class MyButton : Button
{
[Browsable(false)]
public new string Text
{
get { return base.Text; }
set { base.Text = value; }
}
}
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Expect everything to be hard and then enjoy the things that come easy. (code-frog)
|
|
|
|
|
Hi,
I think You didn't understand my Question. I want to hide the particular property of existing control without inheriting on my form ( in current suitation it is button but in another case it may be another control or may be more than one controls ).
I do not want to inherit all control and then I hide that particular property by overriding.
I only want that I stick a perticular control on my form and hide some properties of it.
for example :
At my form there are 4 controls
1. button : I want to hide the 'Text' Property of this, from property windows sothat developer can not set it's Text from property window
2. textbox : I want to hide the 'Size' Property of this control from property windows only
3. gridview : I want to hide the 'Name' Property of this control from property windows only
4. Groupbox : I want to hide the ' Location' Property of this control from property windows only
And all of cases I do not want to inherit any control.
|
|
|
|
|
What you want isn't possible as the properties and attributes have been set by MS in the source. The only way is use your own controls where you get to set these yourself.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Expect everything to be hard and then enjoy the things that come easy. (code-frog)
|
|
|
|
|
i think what you want is only possible if we have the visual studio code.
|
|
|
|
|
Dear all,
As per the requirement in my application, through coding how can i Turn Off IE header and Footer while printing the page?
Can any body help on this,..
thanks in advance,
Devi.
|
|
|
|
|
It's a print setting in IE. I do not think you can change that from a web page. I could be wrong, but when I was stuck with a similar issue, I didnt find an answer.
|
|
|
|
|
You're not wrong. I tried (in vain) to remove this for a couple of months, and came to the conclusion that there wasn't really a way to do it.
|
|
|
|
|
Pete O'Hanlon wrote: You're not wrong.
Good to know ... that I didn't waste more than a few hours on this
|
|
|
|
|
I had to dock a pictureBox in my mdi form and send it to back, but everytime the mdi is having a baby, it hides behind the pictureBox!!
I had to create a timer that sends this pictureBox to back all the time but still it didnt work!
Is there any other way to have a background image on your mdi form??
Thank you guys
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
Open the document outline window and see that it is placed in the correct order there.
Ahsan Ullah
Senior Software Engineer
|
|
|
|
|
This[^] article should help you.
|
|
|
|
|
Hey Pete, and thanks! The article looks helpful, I'm reading it now.
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
No bother mate. Glad I could help.
|
|
|
|
|
See this[^] article.
/ravi
|
|
|
|
|
Hey Ravi,
Long time no see buddy Thanks for your informative link, but I'm sorry I bothered you guys, the problem way a particular one that relates to my form and works fine with any other windows form!
Thanks mate! 5 for trying to help though
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
Okay.. Here is my question!
I want to generate reports using crystal report or any other reporting feature that works in visual studio 2005 (using C-sharp). now the trick is, i want the user to be able to define what they would like in their report(without them actually writing the sql behind the report). for example lets say they they wanted to see a list of people with names starting with "G" according to how much they earned.. it should be able to do this. the user should just select options on the "form" and a report be generated..
thanks.
|
|
|
|
|
For this you need to pass parameters to your store procedure based on the users choice. And then based on that build your crystal report.
Ahsan Ullah
Senior Software Engineer
|
|
|
|
|
hey..
ive created reports before but ive never had to pass parameter in a report.. can more than one parameter be passed? if its not too much to ask for you could you please just explain to me how to do this.
Thanks.
(sent the exact msg to your email, wasnt sure if you'd get it or not)
|
|
|
|
|
I am not asking you to pass parameter to report. I am asking to pass parameter to your query or storeprocedure which gives you the selected records based on the parameters.
Ahsan Ullah
Senior Software Engineer
|
|
|
|
|
After defining and opening your connection and creating your data adapter..
yourCommand.CommandType = CommandType.StoredProcedure;<br />
yourCommand.CommandText = "YourStoredProcedureName(ParameterValue1,ParameterValue2)";<br />
yourCommand.ExecuteNonQuery();
All generalizations are wrong, including this one!
(\ /)
(O.o)
(><)
|
|
|
|
|
Do you mean, the users are able to really define what they like to see in the report, or, do you mean, the users have pre-defined options to choose how to filter the data??
For the first case, many developers has been asked the same thing, and the answer is no, the user, unless they know how to use the report generation tool such as Crystal Report or SQL Reporting Service, and know the system, they can't "freely" generate any report that they like.
For second case, you can pass value by parameters and have the report filter by these parameters, or in Crystal Report case, you can add the selection criteria to SelectionFormula that is formed by the user interface.
|
|
|
|
|
Hello,
i have a very very strange problem. My Application gets often a "out of memory" exception. i have a lot of classes in there and in my form, yes there are a lot of controls too. when i start my application with the debugger, it shows me all of my controls and all classes are loaded of course, but then when i want to open another form from the application, it shows me the form (but without the title-bar Oo) and if i klick somewhere in this form i get in the debugger an "outofmemory" exception. directly on the line where i start the form. the form has only a few labels and a few checkboxes.
but thats the strange on this problem... my physical memory is enough! and i thougt maybe it has to do with the debugger, i started the app directly from the explorer. there i get at the same line a exception with "parameter not valid"...
i think thats not a "code" problem... because when i have a little less controls in my form, it works... i don't know why it makes this exception, can somebody help me?
|
|
|
|
|
I guess your application is stuck in some loop and it is creating an object again and again due to which it runs out of memory.
Ahsan Ullah
Senior Software Engineer
|
|
|
|
|
i load this controls all from a list with foreach, so it has no loop, where it can't drop out.
|
|
|
|