Click here to Skip to main content
16,005,058 members
Home / Discussions / Windows Forms
   

Windows Forms

 
Questioni want my windowform to be at the same position where i dragged it previously. Pin
balaji_vbr20-May-08 23:29
balaji_vbr20-May-08 23:29 
AnswerRe: i want my windowform to be at the same position where i dragged it previously. Pin
Colin Angus Mackay22-May-08 5:04
Colin Angus Mackay22-May-08 5:04 
Questionhow to display the size of the file in text box in VB.net form Pin
ruthvik20-May-08 4:33
ruthvik20-May-08 4:33 
AnswerRe: how to display the size of the file in text box in VB.net form Pin
Smithers-Jones20-May-08 5:26
Smithers-Jones20-May-08 5:26 
Questionhow can i draw a transparent label? Pin
PaoloS20-May-08 2:51
PaoloS20-May-08 2:51 
AnswerRe: how can i draw a transparent label? Pin
Kschuler21-May-08 11:53
Kschuler21-May-08 11:53 
AnswerRe: how can i draw a transparent label? Pin
Thomas Stockwell30-May-08 11:02
professionalThomas Stockwell30-May-08 11:02 
Questionhow to cut the corners of the form which has the back ground image. Pin
balaji_vbr20-May-08 2:31
balaji_vbr20-May-08 2:31 
Dear sir,


i have a require ment to cut the corners of the form .
i have a windows form with a shape square.& i have a background image for that
i want to cut the corners of the form along with the back ground image.
for that i have one algorithm , I have written it in the form_paint event .
but it is not cut the corners.

i paste the code here.
---------------------------------------------
private void RecordForm_Paint(object sender, System.Windows.Forms.PaintEventArgs e)
{

//"E:\\covideo\\Recorder - Code\\CoVideo Libraries\\Rebrand Control\\Rebrand Control\\Resources\\main_bg2.png"

//Graphics g = e.Graphics; ;
//// Rectangle mainRect = new Rectangle(0, 0, 578, 470);

//Rectangle mainRect = new Rectangle(0, 0, 650, 500);
//Region mainRegion = new Region(mainRect);
//e.Graphics.SetClip(mainRegion, CombineMode.Replace);

///* Clip top left side curve region and exclude it.*/
//Point point1 = new Point(0, 33);
//Point point2 = new Point(11, 17);
//Point point3 = new Point(23, 6);
//Point point4 = new Point(35, 0);
//// Create an array of the points.
//Point[] curvePoints = { point1, point2, point3, point4 };
//// Create a GraphicsPath object and add a curve.
//GraphicsPath myPath1 = new GraphicsPath();
//myPath1.AddCurve(curvePoints, 0, 3, 0.8f);
//myPath1.AddLine(35, 0, 0, 0);
//// Exclude the clipped region
//Region ExcludeRegion1 = new Region(myPath1);
//e.Graphics.ExcludeClip(ExcludeRegion1);

///* Clip top right side curve region and exclude it.*/
//GraphicsPath myPath2 = new GraphicsPath();
//point1.X = 539; point1.Y = 0;
//point2.X = 555; point2.Y = 9;
//point3.X = 569; point3.Y = 23;
//point4.X = 577; point4.Y = 37;
//Point[] curvePoints2 = { point1, point2, point3, point4 };
//myPath2.AddCurve(curvePoints2, 0, 2, 0.8f);

//myPath2.AddLine(577, 37, 577, 0);

//Region ExcludeRegion2 = new Region(myPath2);
//e.Graphics.ExcludeClip(ExcludeRegion2);

///* Clip bottom left side curve region and exclude it.*/
//GraphicsPath myPath3 = new GraphicsPath();
//point1.X = 0; point1.Y = 428;
//point2.X = 8; point2.Y = 446;
//point3.X = 20; point3.Y = 461;
//point4.X = 37; point4.Y = 469;
//Point[] curvePoints3 = { point1, point2, point3, point4 };
//myPath3.AddCurve(curvePoints3, 0, 2, 0.8f);

//myPath3.AddLine(37, 469, 0, 469);

//Region ExcludeRegion3 = new Region(myPath3);
//e.Graphics.ExcludeClip(ExcludeRegion3);

///* Clip bottom right side curve region and exclude it.*/
//GraphicsPath myPath4 = new GraphicsPath();
//point1.X = 542; point1.Y = 469;
//point2.X = 556; point2.Y = 463;
//point3.X = 571; point3.Y = 449;
//point4.X = 577; point4.Y = 439;
//Point[] curvePoints4 = { point1, point2, point3, point4 };
//myPath4.AddCurve(curvePoints4, 0, 2, 0.8f);

//myPath4.AddLine(577, 439, 577, 469);

//Region ExcludeRegion4 = new Region(myPath4);
//e.Graphics.ExcludeClip(ExcludeRegion4);

//e.Graphics.DrawImage(img, 0, 0, 577, 469);
//e.Graphics.ResetClip();

}
------------------------------------------------------------------

it is not working please help me.
Questiononpaint event & form_paint event Pin
balaji_vbr20-May-08 2:25
balaji_vbr20-May-08 2:25 
Questioni got a problem in the "private void RecordForm_Paint(object sender, PaintEventArgs e)" Pin
balaji_vbr20-May-08 0:35
balaji_vbr20-May-08 0:35 
AnswerRe: i got a problem in the "private void RecordForm_Paint(object sender, PaintEventArgs e)" Pin
Mike Dimmick20-May-08 0:42
Mike Dimmick20-May-08 0:42 
GeneralRe: i got a problem in the "private void RecordForm_Paint(object sender, PaintEventArgs e)" Pin
Christian Graus20-May-08 0:52
protectorChristian Graus20-May-08 0:52 
GeneralRe: i got a problem in the "private void RecordForm_Paint(object sender, PaintEventArgs e)" Pin
balaji_vbr20-May-08 1:04
balaji_vbr20-May-08 1:04 
Questionautosearch list Pin
Ali el20-May-08 0:03
Ali el20-May-08 0:03 
QuestionManageing windows application in c# , looking browse and upload functionality sourcecode Pin
jay10019-May-08 7:16
jay10019-May-08 7:16 
AnswerPosted in C# forum as well Pin
SomeGuyThatIsMe19-May-08 7:42
SomeGuyThatIsMe19-May-08 7:42 
AnswerRe: Manageing windows application in c# , looking browse and upload functionality sourcecode Pin
Christian Graus19-May-08 10:26
protectorChristian Graus19-May-08 10:26 
QuestionMulticolored text in richtextbox Pin
tamour19-May-08 3:03
tamour19-May-08 3:03 
AnswerRe: Multicolored text in richtextbox Pin
originSH19-May-08 5:19
originSH19-May-08 5:19 
GeneralRe: Multicolored text in richtextbox Pin
Kschuler21-May-08 11:55
Kschuler21-May-08 11:55 
QuestionProblem retrieving the row index for a DataGridViewRow in DataGridViewSelectedRowCollection Pin
cristian.fatu18-May-08 21:49
cristian.fatu18-May-08 21:49 
AnswerRe: Problem retrieving the row index for a DataGridViewRow in DataGridViewSelectedRowCollection Pin
cristian.fatu27-May-08 21:45
cristian.fatu27-May-08 21:45 
QuestionNeed to find the object details from Kernel address Pin
Noordeen Shah17-May-08 17:23
Noordeen Shah17-May-08 17:23 
AnswerRe: Need to find the object details from Kernel address Pin
Mike Dimmick20-May-08 0:48
Mike Dimmick20-May-08 0:48 
QuestionNative look in WinForms Pin
Leafy16-May-08 9:46
Leafy16-May-08 9:46 

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.