Re: Form Disappears



On 8 Dec, 14:08, "Michael" <mQiQcQhQaQe...@xxxxxxxxxxxxxxxxxxxxxxx>
wrote:

And I've tried:
frmVolume.Show [etc]
And none of them have worked.....

Using frmVolume.Show should work fine because it will automatically
show frmVolume at the fronm of the ZOrder. However, if you want to
reinforce that setting you can use:

frmVolume.Show
frmVolume.ZOrder 0 ' bring to front

However, having said that, the Form does not show on my own machine
either using the properties you posted, but that's because you have
positioned it off the display (at least on my own machine, and
possibly also on yours). You've got its Left property set to 14745
(twips) which on standard machines running at 15 twips per pixel is
983 pixels (and its Top property is a similarly large value). However,
judging by the properties of your main Form (frmMenu) you are running
this code on a 800 x 600 pixel display (if, as I assume, you've got
the main Form of such a size that it fills the entire screen). The
reason you cannot see frmVolume is therefore simply because it is
positioned off the edge of the display. Try (as a test) setting both
its Left and Top properties to zero and you should be able to see it.
Then change them to whatever values you really want.

By the way, setting the size of your Forms in the IDE in the way that
you are doing is not a good idea if you want your code to work
properly on other machines that might be running at a different screen
size (1024 x 768 or 1280 x 960 or whatever). You really should be
setting the size in code at run time (perhaps in the Form's Load
event) so that it fills the entire display on whatever machine it
happens to be running on.

Mike



.



Relevant Pages

  • Re: Picture in image control gets cliped "Sometimes" does not stay flu
    ... the width of the picture in the Image control. ... This will almost certainly be because your code is not properly taking into acount the differences in the Windows dots per inch (or twips per pixel) setting on different machines. ... The only time it will fail to do this is if the pixel size of the display on which your code is running is not sufficient to display such a Form, in which case it will make the client area as large as it can under the circumstances. ...
    (microsoft.public.vb.general.discussion)
  • Re: Form Disappears
    ... show frmVolume at the fronm of the ZOrder. ... which on standard machines running at 15 twips per pixel is ... this code on a 800 x 600 pixel display (if, as I assume, you've got ...
    (comp.lang.basic.visual.misc)
  • Re: Clip capture - thanks Mike!
    ... >some things is default vbPixels. ... >>> make sense if the smallest division is Pixel. ... as so it follows that there are 1440 twips in one inch. ... >> by the pixel resolution of the display. ...
    (comp.lang.basic.visual.misc)
  • Re: Form is truncated.....
    ... Most machines run at 96 dpi (15 twips per pixel) but quite a lot run at 120 dpi and some at various other settings. ... All good applications, whether they are VB applications or not, always need to check the display on which they are running and adjust themselves accordingly. ...
    (microsoft.public.vb.general.discussion)
  • Re: Algorithm for "Windows Center" and "Windows Width"
    ... y represents the output display level. ... For 16 bit pixel values, you have a potential range of 65536 values but you have only a display range of 256 values, so some manipulation must be done. ... As an extra challenge for you, I think you will find that performing this calculation for every pixel everytime the user changes the window settings will make your application run very slowly. ... identity (no rescale values or Modality LUT, ...
    (comp.protocols.dicom)