I am looking for a way in vb.net to take a form with sharp corners and just
round off the corners a bit so they arent so sharp.
I have seen this done in other applications. 18 42229
Put a panel on the form and then make the form tranparent. You can add the
controls over the panel.
OHM
Mike D wrote: I am looking for a way in vb.net to take a form with sharp corners and just round off the corners a bit so they arent so sharp.
I have seen this done in other applications.
* "Mike D" <di****@hotmail .com> scripsit: I am looking for a way in vb.net to take a form with sharp corners and just round off the corners a bit so they arent so sharp.
I have seen this done in other applications.
Quick and dirty:
\\\
Me.FormBorderSt yle = FormBorderStyle .None
Me.Height = 300
Me.Width = 400
Dim p As New Drawing2D.Graph icsPath()
p.StartFigure()
p.AddArc(New Rectangle(0, 0, 40, 40), 180, 90)
p.AddLine(40, 0, Me.Width - 40, 0)
p.AddArc(New Rectangle(Me.Wi dth - 40, 0, 40, 40), -90, 90)
p.AddLine(Me.Wi dth, 40, Me.Width, Me.Height - 40)
p.AddArc(New Rectangle(Me.Wi dth - 40, Me.Height - 40, 40, 40), 0, 90)
p.AddLine(Me.Wi dth - 40, Me.Height, 40, Me.Height)
p.AddArc(New Rectangle(0, Me.Height - 40, 40, 40), 90, 90)
p.CloseFigure()
Me.Region = New Region(p)
Me.BackColor = Color.Red
///
--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Forget my post, it was untested and simply incorrect.
Sorry - OHM
One Handed Man wrote: Put a panel on the form and then make the form tranparent. You can add the controls over the panel.
OHM Mike D wrote: I am looking for a way in vb.net to take a form with sharp corners and just round off the corners a bit so they arent so sharp.
I have seen this done in other applications.
WOW. I was thinking that there was something quick and simple. But I highly
appreciate the technical approach, Realizing that all things dont come in
quick and dirty flavors
"Herfried K. Wagner [MVP]" <hi************ ***@gmx.at> wrote in message
news:bp******** *****@ID-208219.news.uni-berlin.de... * "Mike D" <di****@hotmail .com> scripsit: I am looking for a way in vb.net to take a form with sharp corners and
just round off the corners a bit so they arent so sharp.
I have seen this done in other applications.
Quick and dirty:
\\\ Me.FormBorderSt yle = FormBorderStyle .None Me.Height = 300 Me.Width = 400 Dim p As New Drawing2D.Graph icsPath() p.StartFigure() p.AddArc(New Rectangle(0, 0, 40, 40), 180, 90) p.AddLine(40, 0, Me.Width - 40, 0) p.AddArc(New Rectangle(Me.Wi dth - 40, 0, 40, 40), -90, 90) p.AddLine(Me.Wi dth, 40, Me.Width, Me.Height - 40) p.AddArc(New Rectangle(Me.Wi dth - 40, Me.Height - 40, 40, 40), 0, 90) p.AddLine(Me.Wi dth - 40, Me.Height, 40, Me.Height) p.AddArc(New Rectangle(0, Me.Height - 40, 40, 40), 90, 90) p.CloseFigure() Me.Region = New Region(p) Me.BackColor = Color.Red ///
-- Herfried K. Wagner [MVP] <http://www.mvps.org/dotnet>
What does the 'P' reffence? I am doing this in vb.net if that helps any?
"Herfried K. Wagner [MVP]" <hi************ ***@gmx.at> wrote in message
news:bp******** *****@ID-208219.news.uni-berlin.de... * "Mike D" <di****@hotmail .com> scripsit: I am looking for a way in vb.net to take a form with sharp corners and
just round off the corners a bit so they arent so sharp.
I have seen this done in other applications.
Quick and dirty:
\\\ Me.FormBorderSt yle = FormBorderStyle .None Me.Height = 300 Me.Width = 400 Dim p As New Drawing2D.Graph icsPath() p.StartFigure() p.AddArc(New Rectangle(0, 0, 40, 40), 180, 90) p.AddLine(40, 0, Me.Width - 40, 0) p.AddArc(New Rectangle(Me.Wi dth - 40, 0, 40, 40), -90, 90) p.AddLine(Me.Wi dth, 40, Me.Width, Me.Height - 40) p.AddArc(New Rectangle(Me.Wi dth - 40, Me.Height - 40, 40, 40), 0, 90) p.AddLine(Me.Wi dth - 40, Me.Height, 40, Me.Height) p.AddArc(New Rectangle(0, Me.Height - 40, 40, 40), 90, 90) p.CloseFigure() Me.Region = New Region(p) Me.BackColor = Color.Red ///
-- Herfried K. Wagner [MVP] <http://www.mvps.org/dotnet>
froget my last post asking what the 'P' reffrenced. I was trying to first
create a module that I could access from all my forms, However it all
errored out. I placed the code in the form load event and all worked fine.
"Herfried K. Wagner [MVP]" <hi************ ***@gmx.at> wrote in message
news:bp******** *****@ID-208219.news.uni-berlin.de... * "Mike D" <di****@hotmail .com> scripsit: I am looking for a way in vb.net to take a form with sharp corners and
just round off the corners a bit so they arent so sharp.
I have seen this done in other applications.
Quick and dirty:
\\\ Me.FormBorderSt yle = FormBorderStyle .None Me.Height = 300 Me.Width = 400 Dim p As New Drawing2D.Graph icsPath() p.StartFigure() p.AddArc(New Rectangle(0, 0, 40, 40), 180, 90) p.AddLine(40, 0, Me.Width - 40, 0) p.AddArc(New Rectangle(Me.Wi dth - 40, 0, 40, 40), -90, 90) p.AddLine(Me.Wi dth, 40, Me.Width, Me.Height - 40) p.AddArc(New Rectangle(Me.Wi dth - 40, Me.Height - 40, 40, 40), 0, 90) p.AddLine(Me.Wi dth - 40, Me.Height, 40, Me.Height) p.AddArc(New Rectangle(0, Me.Height - 40, 40, 40), 90, 90) p.CloseFigure() Me.Region = New Region(p) Me.BackColor = Color.Red ///
-- Herfried K. Wagner [MVP] <http://www.mvps.org/dotnet>
Nice post - neither quick nor dirty but definitely way cool.
"Herfried K. Wagner [MVP]" <hi************ ***@gmx.at> wrote in message
news:bp******** *****@ID-208219.news.uni-berlin.de... * "Mike D" <di****@hotmail .com> scripsit: I am looking for a way in vb.net to take a form with sharp corners and
just round off the corners a bit so they arent so sharp.
I have seen this done in other applications.
Quick and dirty:
\\\ Me.FormBorderSt yle = FormBorderStyle .None Me.Height = 300 Me.Width = 400 Dim p As New Drawing2D.Graph icsPath() p.StartFigure() p.AddArc(New Rectangle(0, 0, 40, 40), 180, 90) p.AddLine(40, 0, Me.Width - 40, 0) p.AddArc(New Rectangle(Me.Wi dth - 40, 0, 40, 40), -90, 90) p.AddLine(Me.Wi dth, 40, Me.Width, Me.Height - 40) p.AddArc(New Rectangle(Me.Wi dth - 40, Me.Height - 40, 40, 40), 0, 90) p.AddLine(Me.Wi dth - 40, Me.Height, 40, Me.Height) p.AddArc(New Rectangle(0, Me.Height - 40, 40, 40), 90, 90) p.CloseFigure() Me.Region = New Region(p) Me.BackColor = Color.Red ///
-- Herfried K. Wagner [MVP] <http://www.mvps.org/dotnet>
This works but does'nt. If I resize my form. I lose the formatiing. Is there
no way for me to keep the rounded corners when resizing?
"Mike D" <di****@hotmail .com> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. .. I am looking for a way in vb.net to take a form with sharp corners and
just round off the corners a bit so they arent so sharp.
I have seen this done in other applications.
Hi Mike,
Try this:
Me.FormBorderSt yle = FormBorderStyle .None
' this would make the form purely the designated color, without
' the control or windowstate menus and without a caption, drag top, icon,
etc.
Me.Height = 688
Me.Width = 360
Dim p As New Drawing2D.Graph icsPath
p.StartFigure()
p.AddArc(New Rectangle(0, 0, 40, 40), 180, 90)
p.AddLine(40, 0, Me.Width - 40, 0)
p.AddArc(New Rectangle(Me.Wi dth - 40, 0, 40, 40), -90, 90)
p.AddLine(Me.Wi dth, 40, Me.Width, Me.Height - 40)
p.AddArc(New Rectangle(Me.Wi dth - 40, Me.Height - 40, 40, 40), 0, 90)
p.AddLine(Me.Wi dth - 40, Me.Height, 40, Me.Height)
p.AddArc(New Rectangle(0, Me.Height - 40, 40, 40), 90, 90)
p.CloseFigure()
Me.Region = New Region(p)
Me.BackColor = Color.Thistle
HTH,
Bernie Yaeger
"Mike D" <di****@hotmail .com> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. .. I am looking for a way in vb.net to take a form with sharp corners and
just round off the corners a bit so they arent so sharp.
I have seen this done in other applications.
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: reneeccwest |
last post by:
is there any way I can make the 4 end of table with round corner
without using any images?
<table border=1>
<tr><td>I wanna be a round table</td></tr>
</table>
|
by: Kerberos |
last post by:
I haven't found in my CSS book how to create a gradient to fill a division
tag, and to create a border with round corners.
Is it possible using either CSS or JavaScript?
I'd like to create a menu bar with a gradient in the background, and I
want the top corners to be a little round with a 5px radius.
Thanks,
--
Kerberos.
|
by: deepakp |
last post by:
Hi,
I'm trying to create a site index page. The page layout will consist of
a header, left navigation and content display. The left navigation and
content display should look like the image file pasted at the bottom of
this page
http://www.open365test.net/index_test.html
I created a stylesheet for the list items as shown at the top of the
|
by: Barret Bonden |
last post by:
As an old programmer just now looking at VB.net I have a question:
How does one simply open one form from another ? I don't mean how does one
create a new instance of that form , but rather how to refer to THAT form ?
And having done this, how does one get data to and from that form ?
I have read the MS tutorial on this but it is senselessly complex; there
must be a simple, straightforward method, or I can only assume that MS has...
|
by: Nik Coughlin |
last post by:
Something that I've been trying to do for a long time is a 3 column layout
where all three columns have equal height, and have rounded corners
implemented using PNGs with alpha.
One of my early attempts is here:
http://www.nrkn.com/3ColRoundAlpha/
It shows a bunch of different methods that I tried. You'll see that not
only is there a hell of a lot of nesting of divs, but the page is very slow
to load because there are a lot of image...
| |
by: virgil46 |
last post by:
Trying to use niftycube that i downloaded from the web to round corner's on my webpage's. It is not working though. I'm using, "Web Expressions", as my editor.
|
by: todpeeple |
last post by:
Hi
can any one plz tell me urgently... is it possible to make round corners of any box (such as <div>, <span>,<table>, or any box) in asp .net page programatically or declareatively without using the graphic image... if yes then plz send me the code for that...
Regards
Tod
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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,...
|
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...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
| |
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...
|
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...
|
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...
|
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
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |