Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 2005 > Visual Basic 2005 Basics
|
Visual Basic 2005 Basics If you are new to Visual Basic programming with version 2005, this is the place to start your questions. For questions about the book: Beginning Visual Basic 2005 by Thearon Willis and Bryan Newsome, ISBN: 0-7645-7401-9 please, use this forum instead.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Visual Basic 2005 Basics 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 February 29th, 2008, 01:23 PM
Registered User
 
Join Date: Jul 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Buttons disappear from dialog form

I have an VB.NET 2005 application where a form is displayed in dialog format when the user clicks a hyperlink. The form consists of a textbox with two command buttons below it.

On most machines the box appears normally. However on some computers the two command buttons are missing when the form is displayed. How can I fix this so that the buttons will display on all machines?

My resize event looks like this:

        Dim x As Short = Me.Width

        btnOK.Left = x - 267
        btnOK.Top = Me.Height - 98
        btnCancel.Left = x - 173
        btnCancel.Top = Me.Height - 98

Thanks for any help.

John

 
Old February 29th, 2008, 02:56 PM
Friend of Wrox
 
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts
Default

I think some research is going to be required. If it were me, I would add code to cause the form to report the locations of the buttons into a "log" file, and so oif you can find that the buttons have a negative location. If so, you can start to ttrack it down.

Report into the "log" all metrics: Me.Height, Me.Width, btnOK.Left, btnOK.Top, btnCancel.Left & btnCancel.Top.

If you discover the problem, please come back here and tell us what it was.
 
Old March 3rd, 2008, 02:24 PM
Registered User
 
Join Date: Jul 2007
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I found that if I used the Anchor property it would solve the problem. I changed the left button to Bottom, Left and the right button to Bottom, Right.






Similar Threads
Thread Thread Starter Forum Replies Last Post
3 buttons in an access dialog box anukagni Access 3 September 5th, 2007 06:41 AM
Form buttons Lofa Beginning PHP 1 March 12th, 2007 06:39 AM
Radio buttons disappear JoeBob49 ASP.NET 2.0 Basics 2 November 27th, 2006 09:57 AM
Many Buttons on 1 form Mitch HTML Code Clinic 9 October 25th, 2003 12:08 PM





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