|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Big problem with a selfmade dialogSorry für my bad english! I have a big problem. In my selfwrite class I have to show a dialog for entering some dates to continue with my program. This dialog I called so: My selfwrited class class clsVerarbeitung .... Private Dim KWAuswahl As Form Private Dim KW As Integer Private Dim Jahr as Integer .... Public Sub DatumInit() KWAuswahl = New frmKW() If KWAuswahl.ShowDialog() = DialogResult.OK Then KW = Convert.ToInt16(KWAuswahl.txtKW.Text) Jahr = Convert.ToInt16(KWAuswahl.cboJahr.SelectedValue) End IF End Sub But I get a Compileerror: txtKW is not a Menber from System.Windows.Forms.Form. (BC30456) cbjJahr is not a Menber from System.Windows.Forms.Form. (BC30456) How can I correct this and what is wrong??????? Your Help is emergency for me. PLEASE HELP Greetings Thorsten Schroeer You declaration of the variable KWAuswahl ashould be:
Private KWAuswahl As frmKW What is the definition of txtKW and cboJahrand within frmKW? Show quoteHide quote "Thorsten Schröer" <ThorstenSch***@discussions.microsoft.com> wrote in message news:D5FFD87A-ABB9-48EE-8E35-1433A1995D84@microsoft.com... > Hi all! > > Sorry für my bad english! > > I have a big problem. In my selfwrite class I have to show a dialog for > entering some dates to continue with my program. This dialog I called so: > > My selfwrited class > class clsVerarbeitung > ... > Private Dim KWAuswahl As Form > Private Dim KW As Integer > Private Dim Jahr as Integer > ... > Public Sub DatumInit() > KWAuswahl = New frmKW() > If KWAuswahl.ShowDialog() = DialogResult.OK Then > KW = Convert.ToInt16(KWAuswahl.txtKW.Text) > Jahr = Convert.ToInt16(KWAuswahl.cboJahr.SelectedValue) > End IF > End Sub > > > But I get a Compileerror: > > txtKW is not a Menber from System.Windows.Forms.Form. (BC30456) > cbjJahr is not a Menber from System.Windows.Forms.Form. (BC30456) > > How can I correct this and what is wrong??????? > > Your Help is emergency for me. PLEASE HELP > > Greetings > > Thorsten Schroeer
Visual Basic is Dead!
Blanking Monitor and Unblanking Monitor Optional localizing serialPort receive problem Frustrated, Bothered and Bewildered (Form AutoScroll Broken) Merging Bitmaps What are the Versions of Visual Studio 2005 and what Features are Available in Each? Help with SOAP3 - OT Bindingsource problem prevent control events from firing before form is loaded |
|||||||||||||||||||||||