So wonderful! Can you create an app with multiple edited photos that can be saved as videos? I'm learning how to make a karaoke app but don't know how to save them as videos!
To set a transparent background in a C# Windows Form, you can use the TransparencyKey property of the form. Here's a simple example: public partial class MainForm : Form { public MainForm() { InitializeComponent(); // Set the transparency key to the BackColor of the form this.TransparencyKey = this.BackColor; } private void MainForm_Load(object sender, EventArgs e) { // Set the form's background color to be transparent this.BackColor = Color.Transparent; } } Make sure to set the form's BackColor property to the desired background color and handle any controls or elements accordingly. Keep in mind that transparency might not work perfectly with all controls, so you might need to customize your approach based on your specific requirements.
I want a the paint application to edit photos which should be having these functionalities + text, save, undo, redo and select and drag a shape can u plxx help me
Hey Rohit how i can add the selection shapes the one the paint of microsoft have it the fontion of this is to select cut and paster what you cut in other places plz if you can help me this that
error in BTN_Pic_Color.BackColor = ((Bitmap)Select_color.Image).GetPixel(Punto.X, Punto.X); System.ArgumentOutOfRangeException: ''The parameter must be positive and less than the height. Parameter name: y'
Here's a simple example to illustrate these steps by Rohit programming zone -------------------;---;--- This is a basic example to demonstrate the concept. In a real paint application, you would need to integrate this functionality with your drawing operations and handle various types of actions (e.g., drawing lines, changing colors). --------------- using System; using System.Collections.Generic; class PaintProgram { private Stack undoStack = new Stack(); private Stack redoStack = new Stack(); public void DrawLine() { // Simulated drawing action Console.WriteLine("Drawing a line..."); // Push drawing action onto undo stack undoStack.Push(() => Console.WriteLine("Undo: Erase the line")); // Clear redo stack since new action invalidates future redo operations redoStack.Clear(); } public void Undo() { if (undoStack.Count > 0) { Action undoAction = undoStack.Pop(); undoAction(); // Apply inverse of the action redoStack.Push(undoAction); // Push onto redo stack } else { Console.WriteLine("Nothing to undo."); } } public void Redo() { if (redoStack.Count > 0) { Action redoAction = redoStack.Pop(); redoAction(); // Apply redo action undoStack.Push(redoAction); // Push onto undo stack } else { Console.WriteLine("Nothing to redo."); } } } class Program { static void Main(string[] args) { PaintProgram paintProgram = new PaintProgram(); // Simulate user actions paintProgram.DrawLine(); paintProgram.DrawLine(); paintProgram.Undo(); // Undo one line paintProgram.Redo(); // Redo the undone line } }
private void pictureBox1_Paint(object sender, PaintEventArgs e) { Graphics graphicsCurrent = e.Graphics; int startX = Math.Min(cX, x); int startY = Math.Min(cY, y); int width = Math.Abs(x - cX); int height = Math.Abs(y - cY); if (paint) { if (index == 3) { graphicsCurrent.DrawEllipse(p, cX, cY, sX, sY); } if (index == 4) { graphicsCurrent.DrawLine(p, cX, cY, x, y); } if (index == 5) { graphicsCurrent.DrawRectangle(p, startX, startY, width, height); } } } The DrawRectangle doesnt let you use negative valuess, so you have to use abs for the width and height of the rectangle, hope it helps
Here is an example C# Windows Forms program that creates a pen cursor: Rohit Programming Zone _---+---------------+------_ using System; using System.Drawing; using System.Windows.Forms; namespace PenCursorExample { public partial class Form1 : Form { public Form1() { InitializeComponent(); this.Cursor = CreatePenCursor(); } private Cursor CreatePenCursor() { Bitmap cursorBitmap = new Bitmap(32, 32); Graphics g = Graphics.FromImage(cursorBitmap); g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias; g.FillEllipse(Brushes.Black, 0, 0, 32, 32); g.Dispose(); IntPtr cursorHandle = cursorBitmap.GetHicon(); Cursor cursor = new Cursor(cursorHandle); return cursor; } } } This program creates a 32x32 pixel bitmap that contains a black circle drawn with anti-aliasing, and uses the bitmap to create a new cursor. The CreatePenCursor() method returns a Cursor object that can be set as the form's cursor by assigning it to the Cursor property of the form.
To create a pen cursor in C# for a Windows application, you can use the following code: // Create a new cursor object Cursor penCursor = new Cursor(Properties.Resources.penCursor.GetHicon()); // Set the cursor of the form to the pen cursor this.Cursor = penCursor; In this code, we create a new cursor object from an image resource called "penCursor". We then set the form's cursor to the pen cursor using the Cursor property...
This was the best C# video i have ever seen!
AL CHILE ME SALVAS EL SEMESTRE ERES UN CRACK WEY LIKE Y ME SUSCRIBO GUAPO
Thank you for sharing that type of video with us dear. 👌
3 раз смотрю и удивляюсь 👌
Решение > 👍👍👍👍👍
you saved our school project, thank you 🙏🙏
Glad to hear that!
Excellent
Спасибо тебе, благодарю твоему видео я смогу закрыть лабы в Институте
It is incredible bro...
So wonderful! Can you create an app with multiple edited photos that can be saved as videos? I'm learning how to make a karaoke app but don't know how to save them as videos!
Спасибо большое. Очень познавательно.
Can you Please Post the Project Files I'm having some issues in my build, i want to check
👏👏👏👏👏👏👏👏👏👏👏👏👏👏
Cool Video. Very helpful!!!
wonderfull. thanks.🥇
Thank you so much. I love this video!!!
16:00 for an ellipse
18:00 for dragging graphics
Thank you, I got what I want
when i add image on picturebox icant draw on it how can i be able to draw on it ?
nice!
The best🔥🔥🔥
Like. Can You Even Code a Painting App That Also Can Use Transparent Background for Painting? Like What Works like Krita, IbisPaintX and SketchBook
To set a transparent background in a C# Windows Form, you can use the TransparencyKey property of the form. Here's a simple example:
public partial class MainForm : Form
{
public MainForm()
{
InitializeComponent();
// Set the transparency key to the BackColor of the form
this.TransparencyKey = this.BackColor;
}
private void MainForm_Load(object sender, EventArgs e)
{
// Set the form's background color to be transparent
this.BackColor = Color.Transparent;
}
}
Make sure to set the form's BackColor property to the desired background color and handle any controls or elements accordingly. Keep in mind that transparency might not work perfectly with all controls, so you might need to customize your approach based on your specific requirements.
Can you show how to select part of the drawings then cut, copy and paste?
Please make a tutorial on how to connect it to client side so i can make a live painting program!
Hey guy
I want to ask something
How to select, move, group and ungroup shap in picture box??
What key word i should find?
This was so helpful
thank you for sharing your knowledge with me
Ur welcome...
@@rohitprogrammer I wanna to learning to more in C#. can help me ?
Go through all my videos u will get all ur answers....
@@rohitprogrammer thank's... what ur ever make embroidery software in c# ?
👍
Can we able to paste pictures on the canvas?
Where did you find the color part above?
I want a the paint application to edit photos which should be having these functionalities + text, save, undo, redo and select and drag a shape
can u plxx help me
Thanks, im helping
Hey Rohit how i can add the selection shapes the one the paint of microsoft have it the fontion of this is to select cut and paster what you cut in other places plz if you can help me this that
El icono de la paleta donde lo busco?
error in BTN_Pic_Color.BackColor = ((Bitmap)Select_color.Image).GetPixel(Punto.X, Punto.X);
System.ArgumentOutOfRangeException: ''The parameter must be positive and less than the height.
Parameter name: y'
If I try to paint with a fill outside the shapes, the program gives me an error, what should I write?
Thanks for answer.
Go through the tutorial again, may b u r missing some code.. and let me know..!
do you know how to do automatic balloon selection on MagickWand image in c#
how can i apply trim on line when line are intersected
How can you implement an undo/redo feature ?
Here's a simple example to illustrate these steps by
Rohit programming zone
-------------------;---;---
This is a basic example to demonstrate the concept. In a real paint application, you would need to integrate this functionality with your drawing operations and handle various types of actions (e.g., drawing lines, changing colors).
---------------
using System;
using System.Collections.Generic;
class PaintProgram {
private Stack undoStack = new Stack();
private Stack redoStack = new Stack();
public void DrawLine() {
// Simulated drawing action
Console.WriteLine("Drawing a line...");
// Push drawing action onto undo stack
undoStack.Push(() => Console.WriteLine("Undo: Erase the line"));
// Clear redo stack since new action invalidates future redo operations
redoStack.Clear();
}
public void Undo() {
if (undoStack.Count > 0) {
Action undoAction = undoStack.Pop();
undoAction(); // Apply inverse of the action
redoStack.Push(undoAction); // Push onto redo stack
} else {
Console.WriteLine("Nothing to undo.");
}
}
public void Redo() {
if (redoStack.Count > 0) {
Action redoAction = redoStack.Pop();
redoAction(); // Apply redo action
undoStack.Push(redoAction); // Push onto undo stack
} else {
Console.WriteLine("Nothing to redo.");
}
}
}
class Program {
static void Main(string[] args) {
PaintProgram paintProgram = new PaintProgram();
// Simulate user actions
paintProgram.DrawLine();
paintProgram.DrawLine();
paintProgram.Undo(); // Undo one line
paintProgram.Redo(); // Redo the undone line
}
}
I'm able to Save the drawing as a jpg , but how can I Open the file with the same drawing and then edit it?
I've solved this. I've created an Open button and reloaded the jpg file.
Please tell me too
@@malcolmpalmer2437 share the code
How can i turn the rectangle to 360° rectangle?
private void pictureBox1_Paint(object sender, PaintEventArgs e)
{
Graphics graphicsCurrent = e.Graphics;
int startX = Math.Min(cX, x);
int startY = Math.Min(cY, y);
int width = Math.Abs(x - cX);
int height = Math.Abs(y - cY);
if (paint)
{
if (index == 3)
{
graphicsCurrent.DrawEllipse(p, cX, cY, sX, sY);
}
if (index == 4)
{
graphicsCurrent.DrawLine(p, cX, cY, x, y);
}
if (index == 5)
{
graphicsCurrent.DrawRectangle(p, startX, startY, width, height);
}
}
}
The DrawRectangle doesnt let you use negative valuess, so you have to use abs for the width and height of the rectangle, hope it helps
OH my god your comment was 2 years old, sorry lol
great thx
What is lf in set_point???
In C#, a lowercase f after a number indicates that the value should be treated as a float
@@ivanmarano859 it marks me error
how can I solve it?
Como guardar y luego abrir para continuar dibujando ?
I LOVE U
Sir, may I ask what does sX , sY , cX, cY represents.
These r variables which r used to measure coordinates....
You don't show how to change cursor when selecting tool
For me the fill button acted the same as the pen for me on my visual studio 2022 (I fixed it)
Could you drop the code with github
if he did that you wouldnt learn anything
@@scriptintoplaces2382not working some features.
Y u want want github ust go through the tutorial u will get all the answers...
what a GOAT
7:40
How can I draw arrows?
MIRA WE LA NETA NI ME VEO EL VIEDO AUN PERO SE QUE ME SALVARAS EL SEMESTRE X3
could you give me the file code?
Could you drop the picture "color_palette", please?
Bro just Printscreen the video
Kia mtlb ? @@aaronconvery
Can you give me the source code please?
how to create a pen cursor
Here is an example C# Windows Forms program that creates a pen cursor:
Rohit Programming Zone
_---+---------------+------_
using System;
using System.Drawing;
using System.Windows.Forms;
namespace PenCursorExample
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
this.Cursor = CreatePenCursor();
}
private Cursor CreatePenCursor()
{
Bitmap cursorBitmap = new Bitmap(32, 32);
Graphics g = Graphics.FromImage(cursorBitmap);
g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
g.FillEllipse(Brushes.Black, 0, 0, 32, 32);
g.Dispose();
IntPtr cursorHandle = cursorBitmap.GetHicon();
Cursor cursor = new Cursor(cursorHandle);
return cursor;
}
}
}
This program creates a 32x32 pixel bitmap that contains a black circle drawn with anti-aliasing, and uses the bitmap to create a new cursor. The CreatePenCursor() method returns a Cursor object that can be set as the form's cursor by assigning it to the Cursor property of the form.
To create a pen cursor in C# for a Windows application, you can use the following code:
// Create a new cursor object Cursor penCursor = new Cursor(Properties.Resources.penCursor.GetHicon());
// Set the cursor of the form to the pen cursor this.Cursor = penCursor;
In this code, we create a new cursor object from an image resource called "penCursor". We then set the form's cursor to the pen cursor using the Cursor property...
Thank you very much
norm
the first tool(pencil) does not work
How to Zoom out zoom in?
Chek the tutorial for more info...!
how to add text
Use DrawString()
Wtf por qué hay 3 comentarios que dicen al chile
AL CHILE ME SALVAS EL SEMESTRE ERES UN CRACK WEY LIKE Y ME SUSCRIBO GUAPO
4:42
AL CHILE ME SALVAS EL SEMESTRE ERES UN CRACK WEY LIKE Y ME SUSCRIBO GUAPO