🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.csharpbuilder.language.csharp
Article #123

Re: Delphi to C#

#123
From: Marc Rohloff TeamB
Date: Thu, 15 Mar 2007 01:37
23 lines
1990 bytes
On Wed, 14 Mar 2007 11:47:01 +0200, Godfrey wrote:

> In Delphi, if you want to reference another form or its components you just 
> added that form name to the uses section
> in the form you are working (Delphi even added it automatically for you. Go 
> Delphi).  Then you can work that form
> or any of its components from another form.
> 
> How do I do this in C#?.  I tried making the component public but I cannot 
> seem to get it right.

Delphi does a few things automatically for you (by default):
1) Components are public by default
2) It creates a public variable
3) At startup it creates an instance of every form and assigns it to
the variable.

You can do each of these yourself in c# (Edit the main() routine) but
they are all considered to contribute to bad program design.

-- 
Marc Rohloff [TeamB]
marc -at- marc rohloff -dot- com
Technical Details
Message-ID: <muv1h1x8i1ik$.dlg@dlg.marcrohloff.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <45f7c493@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 1efe35,df620dd13815f8c0
X-Google-Attributes: gid1efe35,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Marc Rohloff [TeamB]" <"on request">
Subject: Re: Delphi to C#
Newsgroups: borland.public.csharpbuilder.language.csharp
User-Agent: 40tude_Dialog/2.0.15.1
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
References: <45f7c493@newsgroups.borland.com>
Date: Wed, 14 Mar 2007 21:37:45 -0400
Message-ID: <muv1h1x8i1ik$.dlg@dlg.marcrohloff.com>
X-Face: "huzh55Xi]!ZNni78>a*5+).`SK?<^q2MlHk-C]Z2M9T@\J5ZCB$95Ey+s"XQuhGFA[eutZ :0^AV!Q;t>gE`1-=8d;HZ6~*o1dH<X9\b$!|(}+I'!Xq)@3Op}%0ArW&nf'Qh*EwR
X-Antivirus: avast! (VPS 000723-2, 03/14/2007), Outbound message
X-Antivirus-Status: Clean
NNTP-Posting-Host: 65.31.1.121
X-Trace: newsgroups.borland.com 1173922664 65.31.1.121 (14 Mar 2007 18:37:44 -0800)
Lines: 23
X-Authenticated-User: mrohloff
Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail