VS 2008 Multi Forms - Form1 Not Reloading?

Apr 27, 2009

I am using two forms.

Form 1 organizes student information from a textfile

Form 2 appends a new student

I load the second form with:

Dim secondForm As New Form2
secondForm.ShowDialog()

It loads, cool..When I close form 2 with me.close, form 1 does not have the updated information. (Most things load with the form_load event)This is form my intro to VB course.

View 6 Replies


ADVERTISEMENT

Forms :: Form Variable Value Blank / Null When Move From Form1 To Form2 And Back To Form1

Oct 27, 2009

In my window application, Form1 variable eg. Public str as string. value blank/null when move to Form2 and Back to Form1. How to maintain Form1 varable's value when back to Form1 In vb.net if any one know, reply me soon

View 2 Replies

Forms :: Navigate From Form1 To Form2. And Then Close Form1?

Feb 16, 2009

I have got 2 forms ----- form1 and form2

i wanted to navigate from form1 to form2. and then close form1

i did the following code.

-sub form1 _ page load
dim form as new form2
form.show()
me.close
-end sub

i also tried -- form1.close() and form1.dispose() but all in vain

Problem is that my form1 is not getting closed

View 7 Replies

VS 2008 Open Additional Forms In Center Of Form1 Position?

Jun 10, 2009

I would like all additional forms opened by some command the user performs on the Form1 to open in the center of Form1, no matter where the user has physically moved Form1 on their desktop screen. The application itself (Form1) is a small box with dimensions of 442x306 that will open even smaller forms on top of itself. Right now, I have everything positioned to open in the center of the screen so, in theory, everything works/looks fine as long as the user doesn't move Form1 anywhere.

View 15 Replies

Forms :: Exception On Calling Form1 From LoginForm And LoginForm From Form1

Mar 11, 2010

I have login form as start up form and i call Form1 after successful validation and in Form1, i have close button on click of Close i would like to reset username and password fields on loginform to null. If i add code in form1 below i get exception Dim fmLogin As New LogInForm

An unhandled exception of type 'System.StackOverflowException' occurred in System.Windows.Forms.dll

Make sure you do not have an infinite loop or infinite recursion

I get above on LoginForm below statement Dim fmMain As New Form1

View 1 Replies

VS 2008 Capturing Image Without Reloading?

Mar 19, 2010

I'm working on a software where I need to download an image from the web browser without reloading the image.

View 2 Replies

VS 2008 Download Image In Webbrowser Without Reloading?

Aug 23, 2010

I have looked around and cannot find a way to download an image from a webbrowser without reloading the image or webbrowser AKA using the cached image.

View 1 Replies

VS 2008 Multi-threding - Adding Multi-threading Facilities - Cross-thread Operation Not Valid

Feb 10, 2010

I'm adding multi-threading facilities for the first time. I have a function that is wrapped to be run in a separated thread. This function retrieves data (text) from a combobox and it works for sure without multi-threading.

When I call it as multi-threaded, I get the following error when I try to retrieve the data from the cmobobox: Cross-thread operation not valid: Control 'cmb1stBL' accessed from a thread other than the thread it was created on.

It looks like a restriction of thread-safety... I assume that the child thread cannot read from his parent, to make sure that he doesn't change his parent data. So how can I read the data from the combobox? Should I read the comoboxbox data before calling the child thread?

View 4 Replies

Forms :: Find The Position Of Form1?

Jun 11, 2009

I'm literally just started learning VB today and need to find the location of Form1 on the screen.

View 1 Replies

Display Same Button(button1) In Two Different Forms(form1 And Form2)?

Dec 22, 2011

Suppose, i have a button(button1)in form1.

Now i have opened a new form.

I want to display the same button(button1) from form1 to form2.

View 2 Replies

Forms - Reffer To An Object In Form1 With Code In Form2

Mar 5, 2009

If I create a new form, say Form2, in order to use it in a program I must create an instance of it: Dim frmTwo and new Form2, If Form2 has a text box on it I can put this code in Form1: [Code] But what happens if I want to refer to an object (a text box)in Form1 with code in frmTwo? This doesn't work: [Code] How is the instance of Form1 created? And How do I refer to it?

View 3 Replies

Creating Forms And Objects Through Code In The The Load Event Of Form1?

May 22, 2011

I've been working on creating forms and objects through code in the the load event of Form1, truthfully theres a few questions I have under this one category but to start I want to create a button click event that will check what button was pressed then set that button to a variable. I want the event to treat the button that was clicked like it was that buttons click event.Here's a shortened version of my code (Lol if you can call this short):

[code]...

View 3 Replies

Display Date And Time On Top Of The Form Where Normally Written Form1 Forms Name?

Jun 6, 2011

I want to display date and time on top of the form where normally written form1 forms name. i want to display date in formate of for example 23 August 2010 and time in this formate 12:33:20AM

View 7 Replies

Forms :: Form1 Load Event - Drawings Appear For An Instant And Then Dissappear?

Mar 3, 2010

I am trying to develope a small graphics application in VB.NET. My startup form has a picture box with a background image loaded from a file. The user can click spots on the picture box and this draws some circles on it. On exit the coordinates for these spots are saved to a file.In my form load procedure I load the background image, the coordinates for the graphics(saved from the last time the program was run), and then call the drawing procedure.

The drawings appear for an instant and then dissappear. If you click the picture box the graphics re-appear.The form works fine once you do this.I guess the picture box is refreshed by the form load event and this is causing the drawings to be wiped.(I stalled the call to the drawing procedure by using a timer and this works but I am sure there is a proper way of fixing this)Is there a way of ensuring a form is fully loaded or making sure the drawing procedure occurs only when the form is fully loaded?

HERES THE
Private Sub Form2_Load(ByVal eventSender As System.Object, ByVal eventArgs As System.EventArgs) Handles MyBase.Load
Me.WindowState = FormWindowState.Maximized[code].....

View 8 Replies

Forms :: Pass The Task_ID Of Selected Item From Form1 To Form2?

May 20, 2009

I had two forms, first forms shows all the task details in a list and user select any task and the second form shows the details of that task in edit mode so user can edit the record, now i don't know how to pass the Task_ID of selected item from form1 to form2.

View 1 Replies

Forms :: Stop The Sound In Form1 From Playing When Form2 Open?

May 30, 2009

im trying to open another form2/app that have music but i wanna stop the sound in form1 from playing when form2 open?

View 1 Replies

VB2008: Form1.BackgroundWorker WONT Stop Form1.Timer From Form3 Click

Sep 9, 2011

Using VB 2008:Situation: A Form1.BackgroundWorker calls a Form1.subroutine. That sub starts a Form1.Timer with Me.tmrOK_BlinkForm.Enabled = True...fires Timer code in event: Public Shared Sub tmrOK_BlinkForm_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles tmrOK_BlinkForm.Tick

Form3.Visible = True
Form3.Label1.Text = gNowButtonDispText
Form3.BackColor = Color.White
Form3.Refresh()

[Code]...

There must be a way to do this, I just need the correct BackgroundWorker Syntax send Stop commad to Form1.Timer from Form3.Click_event...all inside a Form1.BackgroundWorker thread started in Form1.

View 4 Replies

When Background Worker Opens Form1 / Form1 Is Not Responding

Jun 12, 2010

I have an aboutbox1 and form1..I also have a button. When I click the button it runs the backgroundworker. My background worker then opens form1.My backgroundworker doesnt just open it, it does alot of other stuff so don't ask why im doing it like that.My problem:When the background worker opens form1, form1 is not responding.

View 3 Replies

Create Multi-forms At Runtime?

Nov 24, 2010

Background: ok I have an app that hides in the system tray. During its operations in the background it can try to invoke an outside app several times.. and I need to track when the call errors out.. I was using messagebox's but for some reason if the app hidden the messagebox's dont come up and goto the forefront. So in reading about this I read I should just use a form to do it.. so I did.. works fine.. well works fine for one error.. but if the user tries to do 3 of the same operation.. and lets say first errors.. second works and third fails.. using one error form wont work.. since I diaplay the error one.. then need to display error 2.. I need 2 error forms so they can click OK on both.[code]...

View 2 Replies

Forms :: Multi Selection In PictureBox?

Jun 3, 2009

I'm currently working on multi selection on the Picturebox. I'm kinda of stuck with these coding.

Public Class Page_2
' for selection on part of body
Private start As Point = Point.Empty

[code]....

View 1 Replies

Multi Forms And List Boxes?

Apr 12, 2011

Ok, Im having trouble passing a value from one form back to another using a listbox... The user clicks a button in the main form to bring up an instance of another form (form2.show). In that form, the user then then selects a number 1-5 and then presses done:

Code:
Private Sub frmPlayer_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim x As Integer
If lboNumber.Items.Count = 0 Then 'list box is empty
For x = 1 To 5

[Code]...

How do I pass that value back to the main form as a value when the user clicks done?

View 2 Replies

Difference Between Form1.Close & Form1.Dispose?

Oct 21, 2010

Which different abount Form1.Close and Form1.Dispose?

View 1 Replies

Forms :: Listbox - Multi Select Option?

Dec 15, 2011

I had set the multiselect option to true for listbox.Let me know how to move the list items up and down with this option.

View 2 Replies

Forms :: Multi Column Combobox (looking For Method)?

May 14, 2010

I'm using vs2008 with vb.net, and I have googled all around for a multi column combobox and I know there is not an easy way to do it in .net. However, this is my situation:I have a table in my database that only has around 4 or 5 entries, with the columns FirstName, LastName, Type. I need all of these columns for each of the 4 or 5 entries to be displayed in the combobox. I've been trying to think of simple ways to do it such as counting all the rows, selecting each cell in a loop and programmatically assigning them to the comboboxes, but I realized that the ID column for these entries have numbers that do not go chronologically. (I thought that if I counted the rows, the row number would correspond to the ID number and I could go about looping and assigning variables/concatenating them into the combobox, but this is not the case).

So I am just looking to see if anyone else has any ideas on what I can do to solve this? It's a pretty simple problem but I'm kinda out of any simple ideas.

View 1 Replies

Forms :: Multi Select / Drag And Drop

Oct 6, 2009

I have been given the task of making a small program in vb.net to have two list boxes. The first list box contains the data and the second one is blank, when you select the one bit of data from the first list box it can be dragged and dropped into the other list box. my task is to make it so you can select multiple bits of data from the first list box and all that is selected is draged over to the second one when you drag and drop it.

View 1 Replies

Forms :: Multi Threading With Separate Classes

May 7, 2011

I'm trying to dive into what I consider a deeper end of VB.net to see how far I can go with it. I have a project created, ironically called "My First Server". The aim of this is to create a server which can handle multi clients but additionally isn't the commonly shown tutorial setup of a console application. So it is created as a Windows Form application. The main form (Public Class PrimaryForm) consists of only one control which is a listbox control. This is named LogOutput.

[Code]....

View 7 Replies

Implement A Multi User Login On One Of Forms?

May 24, 2012

I am currently working on a project for school in which I am trying to implement a multi user login on one of my forms. I have an internal database connected in which one of my tables contains the user-names and passwords. I have a For/each loop to search the table for a matching username/password before allowing access to next form. The problem is even if the username/password is correct, my message box still appears to notify of invalid credentials, but still allows access to other form. The problem only occurs when I implement two For/each loops. With one, code works fine. Can any one see what might be wrong?

[Code]...

View 5 Replies

Sharing Multi-dimensional Arrays Across Different Forms In VB?

Jul 9, 2011

I have a very simple 2D array, it holds a list of song titles, their genre, and their runtime. frmMain loads the array from a text file and allows me to manipulate it and boil it down to a desired (implicitly sized) playlist. i want to THEN pass that playlist array to a second form, frmPlaylist The problem i'm running into....When frmPLaylist calls the Property from frmMain I receive an error that VB cannot convert the string value to a two dimensional array. Simplified...frmPlaylist is all locked and ready to receive a 2D array, but frmMain seems to only be sending a single string variable. on frmMain

Public ReadOnly Property PlaylistOut() As String
Get
Return mstrTimedPlaylist(,)

[code].....

View 1 Replies

Multi Forms And Passing A Value From One Form Back To Another Using A Listbox

Apr 12, 2011

Im having trouble passing a value from one form back to another using a listbox... The user clicks a button in the main form to bring up an instance of another form (form2.show). In that form, the user then then selects a number 1-5 and then presses done:

[Code]...

View 2 Replies

Windows Forms Datagrid Disable Multi-Select?

Aug 24, 2011

How can you disable the multi-select using the windows forms datagrid in vb.net? I want the user to have only the ability to select a single row.

View 15 Replies







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