For Programmers: Free Programming Magazines  


Home > Archive > Visual Basic > December 2005 > IDE & EXE Not Matching?









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author IDE & EXE Not Matching?
Arpan

2005-12-13, 9:55 pm

I have a VB6 Form which opens for 2 seconds just before the actual
application launches. The start-up Form has only a Timer control, named
tmrIntro, & nothing else. The Picture property of this Form is assigned
an image (note that there aren't any PictureBox or Image controls in
the Form). The image covers the entire area of the Form. The
BorderStyle of this start-up Form is set to 0 - None. This is the
entire code in the start-up Form:

Option Explicit
Private Sub tmrIntro_Timer()
tmrIntro.Enabled = False
Unload Me
frmMain.Visible = True
End Sub

When I run the application from the IDE, this start-up Form positions
itself exactly as it has been positioned during the design time i.e.
Left=3735, Top=2730, Width=5250 & Height=3300 but when I compile this
application & then run the EXE, I find that the start-up Form takes up
the entire screen space (full-window) i.e. Left=0, Top=0,
Width=Screen.Width & Height=Screen.Height though the width & height of
the Form has been set to 5250 & 3300 respectively. Also when the EXE is
run, the part of the Form which doesn't include the image (though in
the design time, the image covers the entire Form) remains white in
color (or whatever the BackColor has been set to).

Now I just can't figure out why is this happening! The start-up Form
works fine when it is run from the IDE but not when it is compiled into
an EXE & then executed. Why?

Thanks,

Arpan

Randy Birch

2005-12-13, 9:55 pm

Try sizing the form as required, and add a Move command in the load event of
the form, i.e.

Me.Move (Screen.Width - Me.Width) \ 2, (Screen.Height - Me.Height) \ 2
timer1.interval = 2000
timer1.enabled = true

Also ensure you have not set the startupposition property to other than 0 --
that property is for real VB rookies.


--

Randy Birch
MS MVP Visual Basic
http://vbnet.mvps.org/
----------------------------------------------------------------------------
Read. Decide. Sign the petition to Microsoft.
http://classicvb.org/petition/
----------------------------------------------------------------------------



"Arpan" <arpan_de@hotmail.com> wrote in message
news:1134525322.474969.130970@g49g2000cwa.googlegroups.com...
:I have a VB6 Form which opens for 2 seconds just before the actual
: application launches. The start-up Form has only a Timer control, named
: tmrIntro, & nothing else. The Picture property of this Form is assigned
: an image (note that there aren't any PictureBox or Image controls in
: the Form). The image covers the entire area of the Form. The
: BorderStyle of this start-up Form is set to 0 - None. This is the
: entire code in the start-up Form:
:
: Option Explicit
: Private Sub tmrIntro_Timer()
: tmrIntro.Enabled = False
: Unload Me
: frmMain.Visible = True
: End Sub
:
: When I run the application from the IDE, this start-up Form positions
: itself exactly as it has been positioned during the design time i.e.
: Left=3735, Top=2730, Width=5250 & Height=3300 but when I compile this
: application & then run the EXE, I find that the start-up Form takes up
: the entire screen space (full-window) i.e. Left=0, Top=0,
: Width=Screen.Width & Height=Screen.Height though the width & height of
: the Form has been set to 5250 & 3300 respectively. Also when the EXE is
: run, the part of the Form which doesn't include the image (though in
: the design time, the image covers the entire Form) remains white in
: color (or whatever the BackColor has been set to).
:
: Now I just can't figure out why is this happening! The start-up Form
: works fine when it is run from the IDE but not when it is compiled into
: an EXE & then executed. Why?
:
: Thanks,
:
: Arpan
:

Jeff Johnson [MVP: VB]

2005-12-14, 6:57 pm


"Randy Birch" <rgb_removethis@mvps.org> wrote in message
news:OH%23E0lFAGHA.504@TK2MSFTNGP12.phx.gbl...

> Also ensure you have not set the startupposition property to other than
> 0 --
> that property is for real VB rookies.


Feh. I use Center Screen all the time, especially for dialog boxes.


Bob Butler

2005-12-14, 6:57 pm

"Randy Birch" <rgb_removethis@mvps.org> wrote in message
news:OH%23E0lFAGHA.504@TK2MSFTNGP12.phx.gbl
> Also ensure you have not set the startupposition property to other
> than 0 -- that property is for real VB rookies.


or people who don't use SDI for development <g>

--
Reply to the group so all can participate
VB.Net: "Fool me once..."

Randy Birch

2005-12-15, 6:55 pm

Rookie. <vbg>

--

Randy Birch
MS MVP Visual Basic
http://vbnet.mvps.org/
----------------------------------------------------------------------------
Read. Decide. Sign the petition to Microsoft.
http://classicvb.org/petition/
----------------------------------------------------------------------------



"Jeff Johnson [MVP: VB]" <i.get@enough.spam> wrote in message
news:O4qjobMAGHA.2560@TK2MSFTNGP12.phx.gbl...
:
: "Randy Birch" <rgb_removethis@mvps.org> wrote in message
: news:OH%23E0lFAGHA.504@TK2MSFTNGP12.phx.gbl...
:
: > Also ensure you have not set the startupposition property to other than
: > 0 --
: > that property is for real VB rookies.
:
: Feh. I use Center Screen all the time, especially for dialog boxes.
:
:

Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com