Results 1 to 14 of 14

Thread: Control Move Error *Resolved*

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2002
    Posts
    424

    Control Move Error *Resolved*

    When I resize my form and move the control to the bottom right of the new window I get an error trying to set the control top to anything more than 4500 twips. It says the top value is too large. I have a text box that expands to the whole size of the window and it works fine unless I try to move the top value pass 4500 twips. Is this a general problem? How do I get a control to the bottom right corner of the screen if I can't set the top of the control. The left of the control works fine. I just can't get it any lower than 4500 twips.

    Help!
    Last edited by Ephesians; Sep 20th, 2002 at 01:19 PM.

  2. #2
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687
    Can you show us how you are doing it? I assume you are using .Move method?
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629
    On error resume next
    -= a peet post =-

  4. #4

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2002
    Posts
    424
    how does on error resume next help me if it doesn't move the control?

    anyway I'm using VBA so there is no move method but here's what I'm using. The control I'm using is a box control.
    VB Code:
    1. If Me.WindowHeight <= 5500 Then
    2. Box3.Top = Me.WindowHeight - Box3.Height
    3. Else
    4. Box3.Top = 5000
    5. End If
    6. Box3.Left = Me.WindowWidth - Box3.Width - 10

  5. #5
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687
    What is the error?
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2002
    Posts
    424
    Damnit Peet! Why does that work?! Just ignore the error and and the control will go where I want it to?! What kind of programming logic is that?!!!!

  7. #7
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687
    Originally posted by Ephesians
    Damnit Peet! Why does that work?! Just ignore the error and and the control will go where I want it to?! What kind of programming logic is that?!!!!
    Fear not Ephesians -- On Error Resume NExt is Peet's answer to every thing. The world could end tomorrow, and he'll just Resume NExt....
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  8. #8
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    Originally posted by Ephesians
    What kind of programming logic is that?!!!!
    Programming logic that helps you meet deadlines.

  9. #9
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687
    Originally posted by Hack
    Programming logic that helps you meet deadlines.
    But is still doesn't solve the problem. The problem isn't so much the error as the FACT THAT THE CONTROL STILL WILL NOT MOVE!
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  10. #10
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629
    Originally posted by techgnome
    Fear not Ephesians -- On Error Resume NExt is Peet's answer to every thing. The world could end tomorrow, and he'll just Resume NExt....
    LOL

    In resize events I normally use Resume Next. Are you saying
    someone is not using resume next when doing resize code ??
    -= a peet post =-

  11. #11
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687
    I don't.... but then I have the luxury of using the Video Soft Elastic control, so I don't need to worry about it. But.... Ususaly when I've encountered this kind of problem, it's when the user hits the minimize button, in which case I check the WindowState first, and skip everything if I'm minimizing.
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  12. #12
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629
    Originally posted by techgnome
    I don't.... but then I have the luxury of using the Video Soft Elastic control, so I don't need to worry about it. But.... Ususaly when I've encountered this kind of problem, it's when the user hits the minimize button, in which case I check the WindowState first, and skip everything if I'm minimizing.
    Thats a good boy Do not use On Error Resume Next like the
    bad man told you to .. did I say bad ?... i meant mad *hydrhydr*
    -= a peet post =-

  13. #13
    -= B u g S l a y e r =- peet's Avatar
    Join Date
    Aug 2000
    Posts
    9,629
    just for the record... I totally agree with you techgnome, proper errorhandling is a must
    -= a peet post =-

  14. #14

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2002
    Posts
    424
    The funny thing is.. the control will actually move to where I've dragged it if I ignore the error...

    Damned if I know why..

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