Click here to Skip to main content
15,896,278 members
Home / Discussions / C#
   

C#

 
AnswerRe: Application halts Pin
Vasudevan Deepak Kumar6-Mar-06 0:27
Vasudevan Deepak Kumar6-Mar-06 0:27 
AnswerRe: Application halts Pin
Vasudevan Deepak Kumar6-Mar-06 0:28
Vasudevan Deepak Kumar6-Mar-06 0:28 
Questionform halts Pin
Mubii5-Mar-06 22:59
Mubii5-Mar-06 22:59 
QuestionNetwork text editor Pin
Dave McCool5-Mar-06 22:35
Dave McCool5-Mar-06 22:35 
Questionhow to delete all records with datarow ? Pin
hdv2125-Mar-06 21:59
hdv2125-Mar-06 21:59 
AnswerRe: how to delete all records with datarow ? Pin
Vasudevan Deepak Kumar5-Mar-06 23:53
Vasudevan Deepak Kumar5-Mar-06 23:53 
QuestionGDI+ questions Pin
Jens Olsson5-Mar-06 21:58
Jens Olsson5-Mar-06 21:58 
AnswerRe: GDI+ questions Pin
[Marc]6-Mar-06 3:20
[Marc]6-Mar-06 3:20 
1) Well, SetStyle is a protected method, so you can/should only use it on your own custom controls. But there's a hack:
Public Shared Sub SetStyle(ByVal control As Control, ByVal flag As ControlStyles, ByVal value As Boolean)
    Dim flags As Reflection.BindingFlags = Reflection.BindingFlags.Instance Or Reflection.BindingFlags.NonPublic Or Reflection.BindingFlags.DeclaredOnly
    Dim method As Reflection.MethodInfo = control.GetType().GetMethod("SetStyle", flags)
    Dim params As Object() = {flag, value}
    method.Invoke(control, params)
End Sub
This VB.Net code allows you to set styles on any control you like. It doesn't work on every control though, but you can try it out.

2) I think everyone has their own ideas about this but i do it this way: Design the control as a UserControl, because of the easy designing. After the designing is done i change the base class: If i make a container like a groupbox or a panel, i inherit from panel, else i just inherit from control. In my opinion UserControl has a lot of useless properties and methods.


Just my €0,02 Smile | :)


"..Commit yourself to quality from day one..it's better to do nothing at all than to do something badly.."
-- Mark McCormick

|| Fold With Us! || Pensieve || VG.Net ||

GeneralRe: GDI+ questions Pin
Jens Olsson6-Mar-06 21:11
Jens Olsson6-Mar-06 21:11 
GeneralRe: GDI+ questions Pin
[Marc]7-Mar-06 2:26
[Marc]7-Mar-06 2:26 
GeneralRe: GDI+ questions Pin
Jens Olsson7-Mar-06 5:22
Jens Olsson7-Mar-06 5:22 
GeneralRe: GDI+ questions Pin
[Marc]7-Mar-06 5:40
[Marc]7-Mar-06 5:40 
GeneralRe: GDI+ questions Pin
Jens Olsson7-Mar-06 10:43
Jens Olsson7-Mar-06 10:43 
GeneralRe: GDI+ questions Pin
[Marc]7-Mar-06 10:50
[Marc]7-Mar-06 10:50 
GeneralRe: GDI+ questions Pin
Jens Olsson7-Mar-06 10:46
Jens Olsson7-Mar-06 10:46 
Questionhow to bind the data in datagrid using storedprocedure Pin
eswarattaluri5-Mar-06 21:56
eswarattaluri5-Mar-06 21:56 
AnswerRe: how to bind the data in datagrid using storedprocedure Pin
rccnh6-Mar-06 8:26
rccnh6-Mar-06 8:26 
QuestionHow to show Values in CrystalReportViewer ??? Pin
Abubakarsb5-Mar-06 21:39
Abubakarsb5-Mar-06 21:39 
AnswerRe: How to show Values in CrystalReportViewer ??? Pin
albCode5-Mar-06 21:46
albCode5-Mar-06 21:46 
GeneralRe: How to show Values in CrystalReportViewer ??? Pin
Abubakarsb6-Mar-06 0:18
Abubakarsb6-Mar-06 0:18 
QuestionSQLDataReader Problem Pin
Brendan Vogt5-Mar-06 21:22
Brendan Vogt5-Mar-06 21:22 
AnswerRe: SQLDataReader Problem Pin
Guffa5-Mar-06 21:58
Guffa5-Mar-06 21:58 
QuestionRe: SQLDataReader Problem Pin
Brendan Vogt5-Mar-06 22:17
Brendan Vogt5-Mar-06 22:17 
AnswerRe: SQLDataReader Problem Pin
Guffa5-Mar-06 22:27
Guffa5-Mar-06 22:27 
QuestionRe: SQLDataReader Problem Pin
Brendan Vogt5-Mar-06 22:48
Brendan Vogt5-Mar-06 22:48 

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.