Click here to Skip to main content
15,881,709 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Properties on Custom Control Pin
Ralf Meier1-Apr-23 22:46
mveRalf Meier1-Apr-23 22:46 
AnswerRe: Properties on Custom Control Pin
Ralf Meier1-Apr-23 23:29
mveRalf Meier1-Apr-23 23:29 
GeneralRe: Properties on Custom Control Pin
robert112-Apr-23 2:15
robert112-Apr-23 2:15 
GeneralRe: Properties on Custom Control Pin
Ralf Meier2-Apr-23 2:20
mveRalf Meier2-Apr-23 2:20 
GeneralRe: Properties on Custom Control Pin
Ralf Meier2-Apr-23 2:23
mveRalf Meier2-Apr-23 2:23 
GeneralRe: Properties on Custom Control Pin
robert112-Apr-23 2:32
robert112-Apr-23 2:32 
GeneralRe: Properties on Custom Control Pin
Ralf Meier2-Apr-23 3:12
mveRalf Meier2-Apr-23 3:12 
GeneralRe: Properties on Custom Control Pin
robert112-Apr-23 4:33
robert112-Apr-23 4:33 
Very kind my friend.
Here is a list of what i would like to accomplish (if possible)
Custom Picturebox desires
Properties
-BorderItems(heading)
-BorderColor
-BorderColor2
-BorderCapStyle
-BorderGradientAngle
-BorderLineStyle
-BorderSize
-BorderStyle
-CaptionText(heading)
-CaptoinBackColor
-CaptionForeColor
-CaptionFont
-CaptionLocation
-CaptionPlacement (Top or Bottom of Image)
-CaptionText

• (Would like to do the following shapes if possible with the above BorderItems)
• Shapes (picturebox) **see the current function for rounded corners below**
o Hexagon
o Oval
o Round
o RoundCorners
o Square
VB

‘Change to rounded corners, let user pick size and color, currently how i do this in my program now.
'get the current image
Dim StartImage As Image = tmpImage
Dim RoundedImage As Image = ClsPicShapes.RoundCorners(StartImage, value, .ColorBoarders.Color)
Public Shared Function RoundCorners(ByVal StartImage As Image, ByVal CornerRadius As Single, ByVal BackgroundColor As Color) As Image
CornerRadius = (CornerRadius * 2)
Dim RoundedImage As Bitmap = New Bitmap(StartImage.Width, StartImage.Height)
Dim g As Graphics = Graphics.FromImage(RoundedImage)
g.Clear(BackgroundColor)
g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.HighQualityBilinear
g.CompositingQuality = System.Drawing.Drawing2D.CompositingQuality.HighQuality
g.PixelOffsetMode = System.Drawing.Drawing2D.PixelOffsetMode.HighQuality
g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias
Dim brush As Brush = New TextureBrush(StartImage)
Dim gp As GraphicsPath = New GraphicsPath
gp.AddArc(0, -1, CornerRadius, CornerRadius, 180, 90)
gp.AddArc((-1 + (RoundedImage.Width - CornerRadius)), -1, CornerRadius, CornerRadius, 270, 90)
gp.AddArc((-1 + (RoundedImage.Width - CornerRadius)), (-1 _
+ (RoundedImage.Height - CornerRadius)), CornerRadius, CornerRadius, 0, 90)
gp.AddArc(0, (-1 + (RoundedImage.Height - CornerRadius)), CornerRadius, CornerRadius, 90, 90)
g.FillPath(brush, gp)
Return RoundedImage
End Function

GeneralRe: Properties on Custom Control Pin
Ralf Meier2-Apr-23 5:19
mveRalf Meier2-Apr-23 5:19 
GeneralMessage Closed Pin
2-Apr-23 5:36
robert112-Apr-23 5:36 
SuggestionRe: Properties on Custom Control Pin
Ralf Meier2-Apr-23 5:42
mveRalf Meier2-Apr-23 5:42 
GeneralRe: Properties on Custom Control Pin
Eddy Vluggen1-Apr-23 12:20
professionalEddy Vluggen1-Apr-23 12:20 
GeneralRe: Properties on Custom Control Pin
robert111-Apr-23 12:34
robert111-Apr-23 12:34 
GeneralRe: Properties on Custom Control Pin
Eddy Vluggen1-Apr-23 13:13
professionalEddy Vluggen1-Apr-23 13:13 
GeneralRe: Properties on Custom Control Pin
robert111-Apr-23 13:47
robert111-Apr-23 13:47 
GeneralRe: Properties on Custom Control Pin
robert111-Apr-23 14:19
robert111-Apr-23 14:19 
PraiseRe: Properties on Custom Control Pin
Eddy Vluggen1-Apr-23 15:04
professionalEddy Vluggen1-Apr-23 15:04 
GeneralRe: Properties on Custom Control Pin
Ralf Meier1-Apr-23 22:56
mveRalf Meier1-Apr-23 22:56 
GeneralRe: Properties on Custom Control Pin
Eddy Vluggen1-Apr-23 23:57
professionalEddy Vluggen1-Apr-23 23:57 
GeneralRe: Properties on Custom Control Pin
Ralf Meier2-Apr-23 0:04
mveRalf Meier2-Apr-23 0:04 
GeneralRe: Properties on Custom Control Pin
Ralf Meier2-Apr-23 0:05
mveRalf Meier2-Apr-23 0:05 
QuestionDetecting when a child form is being moved Pin
Georg Kohler25-Mar-23 8:48
Georg Kohler25-Mar-23 8:48 
AnswerRe: Detecting when a child form is being moved Pin
Dave Kreskowiak25-Mar-23 18:13
mveDave Kreskowiak25-Mar-23 18:13 
GeneralRe: Detecting when a child form is being moved Pin
Georg Kohler26-Mar-23 8:31
Georg Kohler26-Mar-23 8:31 
GeneralRe: Detecting when a child form is being moved Pin
Dave Kreskowiak26-Mar-23 10:15
mveDave Kreskowiak26-Mar-23 10:15 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.