I've noticed that a lot of programs have began to use a "softer" windows form. By that I mean the caption bar has lighter, softer colors and the corners are more rounded
How do you go about getting that look in a Visual Basic application? (v6 or .NET
Thanks~ 16 1537
* "=?Utf-8?B?SWNlZENyb3c=?=" <ch********@aol.com> scripsit: I've noticed that a lot of programs have began to use a "softer" windows form. By that I mean the caption bar has lighter, softer colors and the corners are more rounded.
I have never seen such an application.
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
if you mean forms like Roxio's CD-Creator 6 has, that's all custom drawn.
"IcedCrow" <ch********@aol.com> wrote in message
news:C7**********************************@microsof t.com... I've noticed that a lot of programs have began to use a "softer" windows
form. By that I mean the caption bar has lighter, softer colors and the
corners are more rounded. How do you go about getting that look in a Visual Basic application? (v6
or .NET) Thanks~
To get rounded corners try the following code in a module (.bas): [VB6
Private Declare Function GetWindowRect Lib "user32" (ByVal hWnd As Long, lpRect As RECT) As Lon
Private Declare Function SetWindowRgn Lib "user32" (ByVal hWnd As Long, ByVal hRgn As Long, ByVal bRedraw As Boolean) As Lon
Private Declare Function CombineRgn Lib "gdi32" (ByVal hDestRgn As Long, ByVal hSrcRgn1 As Long, ByVal hSrcRgn2 As Long, ByVal nCombineMode As Long) As Lon
Private Declare Function CreateEllipticRgn Lib "gdi32" (ByVal X1 As Long, ByVal Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long) As Lon
Private Declare Function CreatePolygonRgn Lib "gdi32" (lpPoint As POINTAPI, ByVal nCount As Long, ByVal nPolyFillMode As Long) As Lon
Private Type POINTAP
X As Lon
Y As Lon
End Typ
Private Type REC
Left As Lon
Top As Lon
Right As Lon
Bottom As Lon
End Typ
Public Function RndRect(ByVal hWnd As Long, ByVal Arc As Long, Optional ByVal Redraw As Boolean = True) As Lon
' Written By: COD3B453 [co******@hotmail.com
' Legal: This comment MUST remain in this code snippe
' Description: Set window region so that it has rounded corner
Dim PointRgn(0 To 7) As POINTAP
Dim PolyRgn As Lon
Dim CircA As Lon
Dim CircB As Lon
Dim CircC As Lon
Dim CircD As Lon
Dim lArc As Lon
Dim W As Lon
Dim H As Lon
Dim wRect As REC
lArc = 2 * Ar
GetWindowRect hWnd, wRec
W = wRect.Right - wRect.Lef
H = wRect.Bottom - wRect.To
PointRgn(0).X = Ar
PointRgn(0).Y =
PointRgn(1).X = W - Ar
PointRgn(1).Y =
PointRgn(2).X =
PointRgn(2).Y = Ar
PointRgn(3).X =
PointRgn(3).Y = H - Ar
PointRgn(4).X = W - Ar
PointRgn(4).Y =
PointRgn(5).X = Ar
PointRgn(5).Y =
PointRgn(6).X =
PointRgn(6).Y = H - Ar
PointRgn(7).X =
PointRgn(7).Y = Ar
PolyRgn = CreatePolygonRgn(PointRgn(0), 8, 1
CircA = CreateEllipticRgn(0, 0, lArc, lArc
CircB = CreateEllipticRgn(W, 0, W - lArc, lArc
CircC = CreateEllipticRgn(W, H, W - lArc, H - lArc
CircD = CreateEllipticRgn(0, H, lArc, H - lArc
CombineRgn PolyRgn, PolyRgn, CircA,
CombineRgn PolyRgn, PolyRgn, CircB,
CombineRgn PolyRgn, PolyRgn, CircC,
CombineRgn PolyRgn, PolyRgn, CircD,
RndRect = SetWindowRgn(hWnd, PolyRgn, Redraw
End Functio
NOTE
'hWnd' should be the form's hwnd propert
'Arc' should be the radius of the curved corners in pixel
'Redraw' is optional and doesn't really matter too muc
Changing the colour of the caption bar is much harder, using the SetDIBitsToDevice API can do this but you have to override the window process for the form so that it doesn't draw the default one back on it
good luc
cod3b453
Not having run anything that I've developed in XP I'm guessing, but are you
talking about just the standard XP 'look'?
"IcedCrow" <ch********@aol.com> wrote in message
news:C7**********************************@microsof t.com... I've noticed that a lot of programs have began to use a "softer" windows
form. By that I mean the caption bar has lighter, softer colors and the
corners are more rounded. How do you go about getting that look in a Visual Basic application? (v6
or .NET) Thanks~
Perhaps its even the new Microsoft Office look...
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:c6************@ID-208219.news.uni-berlin.de... * "=?Utf-8?B?SWNlZENyb3c=?=" <ch********@aol.com> scripsit: I've noticed that a lot of programs have began to use a "softer" windows form. By that I mean the caption bar has lighter, softer colors and the corners are more rounded.
I have never seen such an application.
-- Herfried K. Wagner [MVP] <URL:http://dotnet.mvps.org/>
* "CJ Taylor" <[cege] at [tavayn] dit commmmm> scripsit: Perhaps its even the new Microsoft Office look...
This look still doesn't change the border and buttons of a form.
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
*Perhaps*
I don't know what else to suggest. =)
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:c6************@ID-208219.news.uni-berlin.de... * "CJ Taylor" <[cege] at [tavayn] dit commmmm> scripsit: Perhaps its even the new Microsoft Office look...
This look still doesn't change the border and buttons of a form.
-- Herfried K. Wagner [MVP] <URL:http://dotnet.mvps.org/>
Check out the new Yahoo Messager (Beta) for an example. The borders are rounded, the buttons are rounded, the colors softer
I am running windows 2000 at work so it's not an XP thing, though I notice XP has this as well.
I just realized maybe it's not good for me to comment on colors given that
I'm color blind and all. ;)
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:c6************@ID-208219.news.uni-berlin.de... * "CJ Taylor" <[cege] at [tavayn] dit commmmm> scripsit: Perhaps its even the new Microsoft Office look...
This look still doesn't change the border and buttons of a form.
-- Herfried K. Wagner [MVP] <URL:http://dotnet.mvps.org/>
* "=?Utf-8?B?SWNlZENyb3c=?=" <an*******@discussions.microsoft.com> scripsit: Check out the new Yahoo Messager (Beta) for an example. The borders are rounded, the buttons are rounded, the colors softer.
I am running windows 2000 at work so it's not an XP thing, though I notice XP has this as well.
I think these applications will use their own UI frameworks.
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Surely that makes you better placed than most? Which is the most useful
feedback about a UI?
"I like the colours."
"I don't like the colours."
"What UI?"
"CJ Taylor" <[cege] at [tavayn] dit commmmm> wrote in message
news:%2****************@TK2MSFTNGP10.phx.gbl... I just realized maybe it's not good for me to comment on colors given that I'm color blind and all. ;)
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message news:c6************@ID-208219.news.uni-berlin.de... * "CJ Taylor" <[cege] at [tavayn] dit commmmm> scripsit: Perhaps its even the new Microsoft Office look...
This look still doesn't change the border and buttons of a form.
-- Herfried K. Wagner [MVP] <URL:http://dotnet.mvps.org/>
http://www.dotnetpowertools.com/PerfectForm.aspx
Don't know if you seen this UI framework for sale. I looked at it, looks
kinda intersting. =)
-CJ
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:c6************@ID-208219.news.uni-berlin.de... * "=?Utf-8?B?SWNlZENyb3c=?=" <an*******@discussions.microsoft.com>
scripsit: Check out the new Yahoo Messager (Beta) for an example. The borders are
rounded, the buttons are rounded, the colors softer. I am running windows 2000 at work so it's not an XP thing, though I
notice XP has this as well. I think these applications will use their own UI frameworks.
-- Herfried K. Wagner [MVP] <URL:http://dotnet.mvps.org/>
Hi Iced,
I thought I did not see *region* in this thread, do not know if you want it,
however maybe it gives you an idea.
Cor
\\\made by Herfried. K. Wagner, Fergus Cooney and Cor Ligthert
Private WithEvents button1 As New Button
Private Sub Form1_Load(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Dim g As New System.Drawing.Drawing2D.GraphicsPath
g.AddString( _
"Iced", _
System.Drawing.FontFamily.GenericSansSerif, _
System.Drawing.FontStyle.Bold, _
200, _
New Point(0, 0), _
System.Drawing.StringFormat.GenericDefault _
)
Me.BackColor = Color.Red
Me.Region = New System.Drawing.Region(g)
g.Dispose()
Me.AutoScaleBaseSize = New System.Drawing.Size(0, 0)
Me.ClientSize = New System.Drawing.Size(800, 200)
button1.BackColor = System.Drawing.SystemColors.ActiveCaptionText
button1.ForeColor = System.Drawing.Color.Black
button1.Location = New System.Drawing.Point(50, 40)
button1.Size = New System.Drawing.Size(20, 20)
Me.Controls.Add(button1)
button1.Text = "X"
End Sub
Private Sub Button1_Click(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles button1.Click
Me.Close()
End Sub
///
* "CJ Taylor" <cege at the123 dont use this part till here tavayn dot com> scripsit: http://www.dotnetpowertools.com/PerfectForm.aspx
Don't know if you seen this UI framework for sale. I looked at it, looks kinda intersting. =)
I missed screenshots on the website...
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:c6************@ID-208219.news.uni-berlin.de... * "CJ Taylor" <cege at the123 dont use this part till here tavayn dot com>
scripsit: http://www.dotnetpowertools.com/PerfectForm.aspx
Don't know if you seen this UI framework for sale. I looked at it,
looks kinda intersting. =)
I missed screenshots on the website...
Yes.. less the screenshots... it looked good.
=)
-- Herfried K. Wagner [MVP] <URL:http://dotnet.mvps.org/>
* "CJ Taylor" <[cege] at [tavayn] dit commmmm> scripsit: http://www.dotnetpowertools.com/PerfectForm.aspx
Don't know if you seen this UI framework for sale. I looked at it, looks kinda intersting. =)
I missed screenshots on the website...
Yes.. less the screenshots... it looked good.
=)
Even for color-blind :-).
--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/> This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Greg Bacchus |
last post by:
Hi, I'm getting an exception that really has me stumped. It's sporadic
at best, it's only happened a handful of times.
This particular time it happened when the user pressed 'Alt-S' to save
the...
|
by: Wiktor Zychla |
last post by:
today we've found a critical issue regarding the ListView from
Windows.Forms. it was confirmed on several machines with Win2K and XP.
here's the problem: create a ListView with about 50000 rows....
|
by: Tyler Foreman |
last post by:
Hello,
I have a strange problem that occurs every so often in my
application. It usually takes place when I hide one form
and activate another. What happens is I get the
following exception:...
|
by: Scott Davies |
last post by:
Hi,
I'm looking for some help on a small program that I'm trying to develop in
VB.NET. I'm having trouble getting the code that I've written to work, can
anyone shed some light as to where I'm...
|
by: Scott Davies |
last post by:
Hi,
I'm looking for some help on a small program that I'm trying to develop in
VB.NET.
The program I'm trying to develop needs to be able to do the following:
- Select remote server
-...
| |
by: Rod Gill |
last post by:
Hi,
I have a form that when opened in the designer appears of the screen. The
form selector can't be dragged (or resized) and if I scroll right and down
to centralise it the form simply jumps...
|
by: tshad |
last post by:
What would be a good way to check programmatically whether a service was
running?
We have a service that dies periodically and I need to check to see if this
service is running. I know how to...
|
by: mfunkmann |
last post by:
Hi,
I recently got an error and I don't know how to fix it:
Error 1 'System.Data.DataColumn' does not contain a definition for
'Windows' C:\c#\CsharpPRO\Form1.Designer.cs 304 77 CsharpPRO
I...
|
by: Dan Tallent |
last post by:
In my application I have a form (Customer) that I want to be able to open
multiple copies at once. Within this form I have other forms that can be
opened. Example: ZipCode. When the user enters...
|
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...
|
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,...
| |
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...
|
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...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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 ...
| |
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...
| |