Click here to Skip to main content
16,017,304 members
Home / Discussions / C#
   

C#

 
GeneralRe: Need Help With Syntax Pin
Kevin Marois23-Nov-19 10:40
professionalKevin Marois23-Nov-19 10:40 
GeneralRe: Need Help With Syntax Pin
Kevin Marois23-Nov-19 10:58
professionalKevin Marois23-Nov-19 10:58 
GeneralRe: Need Help With Syntax Pin
phil.o23-Nov-19 11:29
professionalphil.o23-Nov-19 11:29 
RantRe: Need Help With Syntax Pin
Kevin Marois23-Nov-19 12:26
professionalKevin Marois23-Nov-19 12:26 
GeneralRe: Need Help With Syntax Pin
phil.o23-Nov-19 12:45
professionalphil.o23-Nov-19 12: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 1:14
Member 443266022-Nov-19 1: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 1:31
mveOriginalGriff22-Nov-19 1: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 3:07
Member 443266023-Nov-19 3: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 4:00
mveOriginalGriff23-Nov-19 4: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 19:16
Member 443266023-Nov-19 19:16 
QuestionDifferences of 3 libraries in voice programming ? Pin
Member 245846721-Nov-19 15:55
Member 245846721-Nov-19 15:55 
AnswerRe: Differences of 3 libraries in voice programming ? Pin
Richard MacCutchan21-Nov-19 21:33
mveRichard MacCutchan21-Nov-19 21:33 
GeneralRe: Differences of 3 libraries in voice programming ? Pin
OriginalGriff21-Nov-19 22:51
mveOriginalGriff21-Nov-19 22:51 
GeneralRe: Differences of 3 libraries in voice programming ? Pin
Richard MacCutchan21-Nov-19 23:05
mveRichard MacCutchan21-Nov-19 23:05 
GeneralRe: Differences of 3 libraries in voice programming ? Pin
phil.o22-Nov-19 7:03
professionalphil.o22-Nov-19 7:03 
GeneralRe: Differences of 3 libraries in voice programming ? Pin
Member 245846724-Nov-19 14:25
Member 245846724-Nov-19 14:25 
GeneralRe: Differences of 3 libraries in voice programming ? Pin
Richard MacCutchan24-Nov-19 22:11
mveRichard MacCutchan24-Nov-19 22:11 
GeneralRe: Differences of 3 libraries in voice programming ? Pin
Super Lloyd24-Nov-19 18:21
Super Lloyd24-Nov-19 18:21 
GeneralRe: Differences of 3 libraries in voice programming ? Pin
Richard MacCutchan24-Nov-19 22:07
mveRichard MacCutchan24-Nov-19 22:07 
GeneralRe: Differences of 3 libraries in voice programming ? Pin
Super Lloyd25-Nov-19 11:52
Super Lloyd25-Nov-19 11:52 
GeneralRe: Differences of 3 libraries in voice programming ? Pin
Member 245846728-Nov-19 19:25
Member 245846728-Nov-19 19:25 
QuestionHow to delete a file during build/execute in C# Pin
Member 1466381121-Nov-19 5:24
Member 1466381121-Nov-19 5:24 
AnswerRe: How to delete a file during build/execute in C# Pin
OriginalGriff21-Nov-19 6:00
mveOriginalGriff21-Nov-19 6:00 
Question[Solved] Drag and Drop a folder to a textBox within a User Control Pin
W3453121-Nov-19 2:45
W3453121-Nov-19 2:45 
AnswerRe: Drag and Drop a folder to a textBox within a User Control Pin
Dave Kreskowiak21-Nov-19 4:52
mveDave Kreskowiak21-Nov-19 4: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.