Hello everyone i am new to c# and i need to know something in graphics . i am writing something like paint but in the bucket part is there any function in graphic to fill a place like paint .

Well if you keep track of all the shapes drawn, and use something that can be converted into a region (like a GraphicsPath) then you can use

Graphics g = myForm.CreateGraphics;
g.FillRegion(myBrush, new Region(myGraphicsPath);

But chances are you wont be keeping track of every object. To work directly with a bitmap, you will have to write your own algorithm (like this one)