Click here to Skip to main content
15,886,919 members
Home / Discussions / C#
   

C#

 
GeneralRe: ArrayLists & multithreading... Pin
leppie15-Jun-03 6:44
leppie15-Jun-03 6:44 
GeneralRe: ArrayLists & multithreading... Pin
Arjan Einbu15-Jun-03 11:46
Arjan Einbu15-Jun-03 11:46 
GeneralRe: ArrayLists & multithreading... Pin
viperxp15-Jun-03 23:24
viperxp15-Jun-03 23:24 
GeneralRe: ArrayLists & multithreading... Pin
James T. Johnson16-Jun-03 0:10
James T. Johnson16-Jun-03 0:10 
GeneralRe: ArrayLists & multithreading... Pin
viperxp16-Jun-03 2:53
viperxp16-Jun-03 2:53 
GeneralRe: ArrayLists & multithreading... Pin
James T. Johnson16-Jun-03 3:13
James T. Johnson16-Jun-03 3:13 
GeneralRe: ArrayLists & multithreading... Pin
viperxp16-Jun-03 7:10
viperxp16-Jun-03 7:10 
QuestionSimple inheritance? Pin
mcgahanfl15-Jun-03 2:27
mcgahanfl15-Jun-03 2:27 
By default all forms are inherited from System.Windows.Forms.Form. The wizard generates code like this:
public class Form1 : System.Windows.Forms.Form

That is nice, but I would like to interject a class with common behaviors for all my forms. Like this;

class BaseForms : System.Windows.Forms.Form
and then inherit from there like so;
public class Form1 : System.Windows.Forms.Form

The problem is I get the message below and I am not sure why.

C:\NET_Phil\FormsInherit\Form1.cs(21): Inconsistent accessibility: base class 'FormsInherit.BaseForms' is less accessible than class 'FormsInherit.Form1'

All the wizard generated source is below. I have only modified the lines discussed.

Thanks for your time.Cool | :cool:

using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using System.Windows.Forms;
using System.Data;

namespace FormsInherit
{
class BaseForms : System.Windows.Forms.Form
{
public BaseForms()
{
Console.WriteLine("BaseForms");
}
public int iValueAll;
}
///
/// Summary description for Form1.
///

public class Form1 : BaseForms
{
///
/// Required designer variable.
///

private System.ComponentModel.Container components = null;

public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();

//
// TODO: Add any constructor code after InitializeComponent call
//
}

///
/// Clean up any resources being used.
///

protected override void Dispose( bool disposing )
{
if( disposing )
{
if (components != null)
{
components.Dispose();
}
}
base.Dispose( disposing );
}

#region Windows Form Designer generated code
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///

private void InitializeComponent()
{
//
// Form1
//
this.AutoScaleBaseSize = new System.Drawing.Size(5, 13);
this.ClientSize = new System.Drawing.Size(292, 273);
this.Name = "Form1";
this.Text = "Form1";
this.Load += new System.EventHandler(this.Form1_Load);

}
#endregion

///
/// The main entry point for the application.
///

[STAThread]
static void Main()
{
Application.Run(new Form1());
}

private void Form1_Load(object sender, System.EventArgs e)
{

}
}
}
AnswerRe: Simple inheritance? Pin
leppie15-Jun-03 3:54
leppie15-Jun-03 3:54 
GeneralRe: Simple inheritance? Pin
mcgahanfl15-Jun-03 17:14
mcgahanfl15-Jun-03 17:14 
GeneralWeb service performance... Pin
Matt Gullett15-Jun-03 2:25
Matt Gullett15-Jun-03 2:25 
GeneralRe: Web service performance... Pin
Kannan Kalyanaraman15-Jun-03 3:41
Kannan Kalyanaraman15-Jun-03 3:41 
GeneralRe: Web service performance... Pin
Matt Gullett15-Jun-03 3:47
Matt Gullett15-Jun-03 3:47 
GeneralRe: Web service performance... Pin
Kannan Kalyanaraman15-Jun-03 17:01
Kannan Kalyanaraman15-Jun-03 17:01 
GeneralRe: Web service performance... Pin
Rocky Moore15-Jun-03 23:18
Rocky Moore15-Jun-03 23:18 
GeneralRe: Web service performance... Pin
Matt Gullett15-Jun-03 23:35
Matt Gullett15-Jun-03 23:35 
GeneralDynamic object cloneing. Pin
Peter Kiss15-Jun-03 1:07
Peter Kiss15-Jun-03 1:07 
GeneralC# Service won't start Pin
gek_at14-Jun-03 23:59
gek_at14-Jun-03 23:59 
GeneralRe: C# Service won't start Pin
mcgahanfl15-Jun-03 2:16
mcgahanfl15-Jun-03 2:16 
GeneralRe: C# Service won't start Pin
gek_at15-Jun-03 3:20
gek_at15-Jun-03 3:20 
GeneralRe: C# Service won't start Pin
mcgahanfl15-Jun-03 3:53
mcgahanfl15-Jun-03 3:53 
GeneralRe: C# Service won't start Pin
gek_at15-Jun-03 11:11
gek_at15-Jun-03 11:11 
GeneralRe: C# Service won't start Pin
gek_at16-Jun-03 7:31
gek_at16-Jun-03 7:31 
QuestionHow to connect to SQL Server running on one remote Server. Pin
Ken Zhu14-Jun-03 18:40
Ken Zhu14-Jun-03 18:40 
AnswerRe: How to connect to SQL Server running on one remote Server. Pin
Rocky Moore14-Jun-03 22:27
Rocky Moore14-Jun-03 22:27 

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.