Click here to Skip to main content
15,903,201 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionCalling an IP address? Pin
rudemusik20-Jun-08 8:01
rudemusik20-Jun-08 8:01 
AnswerRe: Calling an IP address? Pin
Eduard Keilholz21-Jun-08 7:44
Eduard Keilholz21-Jun-08 7:44 
GeneralRe: Calling an IP address? Pin
rudemusik22-Jun-08 11:25
rudemusik22-Jun-08 11:25 
QuestionDynamic Controls in asp.net Pin
Balram Watwani20-Jun-08 7:42
Balram Watwani20-Jun-08 7:42 
AnswerRe: Dynamic Controls in asp.net Pin
Christian Graus20-Jun-08 21:20
protectorChristian Graus20-Jun-08 21:20 
Questionhow can i use my datagridview's combobox Pin
Nika Asgari20-Jun-08 5:56
Nika Asgari20-Jun-08 5:56 
AnswerRe: how can i use my datagridview's combobox Pin
Jay Royall20-Jun-08 6:05
Jay Royall20-Jun-08 6:05 
QuestionDisable the controls in a form... Pin
Sebastian T Xavier20-Jun-08 4:22
Sebastian T Xavier20-Jun-08 4:22 
All,

I have written a code segment to disable the controls in a form...

private void button1_Click(object sender, EventArgs e)
        {
            foreach (Control cntl in this.Controls)
            {
                if (cntl.HasChildren)
                {
                    lockControls(cntl);
                }
                else
                {
		    cntl.Enabled = false;
		}
            }
        }
		
private void lockControls(Control subcntl)
        {
            foreach (Control Ncntl in subcntl.Controls)
            {
                if (Ncntl.HasChildren)
                {
                    lockControls(Ncntl);
                }
                else
                {
                    Ncntl.Enabled = false;
                }
            }
        }


Here the problem is , this code will disable the form also(i.e. the minimze, maximize & restore buttons of the form); How i can resolve this issue...Confused | :confused:

Please suggest...thanks in advance...

Sebastian
AnswerRe: Disable the controls in a form... Pin
Eduard Keilholz20-Jun-08 4:54
Eduard Keilholz20-Jun-08 4:54 
GeneralRe: Disable the controls in a form... Pin
Sebastian T Xavier20-Jun-08 5:32
Sebastian T Xavier20-Jun-08 5:32 
GeneralRe: Disable the controls in a form... Pin
MarkB77720-Jun-08 19:42
MarkB77720-Jun-08 19:42 
AnswerRe: Disable the controls in a form... Pin
Jay Royall20-Jun-08 5:28
Jay Royall20-Jun-08 5:28 
QuestionTransparent Form and windows media player Pin
divyesh143220-Jun-08 1:24
divyesh143220-Jun-08 1:24 
AnswerRe: Transparent Form and windows media player Pin
nogChoco22-Jun-08 5:35
nogChoco22-Jun-08 5:35 
QuestionDataGridView to Xml Pin
Anoop Brijmohun19-Jun-08 23:39
Anoop Brijmohun19-Jun-08 23:39 
AnswerRe: DataGridView to Xml Pin
Ajay.k_Singh20-Jun-08 3:19
Ajay.k_Singh20-Jun-08 3:19 
GeneralRe: DataGridView to Xml Pin
Anoop Brijmohun20-Jun-08 3:27
Anoop Brijmohun20-Jun-08 3:27 
QuestionSubClassing Word2007 Fluent Ribbon... Pin
S2Coder19-Jun-08 23:18
S2Coder19-Jun-08 23:18 
QuestionAdding data in a combo box from the database Pin
Aigini19-Jun-08 21:27
Aigini19-Jun-08 21:27 
AnswerRe: Adding data in a combo box from the database Pin
Christian Graus19-Jun-08 21:43
protectorChristian Graus19-Jun-08 21:43 
Questioncalling exe Pin
kadkir19-Jun-08 20:20
kadkir19-Jun-08 20:20 
AnswerRe: calling exe Pin
Christian Graus19-Jun-08 20:47
protectorChristian Graus19-Jun-08 20:47 
GeneralRe: calling exe Pin
kadkir19-Jun-08 21:55
kadkir19-Jun-08 21:55 
GeneralRe: calling exe Pin
Dave Kreskowiak20-Jun-08 13:15
mveDave Kreskowiak20-Jun-08 13:15 
GeneralRe: calling exe Pin
kadkir20-Jun-08 17:42
kadkir20-Jun-08 17:42 

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.