Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.basic.visual.misc > #1049
| From | "Auric__" <not.my.real@email.address> |
|---|---|
| Newsgroups | comp.lang.basic.visual.misc |
| Subject | Re: VB6 Frames |
| Date | 2012-04-29 00:24 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <XnsA043B1122B58Bauricauricauricauric@88.198.244.100> (permalink) |
| References | <535op7d1eqve0prjlcl8m73fl7finp8pgd@4ax.com> |
scbs29 wrote:
> probably simple question
>
> I have image controls within frames. I calculate to fit the images to
> the frame dimensions, but if the frame has a borderstyle 1, fixed
> single, the images still extend to the frame edges. Is there a way of
> only extending the images to fit within the border ?
Have you tried checking the border style when you load the image? Something
like this might work (if using a Picture control; Image controls don't
support the Change event so you'd have to run the sub from your code):
Const onepixel = 14
Const twopixels = 28
Private Sub Picture1_Change()
With Picture1
If Frame1.BorderStyle And (Len(.Tag) < 1) Then
.Tag = "moved"
.Left = .Left + onepixel
.Top = .Top + onepixel
.Width = .Width - twopixels
.Height = .Height - twopixels
ElseIf Len(.Tag) And (0 = Frame1.BorderStyle) Then
.Tag = ""
.Left = .Left - onepixel
.Top = .Top - onepixel
.Width = .Width + twopixels
.Height = .Height + twopixels
End If
End With
End Sub
--
When did I want to be lonely? When did I want to be cold?
Back to comp.lang.basic.visual.misc | Previous | Next — Previous in thread | Next in thread | Find similar
VB6 Frames scbs29 <scbs29@fred.talktalk.net> - 2012-04-28 17:12 +0100
Re: VB6 Frames "Auric__" <not.my.real@email.address> - 2012-04-29 00:24 +0000
Re: VB6 Frames scbs29 <scbs29@fred.talktalk.net> - 2012-04-29 10:10 +0100
Re: VB6 Frames Deanna Earley <dee.earley@icode.co.uk> - 2012-04-30 08:59 +0100
Re: VB6 Frames "Mike Williams" <Mike@WhiskyAndCoke.com> - 2012-04-29 13:18 +0100
Re: VB6 Frames "Mike Williams" <Mike@WhiskyAndCoke.com> - 2012-04-30 11:25 +0100
Re: VB6 Frames scbs29 <scbs29@fred.talktalk.net> - 2012-04-30 12:52 +0100
Re: VB6 Frames "Mike Williams" <Mike@WhiskyAndCoke.com> - 2012-04-30 13:43 +0100
Re: VB6 Frames scbs29 <scbs29@fred.talktalk.net> - 2012-05-02 13:39 +0100
Re: VB6 Frames "Mike Williams" <Mike@WhiskyAndCoke.com> - 2012-05-02 21:21 +0100
csiph-web