Now I need to accept some args, 4 Strings and 1 Image name, how do I implement this
Thanks agraham....
Do i need to declare the args before the constructer? If so where?
I don't know what control you are using but I would try it and see. I think most of the existing controls come with a default font already set.Do i need to worry about the font setting in the control properties?
I'm not sure what you mean but normally in .NET code you don't need to ever implement a disposal function as the .NET Garbage Collector will remove an object when there are no further references to it. Disposal is normally only needed when your code has acquired resources from outside .NET (like mallocing memory or interacting with non-managed dlls) that need to be explicitly freed. Doing this is unsafe code that should be avoided if at all possible as you are then losing the safe coding advantages of the .NET Framwork.I'm also ading a button to the control...(It's an About Panel) shhh.....how do I implement dispose with the button click event?
[B][SIZE=2][COLOR=#008000][B][SIZE=2][COLOR=#008000]namespace [/COLOR][/SIZE][/B][SIZE=2][COLOR=#000000]AboutBox [/COLOR][/SIZE][/COLOR][/SIZE][/B]
[SIZE=2][COLOR=#008000][B][SIZE=2][COLOR=#006400]{[/COLOR][/SIZE][/B]
[B][B][SIZE=2][COLOR=#0000ff]public [/COLOR][/SIZE][/B][SIZE=2][COLOR=#ff0000]class [/COLOR][/SIZE][SIZE=2][COLOR=#000000]AboutBox:IDisposable [/COLOR][/SIZE][/B]
[B][SIZE=2][COLOR=#006400]{[/COLOR][/SIZE][/B]
[B][B][SIZE=2][COLOR=#0000ff]private [/COLOR][/SIZE][/B][SIZE=2][COLOR=#000000]System[/COLOR][/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2][COLOR=#000000]Windows[/COLOR][/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2][COLOR=#000000]Forms[/COLOR][/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2][COLOR=#000000]Form frmAbout[/COLOR][/SIZE][SIZE=2][COLOR=#006400]; [/COLOR][/SIZE][/B]
[B][SIZE=2][COLOR=#008000]//Constructor[/COLOR][/SIZE][/B]
[B][B][SIZE=2][COLOR=#0000ff]public [/COLOR][/SIZE][SIZE=2][COLOR=#191970]AboutBox[/COLOR][/SIZE][/B][SIZE=2][COLOR=#006400]([/COLOR][/SIZE][B][SIZE=2][COLOR=#ff0000]int [/COLOR][/SIZE][/B][SIZE=2][COLOR=#000000]Left[/COLOR][/SIZE][SIZE=2][COLOR=#006400], [/COLOR][/SIZE][B][SIZE=2][COLOR=#ff0000]int [/COLOR][/SIZE][/B][SIZE=2][COLOR=#000000]Top[/COLOR][/SIZE][SIZE=2][COLOR=#006400], [/COLOR][/SIZE][B][SIZE=2][COLOR=#ff0000]int [/COLOR][/SIZE][/B][SIZE=2][COLOR=#000000]Width[/COLOR][/SIZE][SIZE=2][COLOR=#006400], [/COLOR][/SIZE][B][SIZE=2][COLOR=#ff0000]int [/COLOR][/SIZE][/B][SIZE=2][COLOR=#000000]Height[/COLOR][/SIZE][SIZE=2][COLOR=#006400], [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]string [/COLOR][/SIZE][SIZE=2][COLOR=#000000]lblText[/COLOR][/SIZE][SIZE=2][COLOR=#006400])[/COLOR][/SIZE][/B]
[B][SIZE=2][COLOR=#006400]{[/COLOR][/SIZE][/B]
[B][SIZE=2][COLOR=#000000]frmAbout [/COLOR][/SIZE][SIZE=2][COLOR=#006400]= [/COLOR][/SIZE][B][SIZE=2][COLOR=#008b8b]new [/COLOR][/SIZE][/B][SIZE=2][COLOR=#000000]System[/COLOR][/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2][COLOR=#000000]Windows[/COLOR][/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2][COLOR=#000000]Forms[/COLOR][/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][B][SIZE=2][COLOR=#191970]Form[/COLOR][/SIZE][/B][SIZE=2][COLOR=#006400]();[/COLOR][/SIZE][/B]
[B][SIZE=2][COLOR=#008000]//Sizebale form, not covering all the screen[/COLOR][/SIZE][/B]
[B][SIZE=2][COLOR=#000000]frmAbout[/COLOR][/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2][COLOR=#000000]FormBorderStyle [/COLOR][/SIZE][SIZE=2][COLOR=#006400]= [/COLOR][/SIZE][SIZE=2][COLOR=#000000]System[/COLOR][/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2][COLOR=#000000]Windows[/COLOR][/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2][COLOR=#000000]Forms[/COLOR][/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2][COLOR=#000000]FormBorderStyle[/COLOR][/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2][COLOR=#000000]None[/COLOR][/SIZE][SIZE=2][COLOR=#006400];[/COLOR][/SIZE][/B]
[B][SIZE=2][COLOR=#000000]frmAbout[/COLOR][/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2][COLOR=#000000]Left [/COLOR][/SIZE][SIZE=2][COLOR=#006400]= [/COLOR][/SIZE][SIZE=2][COLOR=#000000]Left[/COLOR][/SIZE][SIZE=2][COLOR=#006400];[/COLOR][/SIZE][/B]
[B][SIZE=2][COLOR=#000000]frmAbout[/COLOR][/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2][COLOR=#000000]Top [/COLOR][/SIZE][SIZE=2][COLOR=#006400]= [/COLOR][/SIZE][SIZE=2][COLOR=#000000]Top[/COLOR][/SIZE][SIZE=2][COLOR=#006400];[/COLOR][/SIZE][/B]
[B][SIZE=2][COLOR=#000000]frmAbout[/COLOR][/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2][COLOR=#000000]Width [/COLOR][/SIZE][SIZE=2][COLOR=#006400]= [/COLOR][/SIZE][SIZE=2][COLOR=#000000]Width[/COLOR][/SIZE][SIZE=2][COLOR=#006400];[/COLOR][/SIZE][/B]
[B][SIZE=2][COLOR=#000000]frmAbout[/COLOR][/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2][COLOR=#000000]Height [/COLOR][/SIZE][SIZE=2][COLOR=#006400]= [/COLOR][/SIZE][SIZE=2][COLOR=#000000]Height[/COLOR][/SIZE][SIZE=2][COLOR=#006400];[/COLOR][/SIZE][/B]
[B][SIZE=2][COLOR=#008000]//Add a label to your AboutBox[/COLOR][/SIZE][/B]
[B][SIZE=2][COLOR=#000000]System[/COLOR][/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2][COLOR=#000000]Windows[/COLOR][/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2][COLOR=#000000]Forms[/COLOR][/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2][COLOR=#000000]Label lbl1 [/COLOR][/SIZE][SIZE=2][COLOR=#006400]= [/COLOR][/SIZE][B][SIZE=2][COLOR=#008b8b]new [/COLOR][/SIZE][/B][SIZE=2][COLOR=#000000]System[/COLOR][/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2][COLOR=#000000]Windows[/COLOR][/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2][COLOR=#000000]Forms[/COLOR][/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][B][SIZE=2][COLOR=#191970]Label[/COLOR][/SIZE][/B][SIZE=2][COLOR=#006400]();[/COLOR][/SIZE][/B]
[B][SIZE=2][COLOR=#000000]lbl1[/COLOR][/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2][COLOR=#000000]Text [/COLOR][/SIZE][SIZE=2][COLOR=#006400]= [/COLOR][/SIZE][SIZE=2][COLOR=#000000]lblText[/COLOR][/SIZE][SIZE=2][COLOR=#006400];[/COLOR][/SIZE][/B]
[B][SIZE=2][COLOR=#000000]lbl1[/COLOR][/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2][COLOR=#000000]Left [/COLOR][/SIZE][SIZE=2][COLOR=#006400]= [/COLOR][/SIZE][SIZE=2][COLOR=#00008b]50[/COLOR][/SIZE][SIZE=2][COLOR=#006400];[/COLOR][/SIZE][/B]
[B][SIZE=2][COLOR=#000000]lbl1[/COLOR][/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2][COLOR=#000000]Top [/COLOR][/SIZE][SIZE=2][COLOR=#006400]= [/COLOR][/SIZE][SIZE=2][COLOR=#00008b]60[/COLOR][/SIZE][SIZE=2][COLOR=#006400];[/COLOR][/SIZE][/B]
[B][SIZE=2][COLOR=#000000]frmAbout[/COLOR][/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2][COLOR=#000000]Controls[/COLOR][/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][B][SIZE=2][COLOR=#191970]Add[/COLOR][/SIZE][/B][SIZE=2][COLOR=#006400]([/COLOR][/SIZE][SIZE=2][COLOR=#000000]lbl1[/COLOR][/SIZE][SIZE=2][COLOR=#006400]);[/COLOR][/SIZE][/B]
[B][SIZE=2][COLOR=#008000]//Add more Controls bellow[/COLOR][/SIZE][/B]
[B][SIZE=2][COLOR=#006400]}[/COLOR][/SIZE][/B]
[B][SIZE=2][COLOR=#008000]//Show and continue execution. Does not wait for the AboutBox to return[/COLOR][/SIZE][/B]
[B][B][SIZE=2][COLOR=#0000ff]public [/COLOR][/SIZE][/B][SIZE=2][COLOR=#ff0000]void [/COLOR][/SIZE][B][SIZE=2][COLOR=#191970]Show[/COLOR][/SIZE][/B][SIZE=2][COLOR=#006400]()[/COLOR][/SIZE][/B]
[B][SIZE=2][COLOR=#006400]{[/COLOR][/SIZE][/B]
[B][SIZE=2][COLOR=#000000]frmAbout[/COLOR][/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][B][SIZE=2][COLOR=#191970]Show[/COLOR][/SIZE][/B][SIZE=2][COLOR=#006400]();[/COLOR][/SIZE][/B]
[B][SIZE=2][COLOR=#006400]}[/COLOR][/SIZE][/B]
[B][SIZE=2][COLOR=#008000]//Show and wait to finish like msgbox[/COLOR][/SIZE][/B]
[B][B][SIZE=2][COLOR=#0000ff]public [/COLOR][/SIZE][/B][SIZE=2][COLOR=#ff0000]void [/COLOR][/SIZE][B][SIZE=2][COLOR=#191970]ShowDialog[/COLOR][/SIZE][/B][SIZE=2][COLOR=#006400]()[/COLOR][/SIZE][/B]
[B][SIZE=2][COLOR=#006400]{[/COLOR][/SIZE][/B]
[B][SIZE=2][COLOR=#000000]frmAbout[/COLOR][/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][B][SIZE=2][COLOR=#191970]ShowDialog[/COLOR][/SIZE][/B][SIZE=2][COLOR=#006400]();[/COLOR][/SIZE][/B]
[B][SIZE=2][COLOR=#006400]}[/COLOR][/SIZE][/B]
[B][B][SIZE=2][COLOR=#0000ff]public [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]double [/COLOR][/SIZE][/B][SIZE=2][COLOR=#000000]DLLVersion[/COLOR][/SIZE][/B]
[B][SIZE=2][COLOR=#006400]{[/COLOR][/SIZE][/B]
[B][SIZE=2][COLOR=#8b4513]get [/COLOR][/SIZE][SIZE=2][COLOR=#006400]{[/COLOR][/SIZE][SIZE=2][COLOR=#000080]return [/COLOR][/SIZE][SIZE=2][COLOR=#00008b]1[/COLOR][/SIZE][SIZE=2][COLOR=#006400];}[/COLOR][/SIZE][/B]
[B][SIZE=2][COLOR=#006400]}[/COLOR][/SIZE][/B]
[B][B][SIZE=2][COLOR=#0000ff]public [/COLOR][/SIZE][/B][SIZE=2][COLOR=#ff0000]void [/COLOR][/SIZE][B][SIZE=2][COLOR=#191970]Dispose[/COLOR][/SIZE][/B][SIZE=2][COLOR=#006400]()[/COLOR][/SIZE][/B]
[B][SIZE=2][COLOR=#006400]{[/COLOR][/SIZE][/B]
[B][B][SIZE=2][COLOR=#008080]try[/COLOR][/SIZE][/B][/B]
[B][SIZE=2][COLOR=#006400]{[/COLOR][/SIZE][/B]
[B][SIZE=2][COLOR=#000000]frmAbout[/COLOR][/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][B][SIZE=2][COLOR=#191970]Dispose [/COLOR][/SIZE][/B][SIZE=2][COLOR=#006400]();[/COLOR][/SIZE][/B]
[B][SIZE=2][COLOR=#006400]}[/COLOR][/SIZE][/B]
[B][B][SIZE=2][COLOR=#008080]finally[/COLOR][/SIZE][/B][SIZE=2][COLOR=#006400]{}[/COLOR][/SIZE][/B]
[B][SIZE=2][COLOR=#006400]}[/COLOR][/SIZE][/B]
[B][SIZE=2][COLOR=#006400]}[/COLOR][/SIZE][/B]
[B][SIZE=2][COLOR=#006400]}[/COLOR][/SIZE][/B]
[/COLOR][/SIZE]
[B][SIZE=2][COLOR=#008000]namespace [/COLOR][/SIZE][/B][SIZE=2]AboutBox [/SIZE]
[SIZE=2][COLOR=#006400]{[/COLOR][/SIZE]
[B][SIZE=2][COLOR=#0000ff]public [/COLOR][/SIZE][/B][SIZE=2][COLOR=#ff0000]class [/COLOR][/SIZE][SIZE=2]AboutBox:IDisposable [/SIZE]
[SIZE=2][COLOR=#006400]{[/COLOR][/SIZE]
[B][SIZE=2][COLOR=#0000ff]private [/COLOR][/SIZE][/B][SIZE=2]System[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]Windows[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]Forms[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]Form frmAbout[/SIZE][SIZE=2][COLOR=#006400]; [/COLOR][/SIZE]
[SIZE=2][COLOR=#008000]//Constructor[/COLOR][/SIZE]
[B][SIZE=2][COLOR=#0000ff]public [/COLOR][/SIZE][SIZE=2][COLOR=#191970]AboutBox[/COLOR][/SIZE][/B][SIZE=2][COLOR=#006400]([/COLOR][/SIZE][B][SIZE=2][COLOR=#ff0000]int [/COLOR][/SIZE][/B][SIZE=2]Left[/SIZE][SIZE=2][COLOR=#006400], [/COLOR][/SIZE][B][SIZE=2][COLOR=#ff0000]int [/COLOR][/SIZE][/B][SIZE=2]Top[/SIZE][SIZE=2][COLOR=#006400], [/COLOR][/SIZE][B][SIZE=2][COLOR=#ff0000]int [/COLOR][/SIZE][/B][SIZE=2]Width[/SIZE][SIZE=2][COLOR=#006400], [/COLOR][/SIZE][B][SIZE=2][COLOR=#ff0000]int [/COLOR][/SIZE][/B][SIZE=2]Height[/SIZE][SIZE=2][COLOR=#006400], [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]string [/COLOR][/SIZE][SIZE=2]lblText[/SIZE][SIZE=2][COLOR=#006400])[/COLOR][/SIZE]
[SIZE=2][COLOR=#006400]{[/COLOR][/SIZE]
[SIZE=2]frmAbout [/SIZE][SIZE=2][COLOR=#006400]= [/COLOR][/SIZE][B][SIZE=2][COLOR=#008b8b]new [/COLOR][/SIZE][/B][SIZE=2]System[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]Windows[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]Forms[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][B][SIZE=2][COLOR=#191970]Form[/COLOR][/SIZE][/B][SIZE=2][COLOR=#006400]();[/COLOR][/SIZE]
[SIZE=2][COLOR=#008000]//Sizebale form, not covering all the screen[/COLOR][/SIZE]
[SIZE=2]frmAbout[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]FormBorderStyle [/SIZE][SIZE=2][COLOR=#006400]= [/COLOR][/SIZE][SIZE=2]System[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]Windows[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]Forms[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]FormBorderStyle[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]None[/SIZE][SIZE=2][COLOR=#006400];[/COLOR][/SIZE]
[SIZE=2]frmAbout[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]Left [/SIZE][SIZE=2][COLOR=#006400]= [/COLOR][/SIZE][SIZE=2]Left[/SIZE][SIZE=2][COLOR=#006400];[/COLOR][/SIZE]
[SIZE=2]frmAbout[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]Top [/SIZE][SIZE=2][COLOR=#006400]= [/COLOR][/SIZE][SIZE=2]Top[/SIZE][SIZE=2][COLOR=#006400];[/COLOR][/SIZE]
[SIZE=2]frmAbout[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]Width [/SIZE][SIZE=2][COLOR=#006400]= [/COLOR][/SIZE][SIZE=2]Width[/SIZE][SIZE=2][COLOR=#006400];[/COLOR][/SIZE]
[SIZE=2]frmAbout[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]Height [/SIZE][SIZE=2][COLOR=#006400]= [/COLOR][/SIZE][SIZE=2]Height[/SIZE][SIZE=2][COLOR=#006400];[/COLOR][/SIZE]
[SIZE=2][COLOR=#008000]//Add a label to your AboutBox[/COLOR][/SIZE]
[SIZE=2]System[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]Windows[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]Forms[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]Label lbl1 [/SIZE][SIZE=2][COLOR=#006400]= [/COLOR][/SIZE][B][SIZE=2][COLOR=#008b8b]new [/COLOR][/SIZE][/B][SIZE=2]System[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]Windows[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]Forms[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][B][SIZE=2][COLOR=#191970]Label[/COLOR][/SIZE][/B][SIZE=2][COLOR=#006400]();[/COLOR][/SIZE]
[SIZE=2]lbl1[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]Text [/SIZE][SIZE=2][COLOR=#006400]= [/COLOR][/SIZE][SIZE=2]lblText[/SIZE][SIZE=2][COLOR=#006400];[/COLOR][/SIZE]
[SIZE=2]lbl1[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]Left [/SIZE][SIZE=2][COLOR=#006400]= [/COLOR][/SIZE][SIZE=2][COLOR=#00008b]50[/COLOR][/SIZE][SIZE=2][COLOR=#006400];[/COLOR][/SIZE]
[SIZE=2]lbl1[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]Top [/SIZE][SIZE=2][COLOR=#006400]= [/COLOR][/SIZE][SIZE=2][COLOR=#00008b]60[/COLOR][/SIZE][SIZE=2][COLOR=#006400];[/COLOR][/SIZE]
[SIZE=2]frmAbout[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]Controls[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][B][SIZE=2][COLOR=#191970]Add[/COLOR][/SIZE][/B][SIZE=2][COLOR=#006400]([/COLOR][/SIZE][SIZE=2]lbl1[/SIZE][SIZE=2][COLOR=#006400]);[/COLOR][/SIZE]
[SIZE=2][COLOR=#008000]//Add OK Button[/COLOR][/SIZE]
[SIZE=2]System[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]Windows[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]Forms[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]Button btnOK [/SIZE][SIZE=2][COLOR=#006400]= [/COLOR][/SIZE][B][SIZE=2][COLOR=#008b8b]new [/COLOR][/SIZE][/B][SIZE=2]System[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]Windows[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]Forms[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][B][SIZE=2][COLOR=#191970]Button[/COLOR][/SIZE][/B][SIZE=2][COLOR=#006400]();[/COLOR][/SIZE]
[SIZE=2]btnOK[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]Left [/SIZE][SIZE=2][COLOR=#006400]= [/COLOR][/SIZE][SIZE=2][COLOR=#00008b]10[/COLOR][/SIZE][SIZE=2][COLOR=#006400];[/COLOR][/SIZE]
[SIZE=2]btnOK[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]Top[/SIZE][SIZE=2][COLOR=#006400]= [/COLOR][/SIZE][SIZE=2][COLOR=#00008b]10[/COLOR][/SIZE][SIZE=2][COLOR=#006400];[/COLOR][/SIZE]
[SIZE=2]btnOK[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]Text [/SIZE][SIZE=2][COLOR=#006400]= [/COLOR][/SIZE][SIZE=2][COLOR=#0000ff]"OK"[/COLOR][/SIZE][SIZE=2][COLOR=#006400];[/COLOR][/SIZE]
[SIZE=2]frmAbout[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]Controls[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][B][SIZE=2][COLOR=#191970]Add[/COLOR][/SIZE][/B][SIZE=2][COLOR=#006400]([/COLOR][/SIZE][SIZE=2]btnOK[/SIZE][SIZE=2][COLOR=#006400]);[/COLOR][/SIZE]
[SIZE=2]btnOK[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]Click [/SIZE][SIZE=2][COLOR=#006400]+= [/COLOR][/SIZE][B][SIZE=2][COLOR=#008b8b]new [/COLOR][/SIZE][/B][SIZE=2]System[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][B][SIZE=2][COLOR=#191970]EventHandler[/COLOR][/SIZE][/B][SIZE=2][COLOR=#006400]([/COLOR][/SIZE][B][SIZE=2]this[/SIZE][/B][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]btnOK_Click[/SIZE][SIZE=2][COLOR=#006400]); [/COLOR][/SIZE]
[SIZE=2][COLOR=#008000]//Add more Controls bellow[/COLOR][/SIZE]
[SIZE=2][COLOR=#006400]}[/COLOR][/SIZE]
[B][SIZE=2][COLOR=#0000ff]private [/COLOR][/SIZE][/B][SIZE=2][COLOR=#ff0000]void [/COLOR][/SIZE][B][SIZE=2][COLOR=#191970]btnOK_Click[/COLOR][/SIZE][/B][SIZE=2][COLOR=#006400]([/COLOR][/SIZE][SIZE=2]System[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]Object sender[/SIZE][SIZE=2][COLOR=#006400], [/COLOR][/SIZE][SIZE=2]System[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]EventArgs e[/SIZE][SIZE=2][COLOR=#006400]) [/COLOR][/SIZE]
[SIZE=2][COLOR=#006400]{[/COLOR][/SIZE]
[SIZE=2][COLOR=#008000]//Hide the form[/COLOR][/SIZE]
[SIZE=2][COLOR=#008000]//Of course you can rise an event (visible to b4ppc program) and not hide the form here.[/COLOR][/SIZE]
[SIZE=2][COLOR=#008000]//See ScrollBar sample[/COLOR][/SIZE]
[SIZE=2]frmAbout[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][B][SIZE=2][COLOR=#191970]Hide[/COLOR][/SIZE][/B][SIZE=2][COLOR=#006400]();[/COLOR][/SIZE]
[SIZE=2][COLOR=#006400]}[/COLOR][/SIZE]
[SIZE=2][COLOR=#008000]//Show and continue execution. Does not wait for the AboutBox to return[/COLOR][/SIZE]
[B][SIZE=2][COLOR=#0000ff]public [/COLOR][/SIZE][/B][SIZE=2][COLOR=#ff0000]void [/COLOR][/SIZE][B][SIZE=2][COLOR=#191970]Show[/COLOR][/SIZE][/B][SIZE=2][COLOR=#006400]()[/COLOR][/SIZE]
[SIZE=2][COLOR=#006400]{[/COLOR][/SIZE]
[SIZE=2]frmAbout[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][B][SIZE=2][COLOR=#191970]Show[/COLOR][/SIZE][/B][SIZE=2][COLOR=#006400]();[/COLOR][/SIZE]
[SIZE=2][COLOR=#006400]}[/COLOR][/SIZE]
[SIZE=2][COLOR=#008000]//Show and wait to finish like msgbox[/COLOR][/SIZE]
[B][SIZE=2][COLOR=#0000ff]public [/COLOR][/SIZE][/B][SIZE=2][COLOR=#ff0000]void [/COLOR][/SIZE][B][SIZE=2][COLOR=#191970]ShowDialog[/COLOR][/SIZE][/B][SIZE=2][COLOR=#006400]()[/COLOR][/SIZE]
[SIZE=2][COLOR=#006400]{[/COLOR][/SIZE]
[SIZE=2]frmAbout[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][B][SIZE=2][COLOR=#191970]ShowDialog[/COLOR][/SIZE][/B][SIZE=2][COLOR=#006400]();[/COLOR][/SIZE]
[SIZE=2][COLOR=#006400]}[/COLOR][/SIZE]
[B][SIZE=2][COLOR=#0000ff]public [/COLOR][/SIZE][SIZE=2][COLOR=#ff0000]double [/COLOR][/SIZE][/B][SIZE=2]DLLVersion[/SIZE]
[SIZE=2][COLOR=#006400]{[/COLOR][/SIZE]
[SIZE=2][COLOR=#8b4513]get [/COLOR][/SIZE][SIZE=2][COLOR=#006400]{[/COLOR][/SIZE][SIZE=2][COLOR=#000080]return [/COLOR][/SIZE][SIZE=2][COLOR=#00008b]1[/COLOR][/SIZE][SIZE=2][COLOR=#006400];}[/COLOR][/SIZE]
[SIZE=2][COLOR=#006400]}[/COLOR][/SIZE]
[B][SIZE=2][COLOR=#0000ff]public [/COLOR][/SIZE][/B][SIZE=2][COLOR=#ff0000]void [/COLOR][/SIZE][B][SIZE=2][COLOR=#191970]Dispose[/COLOR][/SIZE][/B][SIZE=2][COLOR=#006400]()[/COLOR][/SIZE]
[SIZE=2][COLOR=#006400]{[/COLOR][/SIZE]
[B][SIZE=2][COLOR=#008080]try[/COLOR][/SIZE][/B]
[SIZE=2][COLOR=#006400]{[/COLOR][/SIZE]
[SIZE=2]frmAbout[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][B][SIZE=2][COLOR=#191970]Dispose [/COLOR][/SIZE][/B][SIZE=2][COLOR=#006400]();[/COLOR][/SIZE]
[SIZE=2][COLOR=#006400]}[/COLOR][/SIZE]
[B][SIZE=2][COLOR=#008080]finally[/COLOR][/SIZE][/B][SIZE=2][COLOR=#006400]{}[/COLOR][/SIZE]
[SIZE=2][COLOR=#006400]}[/COLOR][/SIZE]
[SIZE=2][COLOR=#006400]}[/COLOR][/SIZE]
[SIZE=2][COLOR=#006400]}[/COLOR][/SIZE]
[B][SIZE=2][COLOR=#0000ff]...[/COLOR][/SIZE][/B]
[B][COLOR=#0000ff]...[/COLOR][/B]
[B][SIZE=2][COLOR=#0000ff][B][SIZE=2][COLOR=#0000ff]private [/COLOR][/SIZE][/B][SIZE=2][COLOR=#000000]System[/COLOR][/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2][COLOR=#000000]Windows[/COLOR][/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2][COLOR=#000000]Forms[/COLOR][/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2][COLOR=#000000]Form frmAbout[/COLOR][/SIZE][SIZE=2][COLOR=#006400]; [/COLOR][/SIZE][/COLOR][/SIZE][/B]
[B][SIZE=2][COLOR=#0000ff]private [/COLOR][/SIZE][/B][SIZE=2]System[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]Windows[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]Forms[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]Label lbl1[/SIZE][SIZE=2][COLOR=#006400];[/COLOR][/SIZE]
[SIZE=2][COLOR=#008000]//Constructor[/COLOR][/SIZE]
[B][SIZE=2][COLOR=#0000ff]public [/COLOR][/SIZE][SIZE=2][COLOR=#191970]AboutBox[/COLOR][/SIZE][/B][SIZE=2][COLOR=#006400]()[/COLOR][/SIZE]
[SIZE=2][COLOR=#006400]{[/COLOR][/SIZE]
[SIZE=2]frmAbout [/SIZE][SIZE=2][COLOR=#006400]= [/COLOR][/SIZE][B][SIZE=2][COLOR=#008b8b]new [/COLOR][/SIZE][/B][SIZE=2]System[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]Windows[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]Forms[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][B][SIZE=2][COLOR=#191970]Form[/COLOR][/SIZE][/B][SIZE=2][COLOR=#006400]();[/COLOR][/SIZE]
[SIZE=2][COLOR=#008000]//Sizebale form, not covering all the screen[/COLOR][/SIZE]
[SIZE=2]frmAbout[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]FormBorderStyle [/SIZE][SIZE=2][COLOR=#006400]= [/COLOR][/SIZE][SIZE=2]System[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]Windows[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]Forms[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]FormBorderStyle[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]None[/SIZE][SIZE=2][COLOR=#006400];[/COLOR][/SIZE]
[SIZE=2]lbl1 [/SIZE][SIZE=2][COLOR=#006400]= [/COLOR][/SIZE][B][SIZE=2][COLOR=#008b8b]new [/COLOR][/SIZE][/B][SIZE=2]System[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]Windows[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]Forms[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][B][SIZE=2][COLOR=#191970]Label[/COLOR][/SIZE][/B][SIZE=2][COLOR=#006400]();[/COLOR][/SIZE]
[SIZE=2]lbl1[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]Left [/SIZE][SIZE=2][COLOR=#006400]= [/COLOR][/SIZE][SIZE=2][COLOR=#00008b]50[/COLOR][/SIZE][SIZE=2][COLOR=#006400];[/COLOR][/SIZE]
[SIZE=2]lbl1[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]Top [/SIZE][SIZE=2][COLOR=#006400]= [/COLOR][/SIZE][SIZE=2][COLOR=#00008b]60[/COLOR][/SIZE][SIZE=2][COLOR=#006400];[/COLOR][/SIZE]
[SIZE=2]frmAbout[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]Controls[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][B][SIZE=2][COLOR=#191970]Add[/COLOR][/SIZE][/B][SIZE=2][COLOR=#006400]([/COLOR][/SIZE][SIZE=2]lbl1[/SIZE][SIZE=2][COLOR=#006400]);[/COLOR][/SIZE]
[SIZE=2][COLOR=#006400]}[/COLOR][/SIZE]
[B][SIZE=2][COLOR=#0000ff]public [/COLOR][/SIZE][/B][SIZE=2][COLOR=#ff0000]string [/COLOR][/SIZE][SIZE=2]lbl1Text[/SIZE]
[SIZE=2][COLOR=#006400]{[/COLOR][/SIZE]
[SIZE=2][COLOR=#8b4513]get [/COLOR][/SIZE][SIZE=2][COLOR=#006400]{[/COLOR][/SIZE][SIZE=2][COLOR=#000080]return [/COLOR][/SIZE][SIZE=2]lbl1[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]Text[/SIZE][SIZE=2][COLOR=#006400];}[/COLOR][/SIZE]
[SIZE=2][COLOR=#8b4513]set [/COLOR][/SIZE][SIZE=2][COLOR=#006400]{[/COLOR][/SIZE][SIZE=2]lbl1[/SIZE][SIZE=2][COLOR=#006400].[/COLOR][/SIZE][SIZE=2]Text [/SIZE][SIZE=2][COLOR=#006400]= [/COLOR][/SIZE][B][SIZE=2]value[/SIZE][/B][SIZE=2][COLOR=#006400];}[/COLOR][/SIZE]
[SIZE=2][COLOR=#006400]}[/COLOR][/SIZE]
[B][SIZE=2][COLOR=#0000ff]...[/COLOR][/SIZE][/B]
[B][COLOR=#0000ff]...[/COLOR][/B]
THANKS GUYS, FOR ALL YOUR EFFORT IN HELPING ME, AND SORRY TO BE SUCH A PAIN....
Damn! Well done dzt, beat me by 10 minutes.I attach your AboutPanel source (with both solutions completed, mine and agraham's) and a b4ppc test program.
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?
We use cookies and similar technologies for the following purposes:
Do you accept cookies and these technologies?