Big problem with a selfmade dialog

  • Thread starter Thorsten Schröer
  • Start date
T

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
 
J

James Hahn

You declaration of the variable KWAuswahl ashould be:
Private KWAuswahl As frmKW

What is the definition of txtKW and cboJahrand within frmKW?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top