Click here to Skip to main content
15,796,886 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: Properties on Custom Control Pin
Ralf Meier1-Apr-23 23:46
professionalRalf Meier1-Apr-23 23:46 
AnswerRe: Properties on Custom Control Pin
Ralf Meier2-Apr-23 0:29
professionalRalf Meier2-Apr-23 0:29 
GeneralRe: Properties on Custom Control Pin
robert112-Apr-23 3:15
robert112-Apr-23 3:15 
GeneralRe: Properties on Custom Control Pin
Ralf Meier2-Apr-23 3:20
professionalRalf Meier2-Apr-23 3:20 
GeneralRe: Properties on Custom Control Pin
Ralf Meier2-Apr-23 3:23
professionalRalf Meier2-Apr-23 3:23 
GeneralRe: Properties on Custom Control Pin
robert112-Apr-23 3:32
robert112-Apr-23 3:32 
GeneralRe: Properties on Custom Control Pin
Ralf Meier2-Apr-23 4:12
professionalRalf Meier2-Apr-23 4:12 
GeneralRe: Properties on Custom Control Pin
robert112-Apr-23 5:33
robert112-Apr-23 5: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 6:19
professionalRalf Meier2-Apr-23 6:19 
GeneralMessage Closed Pin
2-Apr-23 6:36
robert112-Apr-23 6:36 
SuggestionRe: Properties on Custom Control Pin
Ralf Meier2-Apr-23 6:42
professionalRalf Meier2-Apr-23 6:42 
GeneralRe: Properties on Custom Control Pin
Eddy Vluggen1-Apr-23 13:20
professionalEddy Vluggen1-Apr-23 13:20 
GeneralRe: Properties on Custom Control Pin
robert111-Apr-23 13:34
robert111-Apr-23 13:34 
GeneralRe: Properties on Custom Control Pin
Eddy Vluggen1-Apr-23 14:13
professionalEddy Vluggen1-Apr-23 14:13 
GeneralRe: Properties on Custom Control Pin
robert111-Apr-23 14:47
robert111-Apr-23 14:47 
GeneralRe: Properties on Custom Control Pin
robert111-Apr-23 15:19
robert111-Apr-23 15:19 
PraiseRe: Properties on Custom Control Pin
Eddy Vluggen1-Apr-23 16:04
professionalEddy Vluggen1-Apr-23 16:04 
GeneralRe: Properties on Custom Control Pin
Ralf Meier1-Apr-23 23:56
professionalRalf Meier1-Apr-23 23:56 
GeneralRe: Properties on Custom Control Pin
Eddy Vluggen2-Apr-23 0:57
professionalEddy Vluggen2-Apr-23 0:57 
GeneralRe: Properties on Custom Control Pin
Ralf Meier2-Apr-23 1:04
professionalRalf Meier2-Apr-23 1:04 
GeneralRe: Properties on Custom Control Pin
Ralf Meier2-Apr-23 1:05
professionalRalf Meier2-Apr-23 1:05 
QuestionDetecting when a child form is being moved Pin
Georg Kohler25-Mar-23 9:48
Georg Kohler25-Mar-23 9:48 
AnswerRe: Detecting when a child form is being moved Pin
Dave Kreskowiak25-Mar-23 19:13
mveDave Kreskowiak25-Mar-23 19:13 
GeneralRe: Detecting when a child form is being moved Pin
Georg Kohler26-Mar-23 9:31
Georg Kohler26-Mar-23 9:31 
GeneralRe: Detecting when a child form is being moved Pin
Dave Kreskowiak26-Mar-23 11:15
mveDave Kreskowiak26-Mar-23 11: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.