473,761 Members | 9,477 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2445
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.Attri butes("Style") = "Z-INDEX: 101; " & _
"LEFT: 100px; POSITION: absolute; TOP: 300px"
Dim mybutton As New Button
mybutton.BackCo lor = Drawing.Color.W hite
mybutton.Text = "Hello"
mybutton.Width = New Unit(300)
Me.Panel1.Contr ols.Add(mybutto n)
///
I hope this helps?

Cor

"Ester" <an*******@disc ussions.microso ft.com> schreef in bericht
news:4F******** *************** ***********@mic rosoft.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("St yle") = "Z-INDEX: 101; " & _
"LEFT: 100px; POSITION: absolute; TOP: 300px"
Me.ImageButton2 .Attributes("St yle") = "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:ImageButto n id="ImageButton 2" runat="server"> </asp:ImageButton >
<asp:ImageButto n id="ImageButton 1" 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
1623
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 the select list moves to the next option and the content frame changes to the next URL, and a page number is updated on the header. The code I have now works great on NS 7 and FF1. When I test it in IE, the select box updates then immediately...
4
1942
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 some reason I keep getting the error: Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
0
1935
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 some reason I keep getting the error: Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
4
407
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 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...
24
2883
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 image below it.
0
1888
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 input button that would allow for both text and an image on it. I am attempting to accomplish this by basing off of the asp:button control. I added a property for the image url and one to determine if the image is displayed on the left or right...
0
2203
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 incurred a network hit per image file. i wanted to avoid the overhead of a separate network connection for each image file, so i bundled all the images into the JAR file. yet, somehow, the loading time for the applet is slower now! i'm totally...
1
1896
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 box. using this code:- 'opens file dialog box to load selected jpeg into picture box OpenFD.InitialDirectory = "C:\My Documents\My Pictures" OpenFD.Title = "Open a JPEG file" OpenFD.Filter = "JPEG...
5
2826
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 look for why it is slowing down. I thought about the DB first and added NOLOCK to a couple of stored procedures that were being run, but with no effect. Can someone offer some tips on where to start looking or how I can begin to diagnose this...
0
9376
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10136
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9988
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8813
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7358
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6640
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5405
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3509
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2788
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.