Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
-1 votes
1 answer
198 views

How to display details from an object to a TextBox

I am making a program which will test if an airplane is allowed to fly or not. It's my very first personal project using Windows Form and C#. I made a lot of progress, however, I am having a huge ...
Miguel G.'s user avatar
0 votes
0 answers
50 views

Access a form's methods from other forms

I have a main form, called frmContainer. with two panels, a pnlTitle (holding the title) and a pnlMain. Multiple other forms get loaded into pnlMain. frmContainer.cs has multiple methods which load ...
Tye's user avatar
  • 1
0 votes
1 answer
79 views

Need to use an ArrayList to store objects, assignment requires I use an ArrayList, struggling to call the methods of the object from the ArrayList

I have no idea how to describe my issue in the right terms, sorry. My assignment is pretty simple, but I am having a tough time with an ArrayList in c#. If I had an array of objects and that object ...
user avatar
0 votes
0 answers
97 views

Object Replication C# - Windows Forms

I am pretty much a front-end developer, so Web Devolopment is my comfort zone. But when it comes to something less "browser", i get stucked. I'm starting now with c#, and trying to ...
Yandra V.'s user avatar
0 votes
0 answers
68 views

How to refer to a Label in a Panel?

I have a flowLayoutPanel that contains a lot of panels each of which contains two labels and a button. The label I need has a name starting with lbl_, other one is label. I need to change color of all ...
Zahar56's user avatar
0 votes
2 answers
140 views

C# Inheritance between classes, lists and objects

I have created a list that contains an object, that contains a list of objects. I want to retrieve the values from an inherited/child class object, that is in the parent classes list/object. Its a bit ...
Testnominiee's user avatar
0 votes
1 answer
257 views

Create elements in loop and position them, from bottom left to upper right

I'm currently working on a chess game and I ran into a problem when drawing the board: the first element is in the top-left corner and the last one is in the lower-right corner. How can I change my ...
user avatar
0 votes
1 answer
63 views

Cycle Through a Object Class and generate dynamic fields for each Value

So I have an Class Object: public class BaseFields { public List<string> incidentType { get; set; } public string owner { get; set; } public string ...
Mac's user avatar
  • 53
0 votes
0 answers
68 views

How do I solve the System.BadImageFormatException error when creating an object? [duplicate]

I'm building a student reputation management app in C#, but I get this error, I just created an object System.BadImageFormatException. file or assembly'Library(namespace), Version=1.0.0.0, Culture=...
OverNaver's user avatar
0 votes
1 answer
49 views

Is there a standard way to reference the same object between classes?

When I search this question, all of the answers I've seen only talk about handling an object within the same class but I need to handle the same data between classes. I'm building an outlook addin ...
niche97's user avatar
  • 83
-3 votes
1 answer
1k views

Properly disposing of Bitmap object

I am drawing images in a C# Winforms panel with: private void DrawPanel_Paint(object sender, PaintEventArgs e) { DrawOnPanel(e.Graphics); } The called method takes an existing image from my ...
Kazgaa's user avatar
  • 49
1 vote
1 answer
69 views

WinForms C# Adding list to class Object

public class Wholesale { public int Id { get; set; } public string WholesalerName { get; set; } public string CompanyName { get; set; } public string Email { get; set; } public ...
김승진's user avatar
0 votes
2 answers
180 views

Can I create an object in windows form1.cs so I then can use the object and the objects contents in multiple click events (C#)

Can I create an object in windows form1.cs so that I then can use it and the contents of the object in multiple click events in the windows form1.cs file? This is the code that demonstrates my ...
Patronum's user avatar
0 votes
2 answers
92 views

How to pass datagridview object to another newly created form?

I'm following this SO post to pass DataGridView to second form, so I can access cells to paint them based on values.. In Form1 I'm creating that DataGridView as below : namespace ...
Kuba Do's user avatar
  • 155
-1 votes
1 answer
51 views

Windows forms - The name "dataGridView2" doesn't exist in this context

The problem is "The name "dataGridView2" doesn't exist in this context.". It only appears at the final parts of the code. Placing the object creation outside of public void menuItem1_Click fixes the ...
SranjeOdStranice1's user avatar

15 30 50 per page
1
2 3 4 5
7