Search:
Type: Posts; User: boops boops
Search:
Search took 0.10 seconds.
-
Don't use System.Drawing.Bitmap.SetPixel, which is notoriously slow. It has to recreate the bitmap each time a pixel changes.
Instead try the FastPix method in my sig below. Treat the queue as an...
-
Strange to see a response to a message on this thread posted almost 18 years ago!
Still, if it's a matter of finding the nearest point along a curve, which rpgNewbie wanted, it's fairly easy to...
-
Lay off the Easter eggs then.
-
No, I wrote the quoted code myself, 9 years ago. The red colour was just an example of a custom border appropriate to that particular thread. It seems to me that the OP is asking for a standard...
-
I get the impression that Johanna isn't looking for coloured or otherwise fancy border effects, just the standard Fixed3D border. If that's the case, then you don't need the code quoted in post #1...
-
The link explains the difference correctly but never mind, I should think that people understand the intention. What I find more irritating is FD's "miss-understanding". Does that mean a good...
-
Never mind, at least the latest frameworks aren't bamboozling you:wave:. BB
-
I suppose you are aware that both TransparencyKey and Bitmap.MakeTransparent respond only to an exact A, R, G and B combination. If one of these bytes deviates by 1 or more in 256, the rest will...
-
I can't reproduce your problem. I tried .NET Framework 4.8 (VS2019) and 3.5 ClientFramework as well as .NET 6.0 (VS2022). A picture box with a partly transparent BackColor and with a partly...
-
Since you ask for a better way, I suggest that you draw the sine wave just once.
Here's a brief summary of how to do it: draw the sine wave on a bitmap, turn that into a TextureBrush, and use the...
-
The edges of filled shapes (e.g. Ellipses and GraphicsPaths) are in fact antialiased by the appropriate SmoothingModes. See Remarks in MS documentation.
Rectangles won't be aliased anyway, unless...
-
Maybe because they are imposters...?
-
I haven't read all the code in this thread, but I can't help feeling that it's overcomplicated. After all, you can resize an image with one short line of code:
Dim img As New Bitmap(sourceImage,...
-
The the "Me" in form1.Show(Me) is a simple way to make it the Owner of form1.
The owned form is locked in front of the owner (and its child controls) in the Z order, so no other form can come...
-
Leave out the MDIParent and TopMost statements, and add 2 letters to the remaining line:
frm1.Show(Me)
BB
-
Unfortunately, I didn't. My internet connection started playing up. I managed to get one message posted before it packed up altogether and missed your prior posting. I couldn't get it repaired until...
-
Here's a code example using a PictureBox. It produces result that looks to me something like what you wanted in post #1.
In the designer, create a Form (Form1) with a ListBox (ListBox1 with your...
-
The WPF listbox can't easily be activated from the Form. It can be done, and it wouldn't take thousands of lines of new code, but you do need a basic knowledge of XAML and WPF as well as the...
-
If you read the documentation, you may notice that it says under the heading Remarks:
In other words, the ListBox paint event is about as useless as ...
I was going to cite male nipples (vide...
-
Sorry, my mistake.
The WinForms ListBox has been drawing itself in its own obstinate way for the last 20 years, constantly ignoring Paint events and OnPaint subs. And you don't want the...
-
In System.Drawing, it's the parent control - the Form, Panel or other Container - that renders transparency for its child controls. So all you have to do is change the PictureBox's parent to the...
-
PictureBox.SizeMode and Graphics.DrawImage are different ways of displaying the image. The image itself isn't changed by either option. It's just a coincidence that an image drawn with...
-
A possible approach is to take advantage of the WPF Window, which supports partial transparency and hence anti-aliased edges. See my "Shaped Form" step-by-step example in the VB.Net code bank (link...
-
Hi John, you are right. When I posted the last link nearly 3 years ago, I intended move it to post #1 where anyone could find it. But I discovered some errors and never got around to fixing them....
-
Here's another way to do it that would require fewer changes.
Instead of hiding the 'overlay' picturebox, set its background to near total transparency, e.g. alpha=1. As long as the alpha is more...
-
An alternative that also works. It's a little bit more concise even discounting the Debug lines.
Private formAspect As Double
Private formWidth, formHeight As Integer
Private Sub...
-
Your code doesn't even refer to Tags. Instead, you are relying on the PictureBox.Name property. If you've added all the picture boxes in the designer with default names, then maybe looping from 0 to...
-
Did you know that you could omit 4 lines of that code? Namely the radius.AddLines. It's possible because CloseFigure automatically closes any gaps in the path by adding straight lines.
BB
-
Clipping doesn't have to be complicated at all. In the Paint sub, all you have to do is put Graphics.SetClip(rectangle) before drawing the lines. Here's an example using the line and rectangle...
-
There's something still unclear. Do you want to draw only line segments that cross the rectangle completely? Or do you also want to draw line segments that end somewhere inside the clip rectangle?
...
-
As far as I know all code posted in the CodeBank is unlicensed, so you are free use it however you like. if you include the code in a licensed project, it would be polite to add a comment referring...
-
That question applies to any code library, not just ZPLib. And it's not something I know much about. Please address your question to another forum such as Visual Basic .Net or C#.
BB
-
Darned jay walkers. They should stick to the bicycle lanes like they do in Holland.
BB
-
Good idea. It results in a dilation of the original shape (opposite to erosion). That's not quite the same as widening by scaling, but there's nothing hacky about it if it's the effect you want. BB
-
The GraphicsPath.Widen(pen) method does indeed create an outline, not a "solid" shape. For example, if your graphics path shape is a circle, the Widen function will convert the path into a hollow...
-
If you want a single line to fit a certain width, you can just scale the font size. For that, get the width of the string in (say) default font size, and scale it up or down to fit the desired width....
-
To resize an image or bitmap with Graphics.DrawImage, you need the Graphics.InterpolationMode settings. Probably you want
Graphics.InterpolationMode = InterpolationMode.HighQualityBicubic in your...
-
Ýou mean this isn't cyan when you want it to be?
or, as NOPARSE would have it:
You mean this isn't cyan when you want it to be?
BB
-
The Control.GetNextControl function provides a simpler way to iterate through all the child controls and their descendents. Here's an example based on DDay's code above:
Private Sub...
-
Not if there are child controls on the panel (see post #1). But maybe you found another way to solve the problem. BB
|
Click Here to Expand Forum to Full Width
|