Home All Groups Group Topic Archive Search About

Big problem with a selfmade dialog

Author
17 Jun 2009 8:24 AM
Thorsten Schröer
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

Author
17 Jun 2009 9:50 AM
James Hahn
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