473,406 Members | 2,345 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,406 software developers and data experts.

Image on Button

How do I change the from text on a button to an image? I know in VB6, you
can go to the Styles option of the button and just change it graphical. How
do you do this in VB.NET?

--
Jeffrey Saunders
"Newbie Programmer"
OH, NO! Software

Nov 20 '05 #1
7 21981
* "Jeffrey Saunders" <as******@georgeandgabe.com> scripsit:
How do I change the from text on a button to an image? I know in VB6, you
can go to the Styles option of the button and just change it graphical. How
do you do this in VB.NET?


Set the button's 'Image' property and set 'Text' to "".

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #2
I did that and the button is blank now

--
Jeffrey Saunders
"Newbie Programmer"
OH, NO! Software

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl...
* "Jeffrey Saunders" <as******@georgeandgabe.com> scripsit:
How do I change the from text on a button to an image? I know in VB6, you can go to the Styles option of the button and just change it graphical. How do you do this in VB.NET?


Set the button's 'Image' property and set 'Text' to "".

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>

Nov 20 '05 #3
Cor
Hi Jeffrey,

There are two methodes
- using the imagelist
- using the button.image - btn.image= image.fromfile("path")
But nicer is to do it in the designer because then the image becomes a part
of the program

I hope this helps,

Cor
Nov 20 '05 #4
Is your buttons FlatStyle property set to System?
Change it to any of the other three options (the default being Standard).

"Jeffrey Saunders" <as******@georgeandgabe.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
I did that and the button is blank now

--
Jeffrey Saunders
"Newbie Programmer"
OH, NO! Software

"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl...
* "Jeffrey Saunders" <as******@georgeandgabe.com> scripsit:
How do I change the from text on a button to an image? I know in VB6, you can go to the Styles option of the button and just change it
graphical.
How do you do this in VB.NET?


Set the button's 'Image' property and set 'Text' to "".

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>


Nov 20 '05 #5
* "Jeffrey Saunders" <as******@georgeandgabe.com> scripsit:
I did that and the button is blank now


Which style did you select in the 'FlatStyle' property?

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #6

I use the Standard Flatsytle... i will try changeing it to system
sytle...

Jeffrey Saunders

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #7
* Shane Saunders <as******@comcast.net> scripsit:
I use the Standard Flatsytle... i will try changeing it to system
sytle...


'System' buttons cannot deal with images...

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #8

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

Similar topics

6
by: Marek Mänd | last post by:
Can the <button><img></button> mutated via CSS so, that the inner image of <BUTTON> would entirely visually become the button itsself - I mean without the outer elements borders and so... ...
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...
2
by: Ester | last post by:
Instead of drag and drop image button from Toolbox and name the image button id on the properties box, I would like to load image button ID from database. I created a database table that stores...
2
by: Matt | last post by:
In the following code, I have 2 questions regarding submit button with image. 1) Does this code <input type="image" name="populate" src="populate.gif"> behave the same as an HTML submit button...
15
by: Anand Ganesh | last post by:
HI All, I have an Image. I want to clip a portion of it and copy to another image. How to do this? I know the bounding rectangle to clip. Any suggestions please. Thanks for your time and...
0
by: Deepak C.G via .NET 247 | last post by:
I want to dispose the image object in my child form, unless I won't dispose this object i can't delete the image file in my folder. I get this error in MDIparent form "An unhandled exception...
1
by: Phil_Cam | last post by:
Hello All On a webpage I have a standard paypal image button for purchases. I am trying to set it up so that it only shows up or is endabled when text is entered into a textbox and a button is...
16
by: browntown | last post by:
so I have this application I'm nearly finished with. The only thing the client has requested is the ability to submit the form by pressing "enter". I didn't think this would be a huge pain in the...
2
by: Poppa Pimp | last post by:
ImageResizer.php Image Resizer PLEASE HELP The URL of the page this is on in my site is http://poppa-pimps-wallpapers.com//ImageResizer.php You can click on browse and get image,but...
4
by: Marcolino | last post by:
Hi, I have simple needs but I don't know how to implement it. I have application that create Dynamic Button. I need to set the image on this button, getting the icon from a form. So pratically...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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,...
0
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...
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...
0
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...

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.