[CLOSED] Question about MyDesktop.Modules

  1. #1

    [CLOSED] Question about MyDesktop.Modules

    Hello

    I tried to translate code from VB to C# and I stuck on a problem.

    I want to get first window from a desktop modules. In VB I wrote :


           myWindow = MyDesktop.Modules("wntTest").Window(0)
    In C# I have an error saying that :
    member could not be called and can't be used as a method (aproximately translate from french to english)
               Ext.Net.Window myWindow = MyDesktop.Modules("wntTest").Window(0);
    The goal is to add controls to the window.

    So how can I achive that?

    Edit...

    Hum, think I have found:

               Ext.Net.Window myWindow = (Ext.Net.Window)MyDesktop.Modules[0].Window[0];
    Correct?
    Last edited by Daniil; Sep 19, 2013 at 2:36 PM. Reason: [CLOSED]
  2. #2
    Hi @feanor91,

    Yes, that is correct - indexing in C# is done via square brackets.

    This also should work.
    MyDesktop.Modules["wntTest"].Window[0];
    Last edited by Daniil; Sep 19, 2013 at 4:05 PM. Reason: Please use [CODE] tags
  3. #3
    Yes, shame on me, I just begining to read book to learn C#...

    Meanwhile, is there a way to have something to have an acces to modules like in VB because how to now Module(i) is module I need if I have 20 of them, for example? I have to tuen in a foreach loop to seek Module'name?
  4. #4
    Seems, I already posted what you need. Am I misunderstanding something?

    Quote Originally Posted by Daniil View Post
    This also should work.
    MyDesktop.Modules["wntTest"].Window[0];
  5. #5
    Oh, yes, very sorry, I read and answer quicly before quiting my job. Too quickly obviously.

    Thanks

Similar Threads

  1. Desktop modules - User Controls in MVC3 RAZOR
    By millenovanta in forum 2.x Help
    Replies: 8
    Last Post: Dec 09, 2012, 6:44 PM
  2. Replies: 0
    Last Post: Jun 15, 2012, 9:06 AM
  3. [CLOSED] How add Modules in Web Desktop
    By hrc in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Apr 30, 2012, 12:31 PM
  4. [CLOSED] Using UserControls as modules and load on demand
    By smart+ in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Jul 22, 2010, 6:25 PM
  5. How to hide modules from startmenu in ?
    By presariov2013ap in forum 1.x Help
    Replies: 1
    Last Post: Mar 10, 2009, 4:19 AM

Posting Permissions