Module - Two Forms . Each Form Has A Text Box

Feb 9, 2009

I have two forms . each form has a text box. if i type something in first text box, and click next button, it has to show up on the second text box which is on the second form. how would i code this, or how can i use a module?

View 5 Replies


ADVERTISEMENT

Forms :: Update Label (text) On Form From Module?

May 2, 2010

I have a Main Module that loads a form. I want to update text on a Label, my code is:

Public mFormSplash As Form = New FormSplash
Sub Main
With mFormSplash[code]....

The code loads the form OK but does not update the Label's text (LabelStatus)I am getting an error Error:

'LabelStatus' is not a member of 'System.Windows.Forms.Form'.

This worked ok on a previous project and I can't work out what is different.

View 6 Replies

Forms :: Send Text To Label From Code Module

Mar 17, 2010

Have a label on a form which I want to show run time status, and have a code module which stores some functions. How do I send text from code module functions to this label on form?

View 2 Replies

Forms :: Access Main Form From Second Thread Running In A Module?

Jun 22, 2010

I was a vb6 user, done a few projects only with forums Now i am moving to vb.net(vb2010) and i have some trouble.Lets say we have a form(form1), a module(mod1) and a textbox on the form1.

i want to start a Sub (DoWork) in the module but in a new thread.

Dim Thread1 As System.Threading.Thread
Thread1 = New Threading.Thread(AddressOf mod1.DoWork)
Thread1.Start()

The DoWork sub does some stuff and when it's finished i want to change the text of a textbox1 in the main form and start another sub (DoWork2) on the main form under the main thread not the one DoWork is running under.

Plese do not refer me to another post that mighe give me a part answer, try to explain to me what i have to do and why.

View 3 Replies

Forms :: Closing Forms On MenuClick From Module?

Dec 13, 2009

Im running a program with multiple forms with a menu and toolstrip defined and assigned with properties in a module. each form has the Call menuload (Me) in the form_load sub.

My problem is that these menu's have menuitems which need close the shown form and open another. a sample of one of my menuitems is:

Module MenuTemplate
Friend WithEvents frm As Form
Friend WithEvents menustrip As New MenuStrip

[Code].....

View 14 Replies

Forms :: Save The Text Box Values Of A Form To A Text File?

Jul 26, 2009

I have to save the text boxe values of a form to a text file almost like a data record. I will be saving an Employee First Name, Last Name, Dept Number, and Phone Number. This I know how to do using streamwriter.

next form which we have to use stream reader to load one record at a time. The form has a next button to load the next record. How do I seperate each record (I am sorry for calling it a record if this is inappropriate) when use streamreader and how do I load a record at a time.

I know how to open a file and use streamreader, I just don't know how to read one record at a time and move to the next one.

View 1 Replies

Forms :: Update Data In A Text Box On Form 1 From A Textbox On Another Form?

May 15, 2011

I was using 2 forms, the first one has general data capture and the second one is a calendar form. On Form1 I have mulitple windows controls. A Textb ox and beside a Calendar button. When I click on a Calendar Command button, it should open calendar form and once the user selects the date, the date should be placed in the text box on the form1. Identical to this on Form1 I need multiple textboxes that needs date to be captured.I cannot use a global variable for this as I need to validate mulitple text boxes. To explain this, I have a Transaction Date and Date Received. I need to validate whether Transaction date is prior Date Received or not? I dont want to use several global variables b'coz I might need multiple validations as above. Please help me on this.

View 6 Replies

Use In The Module And In The Forms?

May 3, 2011

I'm trying to declare a array that I want to use in the module and in the forms. I like it to be usable all over but I cant get it to work.I tried this code but when I want to use it in the module it says that it isn't declared.

Code:Public Class Form1 Public ShuffleArray() As String Anyone know what I should do to make it work?

View 4 Replies

How To Set Module To Be Read By All Forms

Jan 31, 2012

Ok im failing at this. Im trying to get all my forms on one project to read my Module. I need them all to read because of the way im building it. Im trying this code but it dosent seem to be working.

[Code]...

Y can i not link my form and button type of that form to that code? Do i need to use a differnt Sub or what?

View 1 Replies

Forms :: Declaring Module Variables?

Feb 11, 2009

I am new to the forum and new to the visual studio set up and have been working at a practical at home and have ran into some difficulty. The notes say that I am to declare several module variables below the section entitledI have the rest of the form complete but have been unable to locate where I am to place this code

View 1 Replies

Forms Control For Availability Module?

Apr 12, 2012

I'm building a apps that which allow to check the room availability for a hostel.I am looking some controls which is similiar to the following which allowed me to change the color of the box during runtime.

View 10 Replies

Start A Module And Link It To Other Forms?

Jun 24, 2011

i have 2 forms and i want buttons on form1 to tell a label on form2 different numbers. ( if button 1 is hit then label.text = 15, if button 2 then .text = 20 ect)

and i also want a variable to make it so that every time i click the number goes down by one.

ive been reading on google and in vb6 you would use a module but ive read mixed things on google that i could use a class or a module. So i started testing with a module saying

Public a As Integer
For a = 1 To 30
a = a - 1

[Code]....

how to start a module and link it to other forms?

View 1 Replies

Forms :: Close A Module In A Multiform Program?

Nov 26, 2004

I have a quick VB.NET question.a) How do I close a module in a multiform program.I tried Me.Close() but it says it can't use it in modules.b) How do I control little red X button on forms? What if instead of closing the program I want to hide the form when the user presses on red X in the top right corner?

View 7 Replies

How To Access WebBrowser Control In Forms From Module

Jan 3, 2012

I am trying to access a browser control in one of my forms from a module but keep getting an error. I attached a screen capture showing the code and the error balloon. The subroutine is public, and I am addressing the browser correctly. If I copy that same code into the "Main" form, and it works perfectly.

View 3 Replies

Use A Custom Cursor In Program That Has 4 Forms And A Module

Sep 20, 2011

I've been trying to use a custom cursor in my program that has 4 forms and a module.

-Module-
Public Declare Unicode Function LoadCursorFromFile Lib "user32.dll" Alias "LoadCursorFromFileW" (ByVal filename As String) As IntPtr
Public MYDoc As String =

[Code]....

I used this thread to figure out how to do this:

[URL]

The custom cursor is indeed a cursor file (*.cur)

View 5 Replies

VS 2008 Closing Forms On MenuClick From Module?

Dec 11, 2009

Im running a program with multiple forms with a menu and toolstrip defined and assigned with properties in a module. each form has the

Call MenuTemplate (Me) in the form_load sub.

My problem is that these menu's have menuitems which need close the shown form and open another. a sample of one of my menuitems is:

[Code]...

View 2 Replies

1 Serialport 3 Forms - Currently Attempting To Use A Module In Vb 2010 Express?

Feb 26, 2012

I 'm a beginner and have a project that I'm using to turn lights on and off. I need to use separate forms for display on remote monitors. My problem is each form needs the same serial port open to work and the port won't open unless it's closed in the previous form. Using a module works for opening and closing the port, but only for one round. If I try to revisit a form I already accessed it doesn't work.

Public Sub sp1(byval SerialPort1)If Form2.SerialPort1.IsOpen = TrueThen Form1.SerialPort1.Close() If Form3.SerialPort1.IsOpen = TrueThen Form3.SerialPort1.Close() Form1.SerialPort1.Open() end sub
Public Sub sp2(byval SerialPort1) If Form1.SerialPort1.IsOpen = TrueThen Form1.SerialPort1.Close() If Form3.SerialPort1.IsOpen = TrueThen Form3.SerialPort1.Close() Form2.SerialPort1.Open() EndSub
Public Sub sp3(byval SerialPort1) If Form1.SerialPort1.IsOpen = TrueThen Form1.SerialPort1.Close() If Form2.SerialPort1.IsOpen = TrueThen Form3.SerialPort1.Close() Form2.SerialPort1.Open() EndSub
end Module

View 2 Replies

Forms :: Set And Get A Value From A Class Property Within The Main Event Of A Module?

Jul 8, 2011

the project uses a submain as startup object which is located in a module, thy so the application will be started in tray. Within the main() event i need to deserialize a xml file and with it set the properties of a class and then set what the application will do.The problem is, after I deserialize it and put set the property values I try to get them in the same event(main) but when it gets the value it returns as nothing(if string) or 0(if integer) but in the debugging i saw it setting the values. Is there a way to do that, within the main() event of a module to set the properties of a class and then get them without being nothing/0 ?

View 3 Replies

Forms :: Creating Editable Text On A Form?

Jun 2, 2009

I am using VS2008, I need to update a vb6 application that I wrote a while back and make it more user friendly. [EDIT] I am not using any of the vb6 code, this is a complete rewrite.[/EDIT] The application basically creates ZPL based on user inputs, it sends the ZPL to the printer via the parallel port and we have our label. I know there are pre-written pieces of software that do this but I have a few other things going on that are not an option for a pre-written label application.

The task at hand at this point is creating a form which will display a mock-up of the label and allow the user to create text, rotate it, move it, re-size it etc. I will also have to add in image support a little further down the line but I figured i would keep it simple to start out. This is my first major project in .net (the company has been hesitant to spend the money until now and I haven't had the time to do much on my own.)

I think the best place for me to start would be with a simple form with a button that allows me to create text and edit it only. I am unsure of the best way to pull this off, should I be using a label, a text box with the design styles turned off or something altogether different that I may not know about?

To summarize:

a) What type of object should I be using?
b) How would I go about creating it?
c) How should I go about making it movable/editable at runtime?

As an aside, I am aware that the ThermalLabel SDK would probably be beneficial in this application but the company is not willing to spend anymore on this project.

View 2 Replies

Forms :: Displaying Text Inside A Form?

Jun 29, 2009

actually i'm trying to write a small program for my project's presentation. i created a form with buttons, each time i click on a button, i want a text loaded from MS word document to be displayed inside the form.

i thought about dislaying the text inside a label or textbox, but the problem is that the text doesn't preserve its state, i mean colors and fonts which are defined in the MS word document, it just displays everything in black color, small size..etc, even if i change the properties of the label in color or font, thoses changes will be applied to the whole text.

is there any control who can display the text loaded from a MS word coument with its colors and fonts which are already defined in the word document, or there any solution to do this ?

View 3 Replies

.net - Finding Out Which Instance Of A Form Initiated Another Form Or Module

Oct 5, 2010

I'm trying to figure out the best way to reference a control on a form from within a module. Unfortunately the form is just an instance, so it's not as easy as calling form.control...

Dim ChildForm As New frmSearch
' Make it a child of this MDI form before showing it. '
ChildForm.MdiParent = Me
ChildForm.Show()

That form has an option for printing, which calls another form where certain options are chosen. The print form in turn calls a function in a module, which tries to reference back to the origional form.

childform as new frmSearch -> frmPrintForm -> sub okToPrint (in module Print)
okToPrint tries to reference a listview on frmSearch, but can't find it.
For Each itmX In frmSearch.lstResults.Items

So the solutions I can think of off the top of my head are:

1. Somehow divine which form is the caller of frmPrintForm

2. Pass ChildForm to the frmPrintForm as a variable to be passed on to module Print..

3. Use frmSearch directly instead of using an instance of it.

Number 1 would be my preference, as I don't want to have to pass forms around like that.

View 4 Replies

Forms :: Change The Text Displayed In The Banner Of The Form?

Oct 19, 2010

When in design view I can change the text displayed in the banner of the form(next to the icon) but when I build the code and test the form doesn't have the text displayed? I'm using VB express 2008

View 5 Replies

Forms :: Save Form Data To Text (.txt) File?

Dec 21, 2010

I wanna save the data present on the form to the text file.I am using vb.net for this. how can i write the text present on the form in the same formate (showing on the form) in the .txt file.

View 2 Replies

Forms :: How To Bind Form Label Or Text Box To Class Variable

Mar 11, 2009

I have a problem to solve and not quite sure if the way I think is correct.

I have a main form class MainForm the class has got: a variable call Value and a label called LabelValue

Now I would like to automatically update LabelValue every time the Value changes his value

View 2 Replies

Forms :: Creating Paragraph Styles Of Text In Window Forms Text Controls?

May 8, 2010

I am trying to build a NOTEPAD/WORDPAD like application with vb.net on visual studio 2008.

I need an option to define and choose (MsWord, or CSS like) paragraphs styles, such as: "heading1", "green quotes", etc.

View 1 Replies

Get Form Name In Other Module?

Jun 18, 2012

I have a connection module in which I have written the open and close database connection.... if database connection is an error it will return false else if success it will return true the function of the modules will be called from the form code....

what I need is if the connection is an error the module should also get the form name which returned the error...is it possible???

check my below code....

DBConnection.module
Imports System.Data.SqlClient
Module DBConnection

[Code].....

now what I need is if the functions Open_DB_Connection() or Close_DB_Connection() returns error it should prompt the form name....

View 4 Replies

Control Form From Module?

Jun 20, 2012

I recently have convert my project from VB6 to VB.NET2008,after the convert here is a sub that control form from a module that i create,the error was something like

"cmdAdd is not a member of System.Windows.Forms.Form"
Public Sub ButtonSet(ByRef frmObj As System.Windows.Forms.Form)
frmObj.cmdAdd.Visible = True
frmObj.cmdCopy.Visible = True
frmObj.cmdEdit.Visible = True

[Code]...

View 1 Replies

Editing A Form Through A Module?

Jul 14, 2009

How can I edit my a form through a module? I am using this code in the module.

Here is where I get an error: Private Sub ExtendedWebBrowser_NewWindowExtended(ByVal sender As Object, ByVal e As WebBrowserNewWindowExtendedEventArgs) Handles Me.NewWindowExtended Button1.Text = "New window event just triggered!"End Sub

The code editor will not recognize when I type Form1, and I obtain the following error when I manually type it:form1' is not declared.I sense there is something I can do here which is very easy to fix this, but I have not worked much with Classes before.

View 2 Replies

How To Refersh A Form From Module

Jul 22, 2011

he form has a listview control. The form call a function stored in a module VB file. In the function, I will do something. I want to add a monitor in the function. When finish somethings, the function will add some message to the

View 1 Replies

Notify A Form Sub From Module?

Nov 21, 2010

I am writing a program in VB2010 Express that handles serial port communication. All subs and functions that handle writing to, and reading from the serial port are in a module. These subs and functions are typically called from a form, e.g. by pressing a button. The command is then sent to a device attached to the serial port, and this device replies with a number of bytes as a result. A 'ReceivedDataHandler' is used to handle the serialport.datareceived event. [code]....

View 6 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved