Click here to Skip to main content
15,895,370 members
Home / Discussions / C#
   

C#

 
QuestionUsing Thread.Sleep() in a Timer tick event Pin
therealrustyspork29-Jul-09 4:42
therealrustyspork29-Jul-09 4:42 
AnswerRe: Using Thread.Sleep() in a Timer tick event Pin
Nagy Vilmos29-Jul-09 4:54
professionalNagy Vilmos29-Jul-09 4:54 
AnswerRe: Using Thread.Sleep() in a Timer tick event Pin
PIEBALDconsult29-Jul-09 4:55
mvePIEBALDconsult29-Jul-09 4:55 
AnswerRe: Using Thread.Sleep() in a Timer tick event Pin
Abhijit Jana29-Jul-09 5:27
professionalAbhijit Jana29-Jul-09 5:27 
GeneralRe: Using Thread.Sleep() in a Timer tick event Pin
ThomasManz29-Jul-09 10:19
ThomasManz29-Jul-09 10:19 
AnswerRe: Using Thread.Sleep() in a Timer tick event Pin
Abhijit Jana29-Jul-09 11:03
professionalAbhijit Jana29-Jul-09 11:03 
AnswerRe: Using Thread.Sleep() in a Timer tick event Pin
Lutosław29-Jul-09 10:12
Lutosław29-Jul-09 10:12 
Questionexisting object.custom property Pin
_Q12_29-Jul-09 4:19
_Q12_29-Jul-09 4:19 
My question is how to create this: for an existing object a new custom property?
"existing object"= an object control in general (ex: a textbox)
"new custom property"= by default this control "textbox" have this property:
textbox.Hide();
...and many other properties off course,but I snipe to this particular one, only.
In what way? Well, I want that a single button to have a custom property write by me, named "myHideShowProperty" that can do 2 things in one package, I mean that when I click once, "Show" that textbox ; and when I click one more time it "Hide" that textbox, then when I click once more it "Show" a textbox,and so on.
In the end, the code I imagine that it must look like this:

//im sure this is ilogical but this is how I imagine this thing could be:<br />
btn1.myHideShowProperty.show(textbox);<br />
btn1.myHideShowProperty.hide(textbox);



The idea behind all of this is how to write a customized property for an existing object control.
And of course a solution for my problem, if there is one.
though I must mention that I have made a variant and it works:

// two buttons on top of each other<br />
        private void button1_Click(object sender, EventArgs e)<br />
        {<br />
            button1.Hide();<br />
            button3.Show();<br />
            button3.Text = "second btn";<br />
        }<br />
<br />
        private void button3_Click(object sender, EventArgs e)<br />
        {<br />
            button3.Hide();<br />
            button1.Show();<br />
            button1.Text = "first btn";<br />
        }<br />
//but is a silly code,no? :)

AnswerRe: existing object.custom property Pin
OriginalGriff29-Jul-09 4:30
mveOriginalGriff29-Jul-09 4:30 
AnswerRe: existing object.custom property Pin
_Q12_29-Jul-09 6:32
_Q12_29-Jul-09 6:32 
QuestionRouge Text String in Socket Programing Pin
User 621557929-Jul-09 4:04
User 621557929-Jul-09 4:04 
AnswerRe: Rouge Text String in Socket Programing Pin
Nagy Vilmos29-Jul-09 4:59
professionalNagy Vilmos29-Jul-09 4:59 
GeneralRe: Rouge Text String in Socket Programing Pin
User 621557929-Jul-09 5:09
User 621557929-Jul-09 5:09 
GeneralRe: Rouge Text String in Socket Programing Pin
Nagy Vilmos29-Jul-09 5:12
professionalNagy Vilmos29-Jul-09 5:12 
GeneralRe: Rouge Text String in Socket Programing Pin
User 621557929-Jul-09 6:21
User 621557929-Jul-09 6:21 
GeneralRe: Rouge Text String in Socket Programing Pin
Nagy Vilmos29-Jul-09 6:48
professionalNagy Vilmos29-Jul-09 6:48 
GeneralRe: Rouge Text String in Socket Programing Pin
User 621557929-Jul-09 6:55
User 621557929-Jul-09 6:55 
GeneralRe: Rouge Text String in Socket Programing Pin
Nagy Vilmos29-Jul-09 7:03
professionalNagy Vilmos29-Jul-09 7:03 
GeneralRe: Rouge Text String in Socket Programing Pin
User 621557929-Jul-09 7:11
User 621557929-Jul-09 7:11 
GeneralRe: Rouge Text String in Socket Programing Pin
Nagy Vilmos29-Jul-09 22:19
professionalNagy Vilmos29-Jul-09 22:19 
GeneralRe: Rouge Text String in Socket Programing Pin
User 621557930-Jul-09 1:54
User 621557930-Jul-09 1:54 
GeneralLogin form connectivity with SQL server 2005 with ADO.NET Pin
Harpreet Singh Matharoo29-Jul-09 4:03
Harpreet Singh Matharoo29-Jul-09 4:03 
GeneralRe: Login form connectivity with SQL server 2005 with ADO.NET Pin
Vimalsoft(Pty) Ltd29-Jul-09 4:50
professionalVimalsoft(Pty) Ltd29-Jul-09 4:50 
QuestionDatagridview DateTimePicker Problem. Pin
priyamtheone29-Jul-09 3:31
priyamtheone29-Jul-09 3:31 
QuestionFind Scroll bar moved either left/right? Pin
spalanivel29-Jul-09 3:15
spalanivel29-Jul-09 3:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.