Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
B

batmike2000

@batmike2000
About
Posts
10
Topics
5
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • winforms question
    B batmike2000

    hi guys, i've found the solution: i indeed needed to use reflection but on fieldinfo level strFormName = param_Form.Name Dim param_Form_type As Type = param_Form.GetType() Dim compFields As FieldInfo() = param_Form_type.GetFields(BindingFlags.Instance Or BindingFlags.NonPublic) For Each fiField As FieldInfo In compFields Dim strCtrl(1) As String strCtrl = ReturnCompName(fiField, param_Form) For Each dr As DataRow In myrs.Rows If strCtrl(0) = dr("SecAuthCtrl_Name") And fiField.FieldType.FullName = dr("SecAuthCtrl_Type") Then Select Case fiField.FieldType.FullName.ToLower Case "System.Windows.Forms.ToolBarButton".ToLower Dim cmp As ToolBarButton = DirectCast(fiField.GetValue(param_Form), ToolBarButton) cmp.Enabled = dr("SecAuthorized_Enabled") cmp.Visible = dr("SecAuthorized_Visible") Case "System.Windows.Forms.MenuItem".ToLower Dim cmp As MenuItem = DirectCast(fiField.GetValue(param_Form), MenuItem) cmp.Enabled = dr("SecAuthorized_Enabled") cmp.Visible = dr("SecAuthorized_Visible") Case Else End Select End If Next Next this works now, tnx again for your effort batmike2000

    C# help csharp winforms docker question

  • Winforms Question
    B batmike2000

    tnx Leeland, i've found the solution: i needed to use reflection strFormName = param_Form.Name Dim param_Form_type As Type = param_Form.GetType() Dim compFields As FieldInfo() = param_Form_type.GetFields(BindingFlags.Instance Or BindingFlags.NonPublic) For Each fiField As FieldInfo In compFields Dim strCtrl(1) As String strCtrl = ReturnCompName(fiField, param_Form) For Each dr As DataRow In myrs.Rows If strCtrl(0) = dr("SecAuthCtrl_Name") And fiField.FieldType.FullName = dr("SecAuthCtrl_Type") Then Select Case fiField.FieldType.FullName.ToLower Case "System.Windows.Forms.ToolBarButton".ToLower Dim cmp As ToolBarButton = DirectCast(fiField.GetValue(param_Form), ToolBarButton) cmp.Enabled = dr("SecAuthorized_Enabled") cmp.Visible = dr("SecAuthorized_Visible") Case "System.Windows.Forms.MenuItem".ToLower Dim cmp As MenuItem = DirectCast(fiField.GetValue(param_Form), MenuItem) cmp.Enabled = dr("SecAuthorized_Enabled") cmp.Visible = dr("SecAuthorized_Visible") Case Else End Select End If Next Next this works now, tnx for your effort batmike2000

    Visual Basic help csharp winforms docker question

  • Winforms Question
    B batmike2000

    Hi leeland, the final goal to achieve is a complete component and control iteration of a form to disable /enable them and make them in-/visible if demanded. But this in a dynamic way, cause i never can tell in advance what will be on the Form. kr. batmike2000

    Visual Basic help csharp winforms docker question

  • winforms question
    B batmike2000

    Hi Dustin tnx for the reply, unfortunately it doesn't seem to work. Maybe i should dig in a little deeper, but i don't think this can work because imho components aren't fields . Tnx for the effort anyway. Maybe i shoud try another approach. If I just could get the correct container from my component (ie. the form it's hosted on but then defined as container instead of form). BTW: i'm still using .Net 1.1 and not 2.0, just to avoid confusion. batmike2000

    C# help csharp winforms docker question

  • winforms question
    B batmike2000

    hi all, I'm having a bit of an issue here and maybe one of you guys can help me out . I'm looking for a way to return all COMPONENTS in a form during run-time, and i mean components including all controls , menu's, custom controls etc. As you all now a control is a component but a component is not a control. You will probably think that i'm somesort of idiot , but i'm not (at least i think i'm not), and i've tried every possible way to reach my goal: 1) tried to convert the form as container -> didn't work 2) adding the component that needs to perform above actions and using it's own container as componentcollection holder doesn't work, bcause the container returned is the component itself. 3) returning a menu's container -> doesn't work -> it always returns nothing batmike2000

    C# help csharp winforms docker question

  • Winforms Question
    B batmike2000

    hi all, I'm having a bit of an issue here and maybe one of you guys can help me out :-D. I'm looking for a way to return all COMPONENTS in a form during run-time, and i mean components including all controls , menu's, custom controls etc. As you all now a control is a component but a component is not a control. You will probably think that i'm somesort of idiot , but i'm not ;-) (at least i think i'm not), and i've tried every possible way to reach my goal: 1) tried to convert the form as container -> didn't work 2) adding the component that needs to perform above actions and using it's own container as componentcollection holder doesn't work, bcause the container returned is the component itself. 3) returning a menu's container -> doesn't work -> it always returns nothing batmike2000

    Visual Basic help csharp winforms docker question

  • HOWTO make child controls scroll inside a containercontrol
    B batmike2000

    Hi to all, can anyone give me a head start on following problem(i've made the same post in the VB.Net post section): I have an applications in which I add controls to a treeview (treeview = container). The problem is that when i scroll my treeview, the nodes move but the controls stay at their place ( the don't move in other words). ANy idea on how to make them move and keep their raltive position (now they are located next to the node which handles as the controls label) kind regards, Bats (Mike Martin)

    C# csharp docker help tutorial

  • How to show the form in this case?
    B batmike2000

    Hi, If you are trying to make the window as top-most accessible window you should try to load it with .ShowDialog instead of show. batmike2000

    Visual Basic question tutorial

  • HOWTO: make child controls scroll inside a container?
    B batmike2000

    Hi to all, can anyone give me a head start on following problem: I have an applications in which I add controls to a treeview (treeview = container). The problem is that when i scroll my treeview, the nodes move but the controls stay at their place ( the don't move in other words). ANy idea on how to make them move and keep their raltive position (now they are located next to the node which handles as the controls label) kind regards, Bats (Mike Martin)

    Visual Basic docker help tutorial question

  • custom control question
    B batmike2000

    Hi to all, I have a question for anyone who can help me on the subject custom controls in design time. What i want to achieve is following: how can you create a method/function in the propertypage in the visual studio IDE just klike the ones you have with like for example the SQLDataAdapter (in the help/description field some links appear with behind that some wizard functionality). Anyone any ide how to do that? I don't seem to find any good example anywhere. Another thing i wanna do (i know i ask a lot, but it aren't common things in my eyes so that why i post everything here :-D) is to add custom section in the app.config during design time ( so not to the compiled app.exe.config !!!!!) What is the easiest way to do such a thing, i mena can i just use the executing aasembly name? or is there a catch. For thos who can help me, many thanks in advance. Mike Martin mike martin

    Visual Basic question visual-studio tutorial csharp design
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups