Results 1 to 2 of 2

Thread: Desperately Need Help on resizing and copying

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2000
    Posts
    4

    Question

    Hi All

    Can anyone help me with the following problems.

    1. I am desperately looking for code that checks a machines screen resolution and resizes the app accordingly. I have developed a VB app on 1024 x 768 and obviously when I install on a 800 x 600 machine it is to large for the screen.

    2. I call a MS Chart from a command button. This comes up as a seperate window. I need the code to assign to a command button on that window in order to copy the entire chart graphic to the clipboard for pasting in a Word Document.

    Can anyone help me with the above code??

    Thanks

    J

  2. #2
    Lively Member benski's Avatar
    Join Date
    Sep 1999
    Location
    UK
    Posts
    126
    1. woooaahh! Sorry that is a nasty one.
    Getting the screen size is dead easy, resizing every control and it's contents is going to be another matter- I've looked into doing the same thing myself.

    The cheap 'n' cheerful way:
    Code:
    If (Screen.Width / Screen.TwipsPerPixelX) < 1024 Or (Screen.Height / Screen.TwipsPerPixelY) < 768 Then
        Call ResizingRoutine
    End If
    The ResizingRoutine 'quick fix' must iterate through all the controls on the relevant form(s) and divide the height and width by the ratio between your screen size and 1024x768 to make each control fix on the screen, and then move the control to the appropriate place on the form (again using a similar ratio)... Then you've still got issues with the contents of controls not being the right size etc etc.

    Trust me- it will be easier to demand 1024x768 in the minimum requirements, or even switch the machine's resolution to 1024x768 for the duration of your application!


    2. Use the .EditCopy method of the chart control.

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