CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: Form

  1. #1
    Join Date
    Jan 2000
    Posts
    13

    Form

    Hi,

    I create a program that load Function No, Function Description and Form Name into a MxFlexgrid.

    I wish to activate according when the Function No is selected by refering to the Form Name store in the MsFlexGrid.

    I can get it work, can someone please help.

    Thanks

    Zhang YongZhi



  2. #2
    Join Date
    Oct 2000
    Posts
    663

    Re: Form

    Hi:
    I think there are several ways to solve it. First, you can try "Find" search from database.
    Second, using "Select Function NO from XXXX where Form Name = MxFlexgrid.text". Third, you can compare with Form Name column to matches your need(Form Name) and then you will know the mxFlexgrid.row. You can set mxFlexgrid.col=Function No columns number. Finally, you can get your Function NO.

    shawn


  3. #3
    Join Date
    Jan 2000
    Posts
    13

    Re: Form

    Hi,

    Thanks for the reply.

    What I need is to activate the selected Function No. by the FORM Name attached to it, this way I can change the layout of the function in the INI file without having to change the VB program.

    There is a LOADPICTURE(picfilename), is there a LOADFORM(formname) function ?

    Thank you.

    Zhong YongZhi


  4. #4
    Join Date
    Oct 2000
    Posts
    663

    Re: Form

    Hi:
    There is a load form_name. This function will cause to open this form. The INI file is supoosed to save information. I am not sure which way is better. Maybe you can try
    1.
    select case formname(or function No.)
    case formname1:
    call function 1
    case formname2:
    call function 2
    end select

    PS. I had used string + string. It didn't work.

    2.
    use class module to exchange function name and function No. The method is same 1. The only different is the variable(formname) in class module that can be save until you change next time. That I know and I will do.

    I wish it can help you.
    shawn



  5. #5
    Join Date
    Apr 2000
    Location
    Houston, TX, USA
    Posts
    199

    Re: Form

    Also look at the CallByName function. I think this is what you are trying to do.


    Tim Cartwright 'Will write code for food.
    Sr Systems Architect - Information Systems
    Splitrock Services Inc.
    Tim C.
    //Will write code for food

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured