Forum
Please help!!
In my program I have taken login form as splash form & my starting point of program is MDI form, but when I run the program MDI form loads along with splash form as default loading.
How can I load only MDI form without default loading of splash form
Thanks in advance
Hi,
Your question is not clear.
Please share your code.
Thanks
Thanks for replying
I have set startup object MDI form not splash screen but when i run the program both MDI & Splash screen loads together
Below is the code for MDI form in loading event
Private Sub MDIForm_Load()
Me.Top = (Screen.Height \ 2) - (Me.Height \ 2)
Me.Left = (Screen.Width \ 2) - (Me.Width \ 2)
If frmSplash.Visible = True Then
FRMMAIN.Vis.Enabled = False
FRMMAIN.Rep.Enabled = False
FRMMAIN.Master.Enabled = False
Else
FRMMAIN.Vis.Enabled = True
FRMMAIN.Rep.Enabled = True
FRMMAIN.Master.Enabled = True
End If
End Sub
Below is the code in splash screen which is my login form
Private Sub Form_Load()
Me.Top = (Screen.Height \ 2) - (Me.Height \ 2)
Me.Left = (Screen.Width \ 2) - (Me.Width \ 2)
OpenConnection
'Picture2.Visible = False
Set rs = New ADODB.Recordset
rs.Open "select * from user_master", cn, adOpenDynamic, adLockOptimistic
While Not rs.EOF
Combo1.AddItem rs("username")
rs.MoveNext
Wend
End Sub
Thanks & Regards
Hi everyone!!!
M debugged my above coding & found that if I close the if block in MDI form then the result is only MDI form loading
Hence Solved
Thanks
Did you solve the issue ?
Yes sir
I commented the below lines in (If Block) & now the result is what i want
Private Sub MDIForm_Load()
Me.Top = (Screen.Height \ 2) - (Me.Height \ 2)
Me.Left = (Screen.Width \ 2) - (Me.Width \ 2)
'If frmSplash.Visible = True Then
FRMMAIN.Vis.Enabled = False
FRMMAIN.Rep.Enabled = False
FRMMAIN.Master.Enabled = False
'Else
' FRMMAIN.Vis.Enabled = True
' FRMMAIN.Rep.Enabled = True
' FRMMAIN.Master.Enabled = True
'End If
End Sub
Any other suggestions are welcome
Thanks & Regards