Very kind my friend.
Here is a list of what i would like to accomplish (if possible)
Custom Picturebox desires
-CaptionPlacement (Top or Bottom of Image)
• (Would like to do the following shapes if possible with the above BorderItems)
• Shapes (picturebox) **see the current function for rounded corners below**
‘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.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)
In the Moment I don't see the wuestion in it - but ... when I understood right I made something similar with a Label.
This Label could have also different shapes - (Rounded, Rectangle, Phased, Raised, Sunken and so on).
If you want to do this you should create for each shape an own method which draw it - like you have done for the Rounded part.
The Selection of the Shapes is an Enum which can also easily placed on a Property. Based on this Enum-Property you select the Shape-Painting inside the OnPaint-Method. At the End the OnPaint-Method will become a very big one ...
What we can do, if there are questions or need for discussion, is : you send me the code and I take a look and/or make changes ...
Got it. Took a bit to understand what you meant. I placed some fields on the form, enter some data, x, y locations and button. it prints the text at x,y on the image. Now i can add rest of properties to do forecolor, backcolor, font etc. for caption text. Again, appreciate your help.
I was wondering if somebody can point me in the right direction on this
- The goal is to detect when a child form is being moved and read out the current position while moving
-I could use a timer to read out the current position - but at this point I have not been able to fire an event that indicates the form being moved or not ( grabbed by the tool bar that is)
This is just a normal form with standard close minimize / maximize buttons (Not that that should make a difference I assume)
That means there is no code "wiring-up" the event handler.
If you're looking at the position of Form2 from inside Form1 code, you have to "wire up" the event yourself. If you're only looking at the position of Form2 inside Form2 code, the event isn't getting wired up in the Designer code.
I have a table layout panel that is dynamically populating a user control into a table panel layout.
The user control has a picturebox and a few text fields.
Loading the svg literally takes 2-3 seconds for each user control with the picture box to display.
The file sizes are only 2kb to 20 kb.
I've tried chnaging the sizemode property on the picturebox, but it acts the same no matter what.
I can step through the code and there is no delay at the Load step.
Any ideas why this is happening and how to speed this up?
Dim pp = New ProjectPart
pp.PictureBox.ImageLocation = strFileName
pp.CheckBox.Text = PartPlastic_ID
pp.ComboBox.Text = PartPlastic_Status
pp.TextBoxPN.Text = PartPlastic_PartNumber
pp.TextBoxType.Text = PartPlastic_Type
'Add to TablePanelLayout
TlpCustomerParts.Controls.Add(pp, currentcolumn, currentrow)
Try it with .png. If it's faster, than you know the .svg is slower (because it's a "draw command" file and not an "image").
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
i have been using cliwrap for running git commands and passing the arguments. But it seems to have failed while running my msbuild command from my c# console application.
What i am trying-
var stdOutSetup = new StringBuilder();
var stdErrSetup = new StringBuilder();
var Setup = await Cli.Wrap("msbuild")
.WithArguments("/t:scmclean && /t:setup")
var stdOut2 = stdOutSetup.ToString();
var stdErr2 = stdErrSetup.ToString();