CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Apr 2010
    Posts
    5

    Unhappy Deevelopment Issues

    I am working with VB 6.0 and am somewhat new to the developing and distributing side. I packaged and installed a project with the deployment wizard. I have two issues with the results, one is the forms are not centered on the screen, and the other is the color of the background (white) came out black after installation.
    Thank you for your time...

  2. #2
    Join Date
    Jul 2006
    Location
    Germany
    Posts
    3,725

    Re: Deevelopment Issues

    The monitor of your developement system seemed to have a different size as the target system's screen.
    To avoid misplacement, you should take care of centering your form yourself.
    You could put a little code in your Form_Load() event like:
    Code:
    Private Sub Form_Load()
      Me.Move (Screen.Width - Me.Width) / 2, (Screen.Height - Me.Height) / 2
    End Sub
    This window will always appear in the center of the screen no matter how big.
    As for the BackColor: look if the BackColor property is set to a system color. If so, explicitly select your BackColor from the pallette to be white.
    A system color is defined in the windows settings and may vary from system to system.
    You can also set the BackColor property during Form_Load() like
    [code]
    Me.BackColor = vbWhite
    [/color]
    but selecting from the pallete when changing the BackColor in the property list should do it.

  3. #3
    Join Date
    Jan 2000
    Location
    Saskatchewan, Canada
    Posts
    595

    Re: Deevelopment Issues

    You can also set the form startupposition property to center screen.

  4. #4
    Join Date
    Apr 2010
    Posts
    5

    Smile Re: Deevelopment Issues

    Thank you .........

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured