473,385 Members | 1,944 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

please help me.textbox do not work well

i have a main form and i want to ada a childform,so i do it with the way
such as me.controls.add
code :
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
If IsNothing(lead) Then
lead = New lead
lead.TopLevel = False
Me.Controls.Add(lead)
lead.Top = (Me.Height - lead.Height) / 2
lead.Left = (Me.Width - lead.Width) / 2
lead.Show()
Else
If lead.IsDisposed Then
lead = New lead
lead.TopLevel = False
Me.Controls.Add(lead)
lead.Top = (Me.Height - lead.Height) / 2
lead.Left = (Me.Width - lead.Width) / 2
lead.Show()
Else
lead.Activate()
lead.WindowState = FormWindowState.Normal
End If
End If
End Sub

but someting happen when i open childform,i can't edit the content of
textbox as well as usually.you copy the code to do ,you will find the
problem. can someboxy help me ? why this happen and how to solute?

Nov 20 '05 #1
2 1005
I think we will have to see the code for the lead class.
By the way. I never use simple names like "lead" for things. Although you
may be OK here, It is too easy to conflict with reserved keywords.

"lemonvital" <le********@hotmail.com> wrote in message
news:ee**************@TK2MSFTNGP09.phx.gbl...
i have a main form and i want to ada a childform,so i do it with the way
such as me.controls.add
code :
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
If IsNothing(lead) Then
lead = New lead
lead.TopLevel = False
Me.Controls.Add(lead)
lead.Top = (Me.Height - lead.Height) / 2
lead.Left = (Me.Width - lead.Width) / 2
lead.Show()
Else
If lead.IsDisposed Then
lead = New lead
lead.TopLevel = False
Me.Controls.Add(lead)
lead.Top = (Me.Height - lead.Height) / 2
lead.Left = (Me.Width - lead.Width) / 2
lead.Show()
Else
lead.Activate()
lead.WindowState = FormWindowState.Normal
End If
End If
End Sub

but someting happen when i open childform,i can't edit the content of
textbox as well as usually.you copy the code to do ,you will find the
problem. can someboxy help me ? why this happen and how to solute?

Nov 20 '05 #2
help.....
"lemonvital" <le********@hotmail.com> дÈëÓʼþ
news:ug**************@TK2MSFTNGP09.phx.gbl...
thank for you suggestion.i have modified that.you can run the application
and you will find the textbox does't work well.

"Jerry" <Je*********@Yahoo.com> дÈëÓʼþ
news:uX**************@TK2MSFTNGP11.phx.gbl...
I think we will have to see the code for the lead class.
By the way. I never use simple names like "lead" for things. Although

you
may be OK here, It is too easy to conflict with reserved keywords.

"lemonvital" <le********@hotmail.com> wrote in message
news:ee**************@TK2MSFTNGP09.phx.gbl...
i have a main form and i want to ada a childform,so i do it with the way such as me.controls.add
code :
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
If IsNothing(lead) Then
lead = New lead
lead.TopLevel = False
Me.Controls.Add(lead)
lead.Top = (Me.Height - lead.Height) / 2
lead.Left = (Me.Width - lead.Width) / 2
lead.Show()
Else
If lead.IsDisposed Then
lead = New lead
lead.TopLevel = False
Me.Controls.Add(lead)
lead.Top = (Me.Height - lead.Height) / 2
lead.Left = (Me.Width - lead.Width) / 2
lead.Show()
Else
lead.Activate()
lead.WindowState = FormWindowState.Normal
End If
End If
End Sub

but someting happen when i open childform,i can't edit the content of
textbox as well as usually.you copy the code to do ,you will find the
problem. can someboxy help me ? why this happen and how to solute?



Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Mad Scientist Jr | last post by:
I have a textbox that i am adding to (in codebehind of ASP.NET) and need to ensure that the focus is scrolled to the bottom of the textbox each time the page refreshes, and then set focus to a 2nd...
23
by: Jason | last post by:
Hi, I was wondering if any could point me to an example or give me ideas on how to dynamically create a form based on a database table? So, I would have a table designed to tell my application...
28
by: kfrost | last post by:
I know this is probably simple but I have a C# form and the class for the form is called sbaSynch. I have a textbox name txtServerName. I'm creating a class to manipulate XML functions so I...
2
by: Simon Harvey | last post by:
Hi everyone, I'm having a problem with getting a control that I'm using to work. I have a placeholder control sitting within a user control. On certain occasions at runtime I create a...
8
by: tshad | last post by:
I cannot seem to get the asp:textbox to use classes. Style works fine. I am trying to set the textbox to act like a label in some instance so it doesn't have a border, readonly and the background...
2
by: I am Sam | last post by:
Ok I set up a button column to delete an individual record. Nothing happens when I test it. Someone please help understand why. Below is the associated coding: DataGrid control: ...
4
by: NH | last post by:
Hi, I just cannot get this to work. I want to make a cell editable in a datagrid only if the value of another cell is something specific. I am able to capture the value of the other cell via the...
10
by: Miro | last post by:
I wanted certain text boxes ( only certain ones ) to always be Trim'd so that spaces are not in the begining, nor the end of the text entered. I created my own "Handle ?" - i hope thats the...
2
by: =?Utf-8?B?Q2hyaXM=?= | last post by:
Hi, I am trying to check a value of a contril in my gridview but this %$%&^^&* thing is driving me nuts. I tried Dim t As TextBox = CType(e.Row.Cells(16).FindControl("Status"), TextBox) If...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.