473,698 Members | 2,690 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3353
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.c om>
...
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.c om>
...
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.c om> 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.c om> > 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.c om>
...
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.c om> 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******** ********@TK2MSF TNGP10.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.c om> > 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.c om>
...

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.c om> 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(ByVa l sender As System.Object, ByVal e As System.EventArg s) Handles MyBase.Load
Label1.ImageAli gn = ContentAlignmen t.MiddleLeft
Label1.TextAlig n = ContentAlignmen t.MiddleRight
Label1.Image = Me.Icon.ToBitma p
Label1.BorderSt yle = BorderStyle.Non e
Label1.Size = New Size(70, 34)
Label1.Text = "Button "
End Sub
Private Sub Label1_MouseEnt er(ByVal sender As Object, ByVal e As System.EventArg s) Handles Label1.MouseEnt er
Dim Grx As Graphics = Me.CreateGraphi cs
ControlPaint.Dr awBorder3D(Grx, New Rectangle(Label 1.Left - 2, Label1.Top - 2, Label1.Width + 4, Label1.Height + 4),
Border3DStyle.R aisedInner)
Grx.Dispose()
End Sub

Private Sub Label1_MouseLea ve(ByVal sender As Object, ByVal e As System.EventArg s) Handles Label1.MouseLea ve
Dim Grx As Graphics = Me.CreateGraphi cs
ControlPaint.Dr awBorder(Grx, New Rectangle(Label 1.Left - 2, Label1.Top - 2, Label1.Width + 4, Label1.Height + 4),
SystemColors.Co ntrol, ButtonBorderSty le.Solid)
Grx.Dispose()
End Sub

Private Sub Label1_MouseDow n(ByVal sender As Object, ByVal e As System.Windows. Forms.MouseEven tArgs) Handles
Label1.MouseDow n
Dim Grx As Graphics = Me.CreateGraphi cs
ControlPaint.Dr awBorder3D(Grx, New Rectangle(Label 1.Left - 2, Label1.Top - 2, Label1.Width + 4, Label1.Height + 4),
Border3DStyle.S unkenOuter)
Grx.Dispose()
End Sub

Private Sub Label1_MouseUp( ByVal sender As Object, ByVal e As System.Windows. Forms.MouseEven tArgs) Handles Label1.MouseUp
Dim Grx As Graphics = Me.CreateGraphi cs
ControlPaint.Dr awBorder3D(Grx, New Rectangle(Label 1.Left - 2, Label1.Top - 2, Label1.Width + 4, Label1.Height + 4),
Border3DStyle.R aisedInner)
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
14590
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 ways. I know you could use an image button but this wouldn't have any client-side behavior like hover or mouse down. I have just about every cool software tool available. I'm just not sure of the best angle to attack this problem.
1
3025
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 there something i can do about it? <style type="text/css">
0
1357
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 the use of each button. The forms are all instantiated at start-up, but only the main form is displayed (the other sub-forms need time to access resources on initial load, so they are instantiated early, shown only when needed, and not destroyed...
3
5135
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 way I'd anticipate), but the FlatStyle.System one does not. If you click on any of the buttons, use the enter key, or the spacebar, they will bring up a messagebox that says "Activate". Except the FlatStyle.System one, which will bring up _two_...
0
1432
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 only). The settings for toolbar (diferent from defauts are: Apperarance: Flat, Button size :height 16, TextAlign Right) I want toolbar 9and I know it CAN) to resize each button width according the icon+text in it, BUT this boes not works. All...
7
13899
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
1253
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 which COM or activex ? thx, Maileen
2
6198
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 criteria that I wanted to meet, but nothing did: - No reliance on a separate library - No unmanaged code - Easy subclassing of System.Windows.Forms.Combobox (i.e. no custom control monstrosity) - No extra funky features that I didn't need
15
5269
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 show - text boxes, input boxes, buttons, hyperlinks ie the usual. The data is not obtained directly from a database.
0
8609
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
9170
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
8871
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
5862
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
4371
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4622
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3052
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2336
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2007
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.