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 1501
* "=?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: lllomh |
last post by:
Define the method first
this.state = {
buttonBackgroundColor: 'green',
isBlinking: false, // A new status is added to identify whether the button is blinking or not
}
autoStart=()=>{
|
by: DJRhino |
last post by:
Was curious if anyone else was having this same issue or not....
I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM)
The start time is equivalent to 19:00 (7PM) in Central...
|
by: Aliciasmith |
last post by:
In an age dominated by smartphones, having a mobile app for your business is no longer an option; it's a necessity. Whether you're a startup or an established enterprise, finding the right mobile app...
|
by: tracyyun |
last post by:
Hello everyone,
I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
|
by: giovanniandrean |
last post by:
The energy model is structured as follows and uses excel sheets to give input data:
1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM)
Please note that the UK and Europe revert to winter time on...
|
by: nia12 |
last post by:
Hi there,
I am very new to Access so apologies if any of this is obvious/not clear.
I am creating a data collection tool for health care employees to complete. It consists of a number of...
|
by: NeoPa |
last post by:
Introduction
For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
| |