473,382 Members | 1,093 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Linking images using urls

Hi,

Is it possible to have a url as the link for an image in a form? I've tried
but with no success, wondered if there's an alternative method?

Cheers,
Chris
Nov 12 '05 #1
10 2510
"Not Me" <su**@sumwhere.fake> wrote in
news:bq**********@ucsnew1.ncl.ac.uk:
Hi,

Is it possible to have a url as the link for an image in a form? I've
tried but with no success, wondered if there's an alternative method?

Cheers,
Chris


You could use the Web Browser Control, I suppose (never done it for an image
though).

--
Lyle
(for e-mail refer to http://ffdba.com/contacts.htm)
Nov 12 '05 #2
"Lyle Fairfield" <Mi************@Invalid.Com> wrote in message
news:Xn*******************@130.133.1.4...
"Not Me" <su**@sumwhere.fake> wrote in
news:bq**********@ucsnew1.ncl.ac.uk:
Hi,

Is it possible to have a url as the link for an image in a form? I've
tried but with no success, wondered if there's an alternative method?

Cheers,
Chris
You could use the Web Browser Control, I suppose (never done it for an

image though).


Cheers, got it working almost - just can't seem to set the size of it, even
though it's big in the design mode, when I run the form it always comes out
about 1" square.

Any ideas?
Chris
Nov 12 '05 #3
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Some browsers automatically scale images to fit inside the browser
window. You can increase their size to the original size if, when you
move the mouse the mouse pointer changes to a + or - sign, by clicking
one time.

MGFoster:::mgf
Oakland, CA (USA)
-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBP8ZBw4echKqOuFEgEQKs7wCgr4WTMuJ0Wgc4/5wzyZPRdNWZ8XIAn2iK
FcPrIY7GDYGoJYbE/Kn0ZcWB
=AX27
-----END PGP SIGNATURE-----

Not Me wrote:
"Lyle Fairfield" <Mi************@Invalid.Com> wrote in message
news:Xn*******************@130.133.1.4...
"Not Me" <su**@sumwhere.fake> wrote in
news:bq**********@ucsnew1.ncl.ac.uk:

Hi,

Is it possible to have a url as the link for an image in a form? I've
tried but with no success, wondered if there's an alternative method?

Cheers,
Chris


You could use the Web Browser Control, I suppose (never done it for an


image
though).

Cheers, got it working almost - just can't seem to set the size of it, even
though it's big in the design mode, when I run the form it always comes out
about 1" square.

Any ideas?
Chris


Nov 12 '05 #4
> "Lyle Fairfield" <Mi************@Invalid.Com> wrote in message
news:Xn*******************@130.133.1.4...
"Not Me" <su**@sumwhere.fake> wrote in
news:bq**********@ucsnew1.ncl.ac.uk: You could use the Web Browser Control, I suppose (never done it for an

image
though).


Cheers, got it working almost - just can't seem to set the size of it,
even though it's big in the design mode, when I run the form it always
comes out about 1" square.


When my form opens I run this code:

Private Sub Form_Open(Cancel As Integer)
Me.wbHDSBHelp.Width = 480
PlaceForm Me
End Sub

wbHDSBHekp is the web browser control.
PlaceForm is another story.
--
Lyle
(for e-mail refer to http://ffdba.com/contacts.htm)
Nov 12 '05 #5
rkc

"Lyle Fairfield" <Mi************@Invalid.Com> wrote in message
news:Xn*******************@130.133.1.4...
"Lyle Fairfield" <Mi************@Invalid.Com> wrote in message
news:Xn*******************@130.133.1.4...
wbHDSBHekp is the web browser control.
PlaceForm is another story.


A mystery it seems.
Nov 12 '05 #6
"rkc" <rk*@yabba.dabba.do.rochester.rr.bomb> wrote in news:Tytxb.106977
$1********@twister.nyroc.rr.com:

"Lyle Fairfield" <Mi************@Invalid.Com> wrote in message
news:Xn*******************@130.133.1.4...
> "Lyle Fairfield" <Mi************@Invalid.Com> wrote in message
> news:Xn*******************@130.133.1.4...

wbHDSBHekp is the web browser control.
PlaceForm is another story.


A mystery it seems.


I always wanted to be a mystery writer ... or even a mystery weapon of mass
destruction. I suppose I have a greater chance at the former:

Option Explicit

Private Declare Function GetWindowRect Lib "user32" _
(ByVal hwnd As Long, lpRect As Rectangle) As Long
Private Declare Function SetWindowPos Lib "user32" _
(ByVal hwnd As Long, ByVal hWndInsertAfter As Long, _
ByVal X As Long, ByVal y As Long, _
ByVal cx As Long, ByVal cy As Long, _
ByVal wFlags As Long) As Long

Private Const HWND_TOP As Long = 0
Private Const HWND_TOPMOST As Long = -1
Private Const SWP_NOZORDER As Long = &H4
Private Const SWP_NOOWNERZORDER As Long = &H2

Private Type Dimensions
Width As Long
Height As Long
End Type

Private Type Rectangle
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type

Public Sub PlaceForm(ByRef Form As Form, Optional ByVal Center As Boolean,
Optional Below As Boolean)
Dim AccessDimensions As Dimensions
Dim AccessRectangle As Rectangle
Dim AccessWindow As Long

Dim CallingForm As Form
Dim CallingFormDimensions As Dimensions
Dim CallingFormRectangle As Rectangle
Dim CallingFormWindow As Long

Dim FormDimensions As Dimensions
Dim FormRectangle As Rectangle
Dim FormWindow As Long

Dim WindowStyleInformation As Long

Dim Slack As Long

On Error Resume Next

AccessWindow = hWndAccessApp
GetWindowRect AccessWindow, AccessRectangle
With AccessRectangle
AccessDimensions.Width = .Right - .Left
AccessDimensions.Height = .Bottom - .Top
End With

Set CallingForm = Application.Screen.ActiveForm
If Not CallingForm Is Nothing Then
CallingFormWindow = CallingForm.hwnd
GetWindowRect CallingFormWindow, CallingFormRectangle
With CallingFormRectangle
CallingFormDimensions.Width = .Right - .Left
CallingFormDimensions.Height = .Bottom - .Top
End With
End If

FormWindow = Form.hwnd
GetWindowRect FormWindow, FormRectangle
With FormRectangle
FormDimensions.Width = .Right - .Left
FormDimensions.Height = .Bottom - .Top
End With

If Center = True Then

FormRectangle.Top = (AccessRectangle.Bottom -
FormDimensions.Height) / 2
FormRectangle.Left = (AccessRectangle.Right - FormDimensions.Width)
/ 2

ElseIf Below = True Then
FormRectangle.Left = CallingFormRectangle.Left
FormRectangle.Top = CallingFormRectangle.Bottom
Else

FormRectangle.Left = CallingFormRectangle.Right
' How much room is there to the right of the form now
Slack = AccessRectangle.Right - FormRectangle.Left
' if there is not enough room on rhs
If Slack < FormDimensions.Width Then
Slack = CallingFormRectangle.Left - AccessRectangle.Left
' if there's enough room on lhs
If Slack > FormDimensions.Width Then
' move it
FormRectangle.Left = CallingFormRectangle.Left -
FormDimensions.Width
End If
End If

FormRectangle.Top = CallingFormRectangle.Top
' How much room is there below the form now
Slack = AccessRectangle.Bottom - FormRectangle.Top
' if there is not enough room on rhs
If Slack < FormDimensions.Height Then
' move it up until so there is enough room
FormRectangle.Top = AccessRectangle.Bottom -
FormDimensions.Height
End If
' but in any case don't move it out of the access window
If FormRectangle.Top < AccessRectangle.Top Then
FormRectangle.Top = AccessRectangle.Top
End If
End If
SetWindowPos FormWindow, HWND_TOP, FormRectangle.Left,
FormRectangle.Top, FormDimensions.Width, FormDimensions.Height,
SWP_NOZORDER
End Sub

This sub which centers a form, or places it below or beside the form that
called it, has grown without a lot of structure and in response to many
needs, so there may be some redundancy in the code. I'll fix it up as soon
as I have some spare time ... 2008 probably.
--
Lyle
(for e-mail refer to http://ffdba.com/contacts.htm)
Nov 12 '05 #7
TC

"rkc" <rk*@yabba.dabba.do.rochester.rr.bomb> wrote in message
news:Ty********************@twister.nyroc.rr.com.. .

"Lyle Fairfield" <Mi************@Invalid.Com> wrote in message
news:Xn*******************@130.133.1.4...
"Lyle Fairfield" <Mi************@Invalid.Com> wrote in message
news:Xn*******************@130.133.1.4...

wbHDSBHekp is the web browser control.
PlaceForm is another story.


A mystery it seems.

Nope!

http://support.microsoft.com/support...es/Q161397.ASP

TC

Nov 12 '05 #8
"TC" <a@b.c.d> wrote in news:1069990072.440903@teuthos:

"rkc" <rk*@yabba.dabba.do.rochester.rr.bomb> wrote in message
news:Ty********************@twister.nyroc.rr.com.. .

"Lyle Fairfield" <Mi************@Invalid.Com> wrote in message
news:Xn*******************@130.133.1.4...
> > "Lyle Fairfield" <Mi************@Invalid.Com> wrote in message
> > news:Xn*******************@130.133.1.4...

> wbHDSBHekp is the web browser control.
> PlaceForm is another story.


A mystery it seems.

Nope!

http://support.microsoft.com/support...es/Q161397.ASP

TC


Why not my solution posted elsewhere in this thread?

I think rkc means that PlaceForm ... another story ... is a mystery story.
And also else-elsewhere in this thread I tried to demystify that. So I hope
this is all demisted or clear?

--
Lyle
(for e-mail refer to http://ffdba.com/contacts.htm)
Nov 12 '05 #9
TC

"Lyle Fairfield" <Mi************@Invalid.Com> wrote in message
news:Xn*******************@130.133.1.4...
"TC" <a@b.c.d> wrote in news:1069990072.440903@teuthos:

"rkc" <rk*@yabba.dabba.do.rochester.rr.bomb> wrote in message
news:Ty********************@twister.nyroc.rr.com.. .

"Lyle Fairfield" <Mi************@Invalid.Com> wrote in message
news:Xn*******************@130.133.1.4...
> > "Lyle Fairfield" <Mi************@Invalid.Com> wrote in message
> > news:Xn*******************@130.133.1.4...

> wbHDSBHekp is the web browser control.
> PlaceForm is another story.

A mystery it seems.

Nope!

http://support.microsoft.com/support...es/Q161397.ASP

TC


Why not my solution posted elsewhere in this thread?

I think rkc means that PlaceForm ... another story ... is a mystery story.
And also else-elsewhere in this thread I tried to demystify that. So I

hope this is all demisted or clear?


Sorry, I came in part way through. I knew there was a problem resizing the
webbrowser control, so I just wanted to provide that reference.

TC

Nov 12 '05 #10
rkc

"Lyle Fairfield" <Mi************@Invalid.Com> wrote in message
news:Xn*******************@130.133.1.4...
"rkc" <rk*@yabba.dabba.do.rochester.rr.bomb> wrote in news:Tytxb.106977
$1********@twister.nyroc.rr.com:

"Lyle Fairfield" <Mi************@Invalid.Com> wrote in message
news:Xn*******************@130.133.1.4...
> "Lyle Fairfield" <Mi************@Invalid.Com> wrote in message
> news:Xn*******************@130.133.1.4...
wbHDSBHekp is the web browser control.
PlaceForm is another story.


A mystery it seems.


I always wanted to be a mystery writer ... or even a mystery weapon of

mass destruction. I suppose I have a greater chance at the former:

Option Explicit

Private Declare Function GetWindowRect Lib "user32" _


<snip more stuff>

Looks like the foundation for a very useful class.
I'll eat leftovers and mess with it for a bit.


Nov 12 '05 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Jonathan Daugherty | last post by:
Does anyone here know if the wxImage class in wxPython supports dislaying images from URLs? -- Jonathan Daugherty http://www.cprogrammer.org "It's a book about a Spanish guy called Manual,...
5
by: Andreas Volz | last post by:
Hi, I used SGMLParser to parse all href's in a html file. Now I need to cut some strings. For example: http://www.example.com/dir/example.html Now I like to cut the string, so that only...
27
by: Lee Phillips | last post by:
I believe it is universally accepted that decorating your website with images from someone else's, without permission, is rude and unethical, even if the images are in the public domain, because...
5
by: chrisse_2 | last post by:
Hi, All the records in my database will contain at least one picture. At the moment all the images are part of the database as ole objects although the database is way to big and there is only...
12
by: Brian Henry | last post by:
I made a header control in asp.net and it references images in the /images/ folder in the virtural path's root folder... How can I get the header control to show the images at any level of the web...
6
by: Edward | last post by:
I have been doing some research about embedding images in HTML using the data URL src method of the format: <img src="/-/data:image/gif;base64,<DATA>"> My question is, how does one generate...
6
by: Rob | last post by:
Hello, I'm sure this has come up before. I have need for a collection of all elements/objects in an HTML document that have any kind of an attribute (HTML or CSS) that is making use of a URL to...
2
by: Simon Wigzell | last post by:
I have inherited a database driven website that comes with a table of image links. The images are scattered all of the internet and there are thousands of them. I would like to write an asp script...
5
matheussousuke
by: matheussousuke | last post by:
Hello, I'm using tiny MCE plugin on my oscommerce and it is inserting my website URL when I use insert image function in the emails. The goal is: Make it send the email with the URL...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.