Click here to Skip to main content
15,878,028 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to detect user email address when user clicks on a link sent to their email? Pin
OriginalGriff28-Mar-21 9:59
mveOriginalGriff28-Mar-21 9:59 
AnswerRe: How to detect user email address when user clicks on a link sent to their email? Pin
Richard Deeming28-Mar-21 22:04
mveRichard Deeming28-Mar-21 22:04 
QuestionHow to access cell information and controls of DevExpress Spreadsheet Form from another form in the same application? Pin
Alex Dunlop25-Mar-21 2:43
Alex Dunlop25-Mar-21 2:43 
AnswerRe: How to access cell information and controls of DevExpress Spreadsheet Form from another form in the same application? Pin
OriginalGriff25-Mar-21 5:03
mveOriginalGriff25-Mar-21 5:03 
GeneralRe: How to access cell information and controls of DevExpress Spreadsheet Form from another form in the same application? Pin
Gerry Schmitz25-Mar-21 7:42
mveGerry Schmitz25-Mar-21 7:42 
GeneralRe: How to access cell information and controls of DevExpress Spreadsheet Form from another form in the same application? Pin
OriginalGriff25-Mar-21 11:09
mveOriginalGriff25-Mar-21 11:09 
AnswerRe: How to access cell information and controls of DevExpress Spreadsheet Form from another form in the same application? Pin
Gerry Schmitz25-Mar-21 7:40
mveGerry Schmitz25-Mar-21 7:40 
QuestionChecking for existing open forms Pin
Alex Dunlop24-Mar-21 23:26
Alex Dunlop24-Mar-21 23:26 
Hi,
I want to check for existing open forms and if the desired form was not open, open it.
The problem is that my code gives runtime error:
C#
System.InvalidOperationException: 'Collection was modified; enumeration operation may not execute.'

this error occurs in this part of the code:
C#
foreach (Form frm in fc)

How can I fix this?
my code:
C#
FormCollection fc = Application.OpenForms;
            foreach (Form frm in fc)
            {
                if (frm.Name == "Chart")
                {
                    MessageBox.Show("The form is open","error",MessageBoxButtons.OK,MessageBoxIcon.Error);
                }
                else
                {
                    Chart myCharts = new Chart();
                    myCharts.Show();
                }
            }


modified 25-Mar-21 5:35am.

AnswerRe: Checking for existing open forms Pin
OriginalGriff24-Mar-21 23:38
mveOriginalGriff24-Mar-21 23:38 
GeneralRe: Checking for existing open forms Pin
Alex Dunlop25-Mar-21 0:08
Alex Dunlop25-Mar-21 0:08 
GeneralRe: Checking for existing open forms Pin
OriginalGriff25-Mar-21 0:37
mveOriginalGriff25-Mar-21 0:37 
AnswerRe: Checking for existing open forms Pin
Richard Deeming25-Mar-21 2:51
mveRichard Deeming25-Mar-21 2:51 
QuestionCopy a selected gridview row to the same gridview Pin
Member 1493285423-Mar-21 2:41
Member 1493285423-Mar-21 2:41 
AnswerRe: Copy a selected gridview row to the same gridview Pin
Gerry Schmitz23-Mar-21 7:08
mveGerry Schmitz23-Mar-21 7:08 
GeneralRe: Copy a selected gridview row to the same gridview Pin
Nathan Minier24-Mar-21 1:20
professionalNathan Minier24-Mar-21 1:20 
GeneralRe: Copy a selected gridview row to the same gridview Pin
jsc4224-Mar-21 1:25
professionaljsc4224-Mar-21 1:25 
GeneralRe: Copy a selected gridview row to the same gridview Pin
Nathan Minier24-Mar-21 1:38
professionalNathan Minier24-Mar-21 1:38 
GeneralRe: Copy a selected gridview row to the same gridview Pin
jsc4225-Mar-21 3:54
professionaljsc4225-Mar-21 3:54 
QuestionHow to able to have the information of the particular image button clicked? Pin
Member 1508474922-Mar-21 10:50
Member 1508474922-Mar-21 10:50 
AnswerRe: How to able to have the information of the particular image button clicked? Pin
OriginalGriff22-Mar-21 11:18
mveOriginalGriff22-Mar-21 11:18 
GeneralRe: How to able to have the information of the particular image button clicked? Pin
Richard Deeming22-Mar-21 22:25
mveRichard Deeming22-Mar-21 22:25 
AnswerRe: How to able to have the information of the particular image button clicked? Pin
Richard Deeming22-Mar-21 22:33
mveRichard Deeming22-Mar-21 22:33 
AnswerRe: How to able to have the information of the particular image button clicked? Pin
DerekT-P23-Mar-21 0:46
professionalDerekT-P23-Mar-21 0:46 
QuestionC# Excel test specific cells in a column Pin
Steve Rudd22-Mar-21 5:59
Steve Rudd22-Mar-21 5:59 
AnswerRe: C# Excel test specific cells in a column Pin
Gerry Schmitz22-Mar-21 7:40
mveGerry Schmitz22-Mar-21 7:40 

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.