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

Flat button

Hi,

I asked few days ago about a flat button control under VB.NET but answer
didn't satisfy me.

I know that a such button existed under VB6 so it should exist under
VB.NET also.

Where can i find this Flat button control ? COM, ActiveX ?

thanks a lot,
Maileen
Nov 21 '05 #1
7 3331
Maileen,

What was the answer that didn't satisfy you, that would explain more than
only telling that it did not statisfy you, without that we know what it was.

Cor

"Maileen" <no****@email.com>
...
Hi,

I asked few days ago about a flat button control under VB.NET but answer
didn't satisfy me.

I know that a such button existed under VB6 so it should exist under
VB.NET also.

Where can i find this Flat button control ? COM, ActiveX ?

thanks a lot,
Maileen

Nov 21 '05 #2
In fact I was redirected to some VB power Pack image button...
but this solution is not acceptable for me because i already used a Flat
button from VB6 and it was enough for me.
I didn't need to add any new dll to my project, and so on...
I just want to have a simple button on which i can allow to be flat or
not (like buttons of Coolbars or toolbar).
Moreover, it could be super to have the possibility to add an image
beside the text (caption) of this button.

Maileen

Cor Ligthert wrote:
Maileen,

What was the answer that didn't satisfy you, that would explain more than
only telling that it did not statisfy you, without that we know what it was.

Cor

"Maileen" <no****@email.com>
...
Hi,

I asked few days ago about a flat button control under VB.NET but answer
didn't satisfy me.

I know that a such button existed under VB6 so it should exist under
VB.NET also.

Where can i find this Flat button control ? COM, ActiveX ?

thanks a lot,
Maileen


Nov 21 '05 #3
"Maileen" <no****@email.com> schrieb:
In fact I was redirected to some VB power Pack image button...
but this solution is not acceptable for me because i already used a Flat
button from VB6 and it was enough for me.
I didn't need to add any new dll to my project, and so on...
I just want to have a simple button on which i can allow to be flat or
not (like buttons of Coolbars or toolbar).
Moreover, it could be super to have the possibility to add an image
beside the text (caption) of this button.


Take a look at the buttons' 'FlatStyle' property...

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #4
Maileen,

Why do you not use the flatstyle property of the normal Button.
http://msdn.microsoft.com/library/de...styletopic.asp

However I think that the toolbar can as well do a good job for you.
http://msdn.microsoft.com/library/de...ttonstopic.asp

I hope this helps?

Cor

"Maileen" <no****@email.com> > In fact I was redirected to some VB power
Pack image button...
but this solution is not acceptable for me because i already used a Flat
button from VB6 and it was enough for me.
I didn't need to add any new dll to my project, and so on...
I just want to have a simple button on which i can allow to be flat or not
(like buttons of Coolbars or toolbar).
Moreover, it could be super to have the possibility to add an image beside
the text (caption) of this button.

Maileen

Cor Ligthert wrote:
Maileen,

What was the answer that didn't satisfy you, that would explain more than
only telling that it did not statisfy you, without that we know what it
was.

Cor

"Maileen" <no****@email.com>
...
Hi,

I asked few days ago about a flat button control under VB.NET but answer
didn't satisfy me.

I know that a such button existed under VB6 so it should exist under
VB.NET also.

Where can i find this Flat button control ? COM, ActiveX ?

thanks a lot,
Maileen



Nov 21 '05 #5
Ok, i should precised that i don't want this type of flat button because
it just make ablack border to my button...

I would like to have in fact, the button type that :

1. when mouse pointer is not on button, button is completly flat
2. when mouse pointer is over button, button style is raised

absolutely like button on Toolbar or Coolbar

Maileeb

Herfried K. Wagner [MVP] wrote:
"Maileen" <no****@email.com> schrieb:
In fact I was redirected to some VB power Pack image button...
but this solution is not acceptable for me because i already used a
Flat button from VB6 and it was enough for me.
I didn't need to add any new dll to my project, and so on...
I just want to have a simple button on which i can allow to be flat or
not (like buttons of Coolbars or toolbar).
Moreover, it could be super to have the possibility to add an image
beside the text (caption) of this button.

Take a look at the buttons' 'FlatStyle' property...

Nov 21 '05 #6
You could always just inherit the standard windows button and override the
OnPaint event and just draw the button yourself... I did this to make a
flat button with rounded corners that changed colour as you brought the
mouse over it... pretty similar to your requirements...

If you need some code then I'll be happy to post mine as a starter..

Regards
Simon
"Cor Ligthert" <no************@planet.nl> wrote in message
news:eO****************@TK2MSFTNGP10.phx.gbl...
Maileen,

Why do you not use the flatstyle property of the normal Button.
http://msdn.microsoft.com/library/de...styletopic.asp
However I think that the toolbar can as well do a good job for you.
http://msdn.microsoft.com/library/de...ttonstopic.asp
I hope this helps?

Cor

"Maileen" <no****@email.com> > In fact I was redirected to some VB power
Pack image button...
but this solution is not acceptable for me because i already used a Flat
button from VB6 and it was enough for me.
I didn't need to add any new dll to my project, and so on...
I just want to have a simple button on which i can allow to be flat or not (like buttons of Coolbars or toolbar).
Moreover, it could be super to have the possibility to add an image beside the text (caption) of this button.

Maileen

Cor Ligthert wrote:
Maileen,

What was the answer that didn't satisfy you, that would explain more than only telling that it did not statisfy you, without that we know what it
was.

Cor

"Maileen" <no****@email.com>
...

Hi,

I asked few days ago about a flat button control under VB.NET but answerdidn't satisfy me.

I know that a such button existed under VB6 so it should exist under
VB.NET also.

Where can i find this Flat button control ? COM, ActiveX ?

thanks a lot,
Maileen

Nov 21 '05 #7

"Maileen" <no****@email.com> wrote
Ok, i should precised that i don't want this type of flat button because
it just make ablack border to my button...

I would like to have in fact, the button type that :

1. when mouse pointer is not on button, button is completly flat
2. when mouse pointer is over button, button style is raised

absolutely like button on Toolbar or Coolbar


You could handle it yourself, and maybe wrap up the code in a
user control (for re-use). The code below isn't all you need, but
it should get you started....

Add a label to a new form and paste in the code below:

HTH
LFS
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Label1.ImageAlign = ContentAlignment.MiddleLeft
Label1.TextAlign = ContentAlignment.MiddleRight
Label1.Image = Me.Icon.ToBitmap
Label1.BorderStyle = BorderStyle.None
Label1.Size = New Size(70, 34)
Label1.Text = "Button "
End Sub
Private Sub Label1_MouseEnter(ByVal sender As Object, ByVal e As System.EventArgs) Handles Label1.MouseEnter
Dim Grx As Graphics = Me.CreateGraphics
ControlPaint.DrawBorder3D(Grx, New Rectangle(Label1.Left - 2, Label1.Top - 2, Label1.Width + 4, Label1.Height + 4),
Border3DStyle.RaisedInner)
Grx.Dispose()
End Sub

Private Sub Label1_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles Label1.MouseLeave
Dim Grx As Graphics = Me.CreateGraphics
ControlPaint.DrawBorder(Grx, New Rectangle(Label1.Left - 2, Label1.Top - 2, Label1.Width + 4, Label1.Height + 4),
SystemColors.Control, ButtonBorderStyle.Solid)
Grx.Dispose()
End Sub

Private Sub Label1_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles
Label1.MouseDown
Dim Grx As Graphics = Me.CreateGraphics
ControlPaint.DrawBorder3D(Grx, New Rectangle(Label1.Left - 2, Label1.Top - 2, Label1.Width + 4, Label1.Height + 4),
Border3DStyle.SunkenOuter)
Grx.Dispose()
End Sub

Private Sub Label1_MouseUp(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Label1.MouseUp
Dim Grx As Graphics = Me.CreateGraphics
ControlPaint.DrawBorder3D(Grx, New Rectangle(Label1.Left - 2, Label1.Top - 2, Label1.Width + 4, Label1.Height + 4),
Border3DStyle.RaisedInner)
Grx.Dispose()
End Sub

Nov 21 '05 #8

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

Similar topics

5
by: Bruce W...1 | last post by:
How does one make a flat-looking button or text field? That is with no bevelled edges, maybe just a thin line on the edge? I know you can do it with Macromedia Flash but there must be other...
1
by: Wilhelm Kutting | last post by:
hello, i have the following html. I like to have standard submit-Buttons and no flat ones. The problem is that i cannot reset the border value for input completely. The flat button remains. is...
0
by: JJay | last post by:
My application is written in C# and has several dialog Windows Forms. All button objects on all forms are using FlatStyle=Flat. I have background colors on each button and tool-tips describing...
3
by: Jason Kyle Baginski | last post by:
Here's a little test app to demonstrate a problem I'm having. It creates four buttons, each one with the different FlatStyle types available. Three of them behave exactly the same way(and the...
0
by: Tamir Khason | last post by:
Strange problem here (of maybe out-of-behaviour). so this going like this: I have a toolbar, just regalar toolbar and I have buttons (some with text and icon, some with text only and some with icon...
7
by: redneon | last post by:
Is it possible to change the border colour of a button whos FlatStyle is set to Flat? It's be nice to be able to change the width of the border too. Any ideas? Darrell
1
by: Maileen | last post by:
Hi, I would like to know where can i find the button control with these features : - flat like in VS.NET on toolbar - including image + text as caption. I know this component exist but under...
2
by: Don | last post by:
I've looked high and low for some code that will allow me to have a combobox with a flat borderstyle. I found a few examples, but nothing that was really usable for me. I had the following...
15
by: lxyone | last post by:
Using a flat file containing table names, fields, values whats the best way of creating html pages? I want control over the html pages ie 1. layout 2. what data to show 3. what controls to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...
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...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.