Click here to Skip to main content
15,903,388 members
Home / Discussions / C#
   

C#

 
AnswerRe: std::string version in C# - Question Pin
PIEBALDconsult24-Feb-09 3:46
mvePIEBALDconsult24-Feb-09 3:46 
AnswerRe: std::string version in C# - Question Pin
Eddy Vluggen24-Feb-09 3:57
professionalEddy Vluggen24-Feb-09 3:57 
QuestionShow Form and Disable Button How? Pin
soulidentities24-Feb-09 2:59
soulidentities24-Feb-09 2:59 
AnswerRe: Show Form and Disable Button How? Pin
musefan24-Feb-09 3:41
musefan24-Feb-09 3:41 
GeneralRe: Show Form and Disable Button How? Pin
soulidentities24-Feb-09 3:56
soulidentities24-Feb-09 3:56 
GeneralRe: Show Form and Disable Button How? Pin
musefan24-Feb-09 4:26
musefan24-Feb-09 4:26 
GeneralRe: Show Form and Disable Button How? Pin
soulidentities24-Feb-09 5:58
soulidentities24-Feb-09 5:58 
AnswerRe: Show Form and Disable Button How? Pin
DaveyM6924-Feb-09 4:43
professionalDaveyM6924-Feb-09 4:43 
I haven't dealt with an inherited form but I think this achieves what you want - adapt to suit.
using System;
using System.Windows.Forms;

public partial class BaseForm : Form
{
    public BaseForm()
    {
        InitializeComponent();
    }
    public BaseForm(bool showForm1Button)
        : this()
    {
        btnForm1.Visible = showForm1Button;
    }

    private void btnForm1_Click(object sender, EventArgs e)
    {
        BaseForm newBaseForm = new BaseForm(false);
        newBaseForm.FormClosing += new FormClosingEventHandler(newBaseForm_FormClosing);
        newBaseForm.Show();
        Hide();
    }

    void newBaseForm_FormClosing(object sender, FormClosingEventArgs e)
    {
        Close();
    }
}


Dave
BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia)

AnswerRe: Show Form and Disable Button How? Pin
Paul Kettley24-Feb-09 6:16
Paul Kettley24-Feb-09 6:16 
GeneralRe: Show Form and Disable Button How? Pin
soulidentities24-Feb-09 6:39
soulidentities24-Feb-09 6:39 
QuestionServer Crahes when the client is not reachable Pin
M. J. Jaya Chitra24-Feb-09 2:26
M. J. Jaya Chitra24-Feb-09 2:26 
AnswerRe: Server Crahes when the client is not reachable Pin
PIEBALDconsult24-Feb-09 3:52
mvePIEBALDconsult24-Feb-09 3:52 
Questionchm maker article? Pin
Seraph_summer24-Feb-09 2:08
Seraph_summer24-Feb-09 2:08 
JokeRe: chm maker article? Pin
musefan24-Feb-09 3:34
musefan24-Feb-09 3:34 
GeneralRe: chm maker article? Pin
Seraph_summer24-Feb-09 4:24
Seraph_summer24-Feb-09 4:24 
JokeRe: chm maker article? Pin
musefan24-Feb-09 4:28
musefan24-Feb-09 4:28 
Question4 IT developers Pin
shefa' isied24-Feb-09 1:49
shefa' isied24-Feb-09 1:49 
AnswerRe: 4 IT developers Pin
EliottA24-Feb-09 2:00
EliottA24-Feb-09 2:00 
AnswerRe: 4 IT developers Pin
Ennis Ray Lynch, Jr.24-Feb-09 3:22
Ennis Ray Lynch, Jr.24-Feb-09 3:22 
AnswerRe: 4 IT developers Pin
PIEBALDconsult24-Feb-09 3:53
mvePIEBALDconsult24-Feb-09 3:53 
GeneralRe: 4 IT developers Pin
Ennis Ray Lynch, Jr.24-Feb-09 4:23
Ennis Ray Lynch, Jr.24-Feb-09 4:23 
GeneralRe: 4 IT developers Pin
PIEBALDconsult24-Feb-09 15:22
mvePIEBALDconsult24-Feb-09 15:22 
GeneralRe: 4 IT developers Pin
Ennis Ray Lynch, Jr.24-Feb-09 16:04
Ennis Ray Lynch, Jr.24-Feb-09 16:04 
GeneralRe: 4 IT developers Pin
Megidolaon25-Feb-09 22:19
Megidolaon25-Feb-09 22:19 
QuestionParsing nested blocks in SQL using C# [modified] Pin
aaCog24-Feb-09 1:21
aaCog24-Feb-09 1:21 

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.