Simple But Urgent.

[b][red]This message was edited by wvbotha at 2007-1-31 1:42:44[/red][/b][hr]
Hi,
This is my Prob.
I'm using VB.Net as front end.i need to pass same string value to a form.my program first starts with login form(it accept User Name & Password. if it s true Main form ll display.To Go To Products Form it has to select from menu bar which is in Main Form) according to user name his Role(Post) has to pass Form Name Products.

But the role Name canot get from Product form.It Display on Main Form.

Form Diagram:

Login >> Main >> Product
i think i have to use Global Variable. but don't know how to do it in VB.NET.
Please Some One HELP ME...



Comments

  • [b][red]This message was edited by jbassmanp at 2007-2-3 12:36:45[/red][/b][hr]
    [b][red]This message was edited by jbassmanp at 2007-2-3 12:35:55[/red][/b][hr]
    Try this create a module and in it declare variables such as:
    Public rolename as string
    this variable rolename will pass down to all forms in your project.
    there are other ways but I found this to be the easiest for me....

    Let me know this helps you!

    : [b][red]This message was edited by wvbotha at 2007-1-31 1:42:44[/red][/b][hr]
    : Hi,
    : This is my Prob.
    : I'm using VB.Net as front end.i need to pass same string value to a form.my program first starts with login form(it accept User Name & Password. if it s true Main form ll display.To Go To Products Form it has to select from menu bar which is in Main Form) according to user name his Role(Post) has to pass Form Name Products.
    :
    : But the role Name canot get from Product form.It Display on Main Form.
    :
    : Form Diagram:
    :
    : Login >> Main >> Product
    : i think i have to use Global Variable. but don't know how to do it in VB.NET.
    : Please Some One HELP ME...
    :
    :
    :
    :







  • :but how to access this module. in normal .Net form v can create instanse like,
    dim a as new form1

    but how to access this module? even i feel this will work.this method will work.i did lik this.i passed login type to Main form and from there it is passing to other forms.(i know it is not the best practice) any how thanks.

    : [b][red]This message was edited by jbassmanp at 2007-2-3 12:36:45[/red][/b][hr]
    : [b][red]This message was edited by jbassmanp at 2007-2-3 12:35:55[/red][/b][hr]
    : Try this create a module and in it declare variables such as:
    : Public rolename as string
    : this variable rolename will pass down to all forms in your project.
    : there are other ways but I found this to be the easiest for me....
    :
    : Let me know this helps you!
    :
    : : [b][red]This message was edited by wvbotha at 2007-1-31 1:42:44[/red][/b][hr]
    : : Hi,
    : : This is my Prob.
    : : I'm using VB.Net as front end.i need to pass same string value to a form.my program first starts with login form(it accept User Name & Password. if it s true Main form ll display.To Go To Products Form it has to select from menu bar which is in Main Form) according to user name his Role(Post) has to pass Form Name Products.
    : :
    : : But the role Name canot get from Product form.It Display on Main Form.
    : :
    : : Form Diagram:
    : :
    : : Login >> Main >> Product
    : : i think i have to use Global Variable. but don't know how to do it in VB.NET.
    : : Please Some One HELP ME...
    : :
    : :
    : :
    : :
    :
    :
    :
    :
    :
    :
    :
    :

  • This works in both VB 2003 and VB 2005.
    1. go to File... select add New Item
    2. Select Module instead of Form etc.
    You will not get another form but a work area for coding.
    From here the main thing you need for now is the add:
    Public variable as string or integer (what ever you need)
    you can have more variables as needed. That is it... save work, delete your declared variables else where in prog. And Run Prog. ---
    You have a gobal variable that will pass from form to form no problem...
    Try it and let me know how it works for you....


    :but how to access this module. in normal .Net form v can create instanse like,
    : dim a as new form1
    :
    : but how to access this module? even i feel this will work.this method will work.i did lik this.i passed login type to Main form and from there it is passing to other forms.(i know it is not the best practice) any how thanks.
    :
    : : Try this create a module and in it declare variables such as:
    : : Public rolename as string
    : : this variable rolename will pass down to all forms in your project.
    : : there are other ways but I found this to be the easiest for me....
    : :
    : : Let me know this helps you!
    : :
    : : : [b][red]This message was edited by wvbotha at 2007-1-31 1:42:44[/red][/b][hr]
    : : : Hi,
    : : : This is my Prob.
    : : : I'm using VB.Net as front end.i need to pass same string value to a form.my program first starts with login form(it accept User Name & Password. if it s true Main form ll display.To Go To Products Form it has to select from menu bar which is in Main Form) according to user name his Role(Post) has to pass Form Name Products.
    : : :
    : : : But the role Name canot get from Product form.It Display on Main Form.
    : : :
    : : : Form Diagram:
    : : :
    : : : Login >> Main >> Product
    : : : i think i have to use Global Variable. but don't know how to do it in VB.NET.
    : : : Please Some One HELP ME...




  • :Yes. It Worked. i found out accessing Module in last night. thanx Buddy. it worked Properly. :-)
    This works in both VB 2003 and VB 2005.
    : 1. go to File... select add New Item
    : 2. Select Module instead of Form etc.
    : You will not get another form but a work area for coding.
    : From here the main thing you need for now is the add:
    : Public variable as string or integer (what ever you need)
    : you can have more variables as needed. That is it... save work, delete your declared variables else where in prog. And Run Prog. ---
    : You have a gobal variable that will pass from form to form no problem...
    : Try it and let me know how it works for you....
    :
    :
    : :but how to access this module. in normal .Net form v can create instanse like,
    : : dim a as new form1
    : :
    : : but how to access this module? even i feel this will work.this method will work.i did lik this.i passed login type to Main form and from there it is passing to other forms.(i know it is not the best practice) any how thanks.
    : :
    : : : Try this create a module and in it declare variables such as:
    : : : Public rolename as string
    : : : this variable rolename will pass down to all forms in your project.
    : : : there are other ways but I found this to be the easiest for me....
    : : :
    : : : Let me know this helps you!
    : : :
    : : : : [b][red]This message was edited by wvbotha at 2007-1-31 1:42:44[/red][/b][hr]
    : : : : Hi,
    : : : : This is my Prob.
    : : : : I'm using VB.Net as front end.i need to pass same string value to a form.my program first starts with login form(it accept User Name & Password. if it s true Main form ll display.To Go To Products Form it has to select from menu bar which is in Main Form) according to user name his Role(Post) has to pass Form Name Products.
    : : : :
    : : : : But the role Name canot get from Product form.It Display on Main Form.
    : : : :
    : : : : Form Diagram:
    : : : :
    : : : : Login >> Main >> Product
    : : : : i think i have to use Global Variable. but don't know how to do it in VB.NET.
    : : : : Please Some One HELP ME...
    :
    :
    :
    :
    :

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories