473,388 Members | 1,326 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,388 software developers and data experts.

problems on loading image button

I have an interior design of a living room with lights and aircond image. My task is to load the living room image without any light and aircond images as background image of a WebForm after that I have to add image button which are lights and aircond images on top of this background image (living room). Instead of drag and drop an image button from the toolbox and browse the image link, I would like to load the image for the image button from database. In addition, I have to concern about the X- and Y-coordinates of those images on the interior design. For example, a light is located on the top-left corner of the living room on the interior design, I have to load the image on WebForm as it is on the design. My question is how to load the image button as I mentioned above. Can anyone please help me on this issue? I would appreciate your inputs

Thanks
Ester
Jul 21 '05 #1
4 2413
Hi Ester,

I think you can do it like this (I used a normal button in this sample
however that is not the problem).

(You have to drag a small panel on your form.)
I thought that the layout from the form is not important
\\\
Me.Panel1.Attributes("Style") = "Z-INDEX: 101; " & _
"LEFT: 100px; POSITION: absolute; TOP: 300px"
Dim mybutton As New Button
mybutton.BackColor = Drawing.Color.White
mybutton.Text = "Hello"
mybutton.Width = New Unit(300)
Me.Panel1.Controls.Add(mybutton)
///
I hope this helps?

Cor

"Ester" <an*******@discussions.microsoft.com> schreef in bericht
news:4F**********************************@microsof t.com...
I have an interior design of a living room with lights and aircond image. My task is to load the living room image without any light and aircond
images as background image of a WebForm after that I have to add image
button which are lights and aircond images on top of this background image
(living room). Instead of drag and drop an image button from the toolbox
and browse the image link, I would like to load the image for the image
button from database. In addition, I have to concern about the X- and
Y-coordinates of those images on the interior design. For example, a light
is located on the top-left corner of the living room on the interior design,
I have to load the image on WebForm as it is on the design. My question is
how to load the image button as I mentioned above. Can anyone please help
me on this issue? I would appreciate your inputs.
Thanks,
Ester

Jul 21 '05 #2
Hi Cor

First of all, thank you for your reply. Is the codes go to HTML or WebForm.aspx Code Behind

I got another question: As you mentioned that I have to drag and drop panel from Toolbox but I should not do that in my case because I have to load the image for the image button from the database. In addition, it is not just an image button, the number of image buttons loaded to the WebForm.aspx vary on different interior designs. For example, number of devices (such as lights, airconds, etc), which are image buttons on the WebForm.aspx, on Xperson's house might be 10 whereas Yperson's house might be 20

As for the layout of the WebForm.aspx, it must be exactly the same as the interior design. For example, if a light located at top-left corner and the other located at bottom-right of the living room on the design then I have to load the light image buttons as they are into the WebForm.aspx

p/s: I wonder am I able to attach image file on the message so that it can better illustrate what I meant

Thanks
Ester
Jul 21 '05 #3
Hi Ester,

First of all, thank you for your reply. Is the codes go to HTML or WebForm.aspx Code >Behind?

I showed for use with an compiled application, so this will be code behind.
I now change my text now I know you are not using VS.net
I got another question: As you mentioned that I have to drag and drop panel from Toolbox but I should not do that in my case because I have to
load the image for the image button from the database. In addition, it is
not just an image button, the number of image buttons loaded to the
WebForm.aspx vary on different interior designs. For example, number of
devices (such as lights, airconds, etc), which are image buttons on the
WebForm.aspx, on Xperson's house might be 10 whereas Yperson's house might
be 20.

That panel was needed to attach the button, that is how I normaly do however
in your case not needed. I tested it in this way.

Me.ImageButton1.Attributes("Style") = "Z-INDEX: 101; " & _
"LEFT: 100px; POSITION: absolute; TOP: 300px"
Me.ImageButton2.Attributes("Style") = "Z-INDEX: 102; " & _
"LEFT: 200px; POSITION: absolute; TOP: 100px"

However you need to put every button in the page, place is not important
the size you can also set in the style or with the properties from the
ImageButton as I showed in my previous message.

<body>
<form id="Form1" method="post" runat="server">
&nbsp;
<asp:ImageButton id="ImageButton2" runat="server"></asp:ImageButton>
<asp:ImageButton id="ImageButton1" runat="server"></asp:ImageButton></form>
</body> You see that the buttons are now on an absolute place, that means that your
page should also not have dynamic posibilities, however only measurements
in pixels. Which mean that it on some screens can look terrible, I do not
know how it will be done in another way using ASPX.

However you never know and someone corrects me here.
As for the layout of the WebForm.aspx, it must be exactly the same as the interior design. For example, if a light located at top-left corner and
the other located at bottom-right of the living room on the design then I
have to load the light image buttons as they are into the WebForm.aspx.
----------------------- p/s: I wonder am I able to attach image file on the message so that it can

better illustrate what I meant.

No I think what you want to do.

I hope this helps better?

Cor
Jul 21 '05 #4
Hi Cor,

Thank you so much for your time. I will try your method

Thank
Ester
Jul 21 '05 #5

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

Similar topics

2
by: jascraig | last post by:
Here's my dilemma. I'm working with a frameset with 3 frames (header,content,control). My control frame contains a select list with buttons for next and previous. When the next button is pushed...
4
by: Tim::.. | last post by:
Can someone please help.... I'm having major issues with a user control I'm tring to create! I an trying to execute a sub called UploadData() from a user control which I managed to do but for...
0
by: Tim::.. | last post by:
Can someone please help.... I'm having major issues with a user control I'm tring to create! I an trying to execute a sub called UploadData() from a user control which I managed to do but for...
4
by: Ester | last post by:
I have an interior design of a living room with lights and aircond image. My task is to load the living room image without any light and aircond images as background image of a WebForm after that I...
24
by: moriman | last post by:
Hi, The script below *used* to work. I have only just set up a server, PHP etc again on my Win98 system and now it doesn't? On first loading this page, you would have $p = and the button...
0
by: David | last post by:
Hello all. I am trying to implement my first server control and have run into two problems that I cannot solve. I need the assistance of someone with more experience. My goal was to create an...
0
by: speedcoder | last post by:
hi all, i'm stumped. my applet used to load images over the network. (it was actually designed by someone else.) yes, the applet used to load each image file independently over the network and...
1
by: blazingmavrick | last post by:
My problem consits of the following:- i am creating mulitple picturebox's, when the user double clicks on the picture box it opens the opendialog box to load a picture (jpeg only) into the picture...
5
by: =?Utf-8?B?V2FubmFiZQ==?= | last post by:
We have a page that is loading very slow. There is not a lot of data, not a lot of users are connected at the same time and the page does not produce an error, so I am not sure where to start to...
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: 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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.