Wrox Programmer Forums
|
VB Components Issues specific to components in VB.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB Components section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 26th, 2004, 11:34 AM
Registered User
 
Join Date: Nov 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default VB as per screen resolution

Friends i have a problem in VB6

    say if i design a software with a screen resolution of 800 X 600
and pack it for installation, but if i install it in a computer with screen resolution of 1024 X 768, the i have a problem. the position of the components doesn't adjust itself , but moves towards the north-western side,

how should i do it either with the code or with the attributes.

thanks in advance,

Arvind
 
Old December 10th, 2004, 07:13 AM
Authorized User
 
Join Date: Dec 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to sush_blr
Default

Quote:
quote:Originally posted by arvivair
 Friends i have a problem in VB6

    say if i design a software with a screen resolution of 800 X 600
and pack it for installation, but if i install it in a computer with screen resolution of 1024 X 768, the i have a problem. the position of the components doesn't adjust itself , but moves towards the north-western side,

how should i do it either with the code or with the attributes.

thanks in advance,

Arvind


Aravind

paste this function in bas module ..


Public Sub CenterForm(ByRef frm As Form)

    Dim lTop As Long
    Dim lLeft As Long

    lTop = ((Screen.Height - frm.Height) / 2)
    If (lTop < 0) Then
        lTop = 0
    End If
    lLeft = ((Screen.Width - frm.Width) / 2)
    If (lLeft < 0) Then
        lLeft = 0
    End If

    frm.Move lLeft, lTop

End Sub


and call this function in all ur form_load events


Private Sub Form_Load()
   CenterForm Me
   .
   .
   .
   .
end sub


try dis

Regards
Sush


 
Old February 20th, 2005, 02:52 AM
Registered User
 
Join Date: Feb 2005
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

How can we do this on VB.net ?


Thanks and Regards
Manish Kaushik





Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing screen resolution snufse ASP.NET 2.0 Basics 0 January 22nd, 2008 10:08 AM
Screen Resolution ajeesh_online C# 1 June 14th, 2006 12:37 AM
screen resolution Adam H-W Classic ASP Basics 3 October 13th, 2004 09:13 PM
screen resolution miguel.ossa C# 2 October 9th, 2004 11:58 PM
screen resolution mistry_bhavin Pro VB.NET 2002/2003 0 March 13th, 2004 02:36 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.