HI all,
Im having problems, on my form when I press a button which links to another pages using
VB Code:
Form_reg.hide frmnokia.show
It says sumthing about linking to a non modal form and wont do it, can someone please help, thanks
Printable View
HI all,
Im having problems, on my form when I press a button which links to another pages using
VB Code:
Form_reg.hide frmnokia.show
It says sumthing about linking to a non modal form and wont do it, can someone please help, thanks
hmm could you post your progect?
try unloading frmreg rather than hiding it
Hmmm...
Is there a modal form already showed?
For example are you doing this?
VB Code:
Private Sub Form_Load() frmMain.Show vbModal End Sub 'The code bottom of this comment is on frmMain Private Sub Command1_Click() Form1.Show 'This will generate an error because frmMain is showed modaly
there is nothing in the form load to make it modal, all thats in the form load is this
VB Code:
Private Sub Form_Load() ver = version.Text Text3.Text = VolumeSerialNumber("C:\") linecount = 1 On Error GoTo nolicence Open "Licence.txt" For Input As #1 Do While Not EOF(1) Input #1, MyChar Text5.Text = Text5.Text + MyChar + vbCrLf linecount = linecount + 1 Loop Close #1 user = GetTextBoxLine(Text5, 0) pass = GetTextBoxLine(Text5, 1) If GenKey(ver + "tejpal" + user) = GetTextBoxLine(Text5, 1) Then Frame1.Visible = False frmNokia.Caption = frmNokia.Caption + " <" + user + ">" Frame3.Visible = True Label2.Caption = "Welcome " + user Exit Sub End If Exit Sub nolicence: MsgBox "Invalid key.", vbInformation, "Invalid Username/Password" End Sub
And whats in the button is
I dont understand the problem, please helpVB Code:
Private Sub Command1_Click() Unload (Form_Reg) frmnokia.show End Sub
It doesn't matter what is in the form load as that has nowt to do with showing the form.
WoofVB Code:
Dim frmNew As frmMain Set frmNew = New frmMain 'Forms initialise event fires Load frmNew 'Forms load event fires frmNew.Show vbModal 'Activate event fires Set frmNew = nothing
whats that code?
Code to load and show a form...
Woof
VB Code:
Dim frmNew As frmMain Set frmNew = New frmMain 'Forms initialise event fires Load frmNew 'Forms load event fires frmNew.Show vbModal 'Activate event fires Set frmNew = nothing
Would frmnew become the form its on which is form_reg?