hi, i have a problem with running my program. when i trace my codes, the program is able to run according to what i planned. but when i run without tracing, the program will skip 2 lines of codes. can anyone advise on what i can do thanx.
hi, i have a problem with running my program. when i trace my codes, the program is able to run according to what i planned. but when i run without tracing, the program will skip 2 lines of codes. can anyone advise on what i can do thanx.
program running problem
Bryan Kelly
Hi,
If you could be more specific, we can help you with the problems.
Thank you
sally_de
hi,
it works. thanx for your help. =;o)
wunda
Regards.
Pavan Apuroop
pbjorge12
Hi,
Try to use button1.PerformClick();
Thanks
MickJ27
hi, i've solved the problem by replacing the problematic line(method) by adding the contents of the methods into the codes. i believe the problem is due to another class declared in the method that clashes with the class declared in my codes. i have another problem which i need advise on, how can i trigger an event manually from a method. i have to trigger a button click event which consist of my "save file" codes. i understand that i can't simply call the event, like btnSave_Click() due to the parameters. can anyone help me with this thanx
Mitch Walker - MSFT
below is my codes, my codes is to include check items in a checkedListBox and give it a name, then save it. the saved name will be displayed in a list in comboBox. the problems lies with the 2 lines whereby after saving the name, it should be selected and displayed in the comboBox, but it did not refresh the name list nor select the name.
if
(comboBox1.Text.Equals("New")){
name = txtName.Text;
if(name == "Enter Name")
{
MessageBox.Show("Please enter name.","Save",MessageBoxButtons.OK);
return;
}
else
{
Algorithm saveNewName =
new Algorithm(name); //checking for duplicate namesNameList = saveNewName.GetName(
ref userNum); for(int i=0; i<userNum; i++){
if(NameList{
MessageBox.Show("Name exists, please enter another name","Save Error",MessageBoxButtons.OK);
return;}
elsesaveNewName.SetName(name);
}
ID = saveNewName.AddNew();
for(int i=0; i<newNameList.Length; i++){
//find algoID then addalgoID = saveNewName.FindID(newNameList
);
saveNewName.Add(ID, algoID);
}
getAlgo(); // line skipped, suppose to refresh the comboBox to update the new entry
comboBox1.SelectedItem = name; // line skipped, suppose to show the selected name at the comboBox.
txtName.Visible =
false;txtName.Text = "Enter Name";
}
}