making app proportional to client screen 
Author Message
 making app proportional to client screen

I have distributed a vb app on multiple computers and of
course, the size and appearance of the app varies from
computer to computer.

However, I am wonder if it is possible to ensure that an
app is proportional to a client's screen, no matter what
the display settings are of a computer. That is, ensure
that the forms and controls don't appear abnormal.

jim



Tue, 29 Mar 2005 01:32:48 GMT  
 making app proportional to client screen

Quote:
> I have distributed a vb app on multiple computers and of
> course, the size and appearance of the app varies from
> computer to computer.

> However, I am wonder if it is possible to ensure that an
> app is proportional to a client's screen, no matter what
> the display settings are of a computer. That is, ensure
> that the forms and controls don't appear abnormal.

Sure, there's lots of auto-resizer components about; I'm sure a quick search
on Google will reveal a good few.
Hope this helps,

    Mike

 -- EDais --

 - Microsoft Visual Basic MVP -
WWW: Http://EDais.earlsoft.co.uk/




Tue, 29 Mar 2005 02:05:43 GMT  
 making app proportional to client screen
Are there some other means by which this can be accomplish
w/out add-ins or components? I was hoping some APIs or
code can be written to accomplish this.

jim

Quote:
>-----Original Message-----
>> I have distributed a vb app on multiple computers and of
>> course, the size and appearance of the app varies from
>> computer to computer.

>> However, I am wonder if it is possible to ensure that an
>> app is proportional to a client's screen, no matter what
>> the display settings are of a computer. That is, ensure
>> that the forms and controls don't appear abnormal.

>Sure, there's lots of auto-resizer components about; I'm
sure a quick search
>on Google will reveal a good few.
>Hope this helps,

>    Mike

> -- EDais --

> - Microsoft Visual Basic MVP -
>WWW: Http://EDais.earlsoft.co.uk/


>.



Tue, 29 Mar 2005 05:53:16 GMT  
 making app proportional to client screen
For two of my apps I have code written in the form.resize event and it's
nice and ugly.  If you go that route you have to be aware of all the .left
and .top and .height and .width of the controls so you know where each of
them are supposed to go.

Say you have a simple form with a frame and two buttons outside of the
frame.  Now say you want that frame to take up the whole form and the one of
the buttons to always be at the bottom-left of the frame and the second
button to be right next to the first button (to the right).  So, in the
form's Resize event you'd want to have something like:

if me.scaleheight >= X and me.scalewidth >= Y then   ' Read note #1 on X & Y
here
    me.frame1.left = 60 ' Or however far from the left side you want it to
be.  Could be 0 if you want.
    me.frame1.width = me.scalewidth-60 ' or -0 if you want it to go all the
way to the edge of the form
    me.frame1.height = me.scaleheight-me.button1.height-30-30 ' You could
just say -60 but the first -30 is because you'll want some space between the
button & frame and some space between the button and the bottom of the form
    '
    me.button1.left = me.frame1.left
    me.button1.top = me.frame1.top+me.frame1.height+30 ' The 30 from
me.frame1.height blah blah blah
    '
    me.button2.left = me.button1.left+me.button1.width+30 ' Or however much
space you want between the two buttons instead of 30
    me.button2.top = me.frame1.top+me.frame1.height+30 ' The 30 from
me.frame1.height blah blah blah
end if

Note #1:  For X & Y you want some height & width that will stop the form
from resizing.  If you didn't have them and the user resized all the way
down to like... oh... 1 width & 1 height you could cause some problems.  So
drop a number in there that once they resize below a certain X & Y the form
will stop resizing the controls.  Besides, at some point of resizing down
they couldn't see the controls properly anyway.

And that's just a simple example (from memory so sue me if I forgot
something).  But it should show how things need to relate to the size &
location of other things.  Also, the 30, 60 or whatever actual numbers you
plug in are based on what scale mode you are in.  If you're in pixels you
don't want something as large as 30.

Hope some of that helps.

Sam


Quote:
> Are there some other means by which this can be accomplish
> w/out add-ins or components? I was hoping some APIs or
> code can be written to accomplish this.

> jim

> >-----Original Message-----
> >> I have distributed a vb app on multiple computers and of
> >> course, the size and appearance of the app varies from
> >> computer to computer.

> >> However, I am wonder if it is possible to ensure that an
> >> app is proportional to a client's screen, no matter what
> >> the display settings are of a computer. That is, ensure
> >> that the forms and controls don't appear abnormal.

> >Sure, there's lots of auto-resizer components about; I'm
> sure a quick search
> >on Google will reveal a good few.
> >Hope this helps,

> >    Mike

> > -- EDais --

> > - Microsoft Visual Basic MVP -
> >WWW: Http://EDais.earlsoft.co.uk/


> >.



Tue, 29 Mar 2005 06:18:46 GMT  
 making app proportional to client screen

Quote:
> Are there some other means by which this can be accomplish
> w/out add-ins or components? I was hoping some APIs or
> code can be written to accomplish this.

Sure, some of the components have source included and it's not too tricky to
write your own.  If you want a basic example then let me know and I'll send
over some basic code.

    Mike

 -- EDais --

 - Microsoft Visual Basic MVP -
WWW: Http://EDais.earlsoft.co.uk/




Tue, 29 Mar 2005 07:40:53 GMT  
 making app proportional to client screen
I would greatly appreciate if you would send a basic
example. I will also look for some of those components you
mentioned as well.

Thanks again!

jim

Quote:
>-----Original Message-----
>> Are there some other means by which this can be
accomplish
>> w/out add-ins or components? I was hoping some APIs or
>> code can be written to accomplish this.

>Sure, some of the components have source included and

it's not too tricky to
Quote:
>write your own.  If you want a basic example then let me
know and I'll send
>over some basic code.

>    Mike

> -- EDais --

> - Microsoft Visual Basic MVP -
>WWW: Http://EDais.earlsoft.co.uk/


>.



Tue, 29 Mar 2005 11:52:46 GMT  
 making app proportional to client screen
I will give this a shot. Thanks! It's greatly appreciated.

jim

Quote:
>-----Original Message-----
>For two of my apps I have code written in the form.resize
event and it's
>nice and ugly.  If you go that route you have to be aware
of all the .left
>and .top and .height and .width of the controls so you
know where each of
>them are supposed to go.

>Say you have a simple form with a frame and two buttons
outside of the
>frame.  Now say you want that frame to take up the whole
form and the one of
>the buttons to always be at the bottom-left of the frame
and the second
>button to be right next to the first button (to the
right).  So, in the
>form's Resize event you'd want to have something like:

>if me.scaleheight >= X and me.scalewidth >= Y then   '

Read note #1 on X & Y
Quote:
>here
>    me.frame1.left = 60 ' Or however far from the left
side you want it to
>be.  Could be 0 if you want.
>    me.frame1.width = me.scalewidth-60 ' or -0 if you

want it to go all the
Quote:
>way to the edge of the form
>    me.frame1.height = me.scaleheight-me.button1.height-
30-30 ' You could
>just say -60 but the first -30 is because you'll want

some space between the
Quote:
>button & frame and some space between the button and the
bottom of the form
>    '
>    me.button1.left = me.frame1.left
>    me.button1.top = me.frame1.top+me.frame1.height+30 '
The 30 from
>me.frame1.height blah blah blah
>    '
>    me.button2.left =

me.button1.left+me.button1.width+30 ' Or however much
Quote:
>space you want between the two buttons instead of 30
>    me.button2.top = me.frame1.top+me.frame1.height+30 '
The 30 from
>me.frame1.height blah blah blah
>end if

>Note #1:  For X & Y you want some height & width that
will stop the form
>from resizing.  If you didn't have them and the user
resized all the way
>down to like... oh... 1 width & 1 height you could cause
some problems.  So
>drop a number in there that once they resize below a

certain X & Y the form
Quote:
>will stop resizing the controls.  Besides, at some point
of resizing down
>they couldn't see the controls properly anyway.

>And that's just a simple example (from memory so sue me
if I forgot
>something).  But it should show how things need to relate
to the size &
>location of other things.  Also, the 30, 60 or whatever
actual numbers you
>plug in are based on what scale mode you are in.  If

you're in pixels you

- Show quoted text -

Quote:
>don't want something as large as 30.

>Hope some of that helps.

>Sam



>> Are there some other means by which this can be
accomplish
>> w/out add-ins or components? I was hoping some APIs or
>> code can be written to accomplish this.

>> jim

>> >-----Original Message-----
>> >> I have distributed a vb app on multiple computers
and of
>> >> course, the size and appearance of the app varies
from
>> >> computer to computer.

>> >> However, I am wonder if it is possible to ensure
that an
>> >> app is proportional to a client's screen, no matter
what
>> >> the display settings are of a computer. That is,
ensure
>> >> that the forms and controls don't appear abnormal.

>> >Sure, there's lots of auto-resizer components about;
I'm
>> sure a quick search
>> >on Google will reveal a good few.
>> >Hope this helps,

>> >    Mike

>> > -- EDais --

>> > - Microsoft Visual Basic MVP -
>> >WWW: Http://EDais.earlsoft.co.uk/


>> >.

>.



Tue, 29 Mar 2005 11:54:48 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. making vb app proportional to screen

2. making vb apps into activex app

3. Making my startup-app keep the focus/interference from other startup-apps

4. Launch app on Server to client, from client

5. Capturing screen contents of full screen DOS app under windows

6. Capturing screen contents of full screen DOS app under windows

7. Passing structures from C++ app to a VB client app through Network connection using COM

8. LOCAL APP --> CLIENT SERVER APP

9. Client App wants Server App to start

10. Reset screen so taskbar app prevents maxed apps from displaying underneath

11. Reset screen so taskbar app always displays above maxed apps

12. HOTWTO: my app stays on screen like this app

 

 
Powered by phpBB® Forum Software