Click here to Skip to main content
15,895,011 members
Home / Discussions / C#
   

C#

 
AnswerRe: static method calling a non static Pin
Wjousts31-May-06 4:53
Wjousts31-May-06 4:53 
Questionrun time error : "Catastrophic failure" ,,, what can be the problem Pin
Member 227165531-May-06 3:57
Member 227165531-May-06 3:57 
Questionwinforms question Pin
batmike200031-May-06 3:41
batmike200031-May-06 3:41 
AnswerRe: winforms question [modified] Pin
Dustin Metzgar31-May-06 5:37
Dustin Metzgar31-May-06 5:37 
GeneralRe: winforms question Pin
Josh Smith31-May-06 6:00
Josh Smith31-May-06 6:00 
GeneralRe: winforms question [modified] Pin
Dustin Metzgar31-May-06 6:30
Dustin Metzgar31-May-06 6:30 
GeneralRe: winforms question [modified] Pin
batmike200031-May-06 20:25
batmike200031-May-06 20:25 
GeneralRe: winforms question [modified] Pin
batmike20002-Jun-06 0:00
batmike20002-Jun-06 0:00 
hi guys,

i've found the solution: i indeed needed to use reflection but on fieldinfo level

                <br />
strFormName = param_Form.Name<br />
<br />
                Dim param_Form_type As Type = param_Form.GetType()<br />
                Dim compFields As FieldInfo() = param_Form_type.GetFields(BindingFlags.Instance Or BindingFlags.NonPublic)<br />
                For Each fiField As FieldInfo In compFields<br />
                    Dim strCtrl(1) As String<br />
                    strCtrl = ReturnCompName(fiField, param_Form)<br />
                    For Each dr As DataRow In myrs.Rows<br />
                        If strCtrl(0) = dr("SecAuthCtrl_Name") And fiField.FieldType.FullName = dr("SecAuthCtrl_Type") Then<br />
                            Select Case fiField.FieldType.FullName.ToLower<br />
                                Case "System.Windows.Forms.ToolBarButton".ToLower<br />
                                    Dim cmp As ToolBarButton = DirectCast(fiField.GetValue(param_Form), ToolBarButton)<br />
                                    cmp.Enabled = dr("SecAuthorized_Enabled")<br />
                                    cmp.Visible = dr("SecAuthorized_Visible")<br />
                                Case "System.Windows.Forms.MenuItem".ToLower<br />
                                    Dim cmp As MenuItem = DirectCast(fiField.GetValue(param_Form), MenuItem)<br />
                                    cmp.Enabled = dr("SecAuthorized_Enabled")<br />
                                    cmp.Visible = dr("SecAuthorized_Visible")<br />
                                Case Else<br />
                            End Select<br />
                        End If<br />
                    Next<br />
                Next


this works now,

tnx again for your effort

batmike2000
GeneralRe: winforms question [modified] Pin
Dustin Metzgar2-Jun-06 1:46
Dustin Metzgar2-Jun-06 1:46 
Questiondatagridview comboboxcolumn Pin
kjosh31-May-06 3:33
kjosh31-May-06 3:33 
QuestionHas anyone ever y used the DTE object? Pin
Ista31-May-06 3:33
Ista31-May-06 3:33 
QuestionChange StatusBar backColor Pin
Darren_31-May-06 3:10
Darren_31-May-06 3:10 
AnswerRe: Change StatusBar backColor Pin
stancrm31-May-06 3:53
stancrm31-May-06 3:53 
GeneralRe: Change StatusBar backColor Pin
Darren_31-May-06 13:54
Darren_31-May-06 13:54 
QuestionHow to off WebBrowser SCRIPT ERROR message? Pin
Dima Filipiuk31-May-06 3:04
Dima Filipiuk31-May-06 3:04 
QuestionnGen Pin
subburaj.sabapathy31-May-06 2:25
subburaj.sabapathy31-May-06 2:25 
AnswerRe: nGen Pin
Guffa31-May-06 2:51
Guffa31-May-06 2:51 
QuestionUrgent.... Pin
compdesign31-May-06 2:22
compdesign31-May-06 2:22 
AnswerRe: Urgent.... Pin
stancrm31-May-06 2:28
stancrm31-May-06 2:28 
QuestionRecognize Managed DLL from Unmanaged ! Pin
User 209307331-May-06 2:08
User 209307331-May-06 2:08 
AnswerRe: Recognize Managed DLL from Unmanaged ! Pin
S. Senthil Kumar31-May-06 6:14
S. Senthil Kumar31-May-06 6:14 
GeneralRe: Recognize Managed DLL from Unmanaged ! Pin
User 209307331-May-06 19:17
User 209307331-May-06 19:17 
QuestionorlRegarding Crystal Reports Pin
A.Grover31-May-06 1:47
A.Grover31-May-06 1:47 
QuestionIMP(convert Hexadecimal to string) Pin
singhswat31-May-06 1:25
singhswat31-May-06 1:25 
QuestionIMP(convert Hexadecimal to string) Pin
singhswat31-May-06 1:25
singhswat31-May-06 1:25 

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.