Click here to Skip to main content
14,452,972 members
   

C#

 
GeneralRe: Need Help With Syntax Pin
Kevin Marois23-Nov-19 11:40
professionalKevin Marois23-Nov-19 11:40 
GeneralRe: Need Help With Syntax Pin
Kevin Marois23-Nov-19 11:58
professionalKevin Marois23-Nov-19 11:58 
GeneralRe: Need Help With Syntax Pin
phil.o23-Nov-19 12:29
mvephil.o23-Nov-19 12:29 
RantRe: Need Help With Syntax Pin
Kevin Marois23-Nov-19 13:26
professionalKevin Marois23-Nov-19 13:26 
GeneralRe: Need Help With Syntax Pin
phil.o23-Nov-19 13:45
mvephil.o23-Nov-19 13:45 
QuestionDeleting textbox created dynamically, using delete key, while there are more than 1 textbox that have been dragged and dropped on a picture box. Pin
Member 443266022-Nov-19 2:14
MemberMember 443266022-Nov-19 2:14 
AnswerRe: Deleting textbox created dynamically, using delete key, while there are more than 1 textbox that have been dragged and dropped on a picture box. Pin
OriginalGriff22-Nov-19 2:31
communityengineerOriginalGriff22-Nov-19 2:31 
GeneralRe: Deleting textbox created dynamically, using delete key, while there are more than 1 textbox that have been dragged and dropped on a picture box. Pin
Member 443266023-Nov-19 4:07
MemberMember 443266023-Nov-19 4:07 
Hi, I tried implementing your code as shown below and commented as //New experiment...
But delete doesn't have any effect.
Please look into the code and let me know if something is amiss.
Thank you.

virtTxtBox.MouseDown += (ss, ee) =>
{

if (ee.Button == MouseButtons.Left)
{

//this.textBox1.Enabled = false;
firstPoint = Control.MousePosition;
if (virtTxtBox.BorderStyle == BorderStyle.None)
{

virtTxtBox.BorderStyle = BorderStyle.FixedSingle;

}
//else
//if (virtTxtBox.BorderStyle == BorderStyle.FixedSingle)
{// virtTxtBox.MouseEnter += (ssh, eeh) =>
{
KeyDown += (o, e2) =>
{
virtTxtBox.Focus().Equals(false);
if (e2.KeyCode == Keys.Delete)
{
TextBox TxtBox = (sender as TextBox);

//if (virtTxtBox.BorderStyle == BorderStyle.FixedSingle)
{
//Determine the Index of the Button.
int index = int.Parse(TxtBox.Name.Split('_')[1]);
label1.Text = index.ToString();
//Find the TextBox using Index and remove it.
TextBox txbx = (TextBox) pictureBox1.Controls.Find("txt_" + index, true)[0];
label1.Text = txbx.Name;
pictureBox1.Controls.Remove(pictureBox1.Controls.Find("txt_" + index, true)[0]);

pictureBox1.Controls.Clear();
virtTxtBox.Dispose();

//new experiment start
if (pictureBox1.Controls.Count > 0)
{
if (pictureBox1.Controls[0] is TextBox tb)
{
label1.Text = "YES entered tb";
tb.Enabled = true;
tb.Enabled = false;
pictureBox1.Controls.Remove(tb);
}
}
//new experiment end


}
}
};
virtTxtBox.BorderStyle = BorderStyle.None;
};
}
//virtTxtBox.Enabled = false;
}
};
parthan

GeneralRe: Deleting textbox created dynamically, using delete key, while there are more than 1 textbox that have been dragged and dropped on a picture box. Pin
OriginalGriff23-Nov-19 5:00
communityengineerOriginalGriff23-Nov-19 5:00 
GeneralRe: Deleting textbox created dynamically, using delete key, while there are more than 1 textbox that have been dragged and dropped on a picture box. Pin
Member 443266023-Nov-19 20:16
MemberMember 443266023-Nov-19 20:16 
QuestionDifferences of 3 libraries in voice programming ? Pin
Member 245846721-Nov-19 16:55
MemberMember 245846721-Nov-19 16:55 
AnswerRe: Differences of 3 libraries in voice programming ? Pin
Richard MacCutchan21-Nov-19 22:33
communityengineerRichard MacCutchan21-Nov-19 22:33 
GeneralRe: Differences of 3 libraries in voice programming ? Pin
OriginalGriff21-Nov-19 23:51
communityengineerOriginalGriff21-Nov-19 23:51 
GeneralRe: Differences of 3 libraries in voice programming ? Pin
Richard MacCutchan22-Nov-19 0:05
communityengineerRichard MacCutchan22-Nov-19 0:05 
GeneralRe: Differences of 3 libraries in voice programming ? Pin
phil.o22-Nov-19 8:03
mvephil.o22-Nov-19 8:03 
GeneralRe: Differences of 3 libraries in voice programming ? Pin
Member 245846724-Nov-19 15:25
MemberMember 245846724-Nov-19 15:25 
GeneralRe: Differences of 3 libraries in voice programming ? Pin
Richard MacCutchan24-Nov-19 23:11
communityengineerRichard MacCutchan24-Nov-19 23:11 
GeneralRe: Differences of 3 libraries in voice programming ? Pin
Super Lloyd24-Nov-19 19:21
MemberSuper Lloyd24-Nov-19 19:21 
GeneralRe: Differences of 3 libraries in voice programming ? Pin
Richard MacCutchan24-Nov-19 23:07
communityengineerRichard MacCutchan24-Nov-19 23:07 
GeneralRe: Differences of 3 libraries in voice programming ? Pin
Super Lloyd25-Nov-19 12:52
MemberSuper Lloyd25-Nov-19 12:52 
GeneralRe: Differences of 3 libraries in voice programming ? Pin
Member 245846728-Nov-19 20:25
MemberMember 245846728-Nov-19 20:25 
QuestionHow to delete a file during build/execute in C# Pin
Member 1466381121-Nov-19 6:24
MemberMember 1466381121-Nov-19 6:24 
AnswerRe: How to delete a file during build/execute in C# Pin
OriginalGriff21-Nov-19 7:00
communityengineerOriginalGriff21-Nov-19 7:00 
Question[Solved] Drag and Drop a folder to a textBox within a User Control Pin
W3453121-Nov-19 3:45
MemberW3453121-Nov-19 3:45 
AnswerRe: Drag and Drop a folder to a textBox within a User Control Pin
Dave Kreskowiak21-Nov-19 5:52
mveDave Kreskowiak21-Nov-19 5:52 

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.