Reloading/refreshing Form?

Jan 17, 2012

I've been working on this game the past few days, a simple game where two people control different tanks, and shoot each other, very basic so far.The problem I have is when one player is dead. I have the form recognizing each players death by using this code (It's within a timer subroutine)

'Player One Dead
If intPlayerOneHealth <= 0 Then
btnReplay.Visible = True
End If

[code]....

and that code is replicated for every key pressed (Arrow keys, WASD, e, and end). Those booleans are handled in a timer subroutine, where if the boolean is true, they will move/shoot. (Turning the booleans to false is done in the 'Private Sub KeysUp' subroutine)

TL;DR How do I get the game to restart itself when a player dies and hits the replay button?

P.S. I've tried 'Me.Refresh()' as well, and that didn't do anything

View 3 Replies


ADVERTISEMENT

Reloading/refreshing A Form Without Closing It?

Jun 27, 2009

On the Form_Closing I intend to just hide the form but somehow I need to reload/refresh the form as when it was just loaded the first time, could I just call its Load event to achieve it?

View 4 Replies

Reloading Form And Display Only One

Mar 11, 2010

I want, when I show Form2, the form1 should be displayed in background. And when I close Form2, the form1 should be updated or starting complete new Form1. I do this but there are two tabs of Form1 in TaskBar. One is background display Form1 and another is updated. I want only one Form to be displayed.

View 9 Replies

Reloading Form Controls From XML File?

Feb 17, 2012

I save all the form controls(texboxes,Labels) with name and location in a XML file.

I want to retrive the XML file into a form(Reloading) with the same controls.

View 7 Replies

Reloading The Panel Controls Of Another Form

Jun 27, 2011

iam beginner to vb. i hav three forms,mainform,items,and additems.mainform having 2 panels,panel1 and panel2.and panel1 contains item button & a close button.when i click item button the panel1 of items form is loading on to the panel2 of mainform. my problem is when i click Close button it clear the panel2 of mainform,but after that when i click Item button it does not load the panel1 of Items form on to mainform panel2.

View 5 Replies

Saving + Reloading A Completed Form?

Aug 7, 2009

i am currently trying to create an expenses calculator, the sort that includes all your monthly outgoings and give you a total. I would like to be able to fill the form in the save it + reload it when i run the program again, what is the best way to do this ?

View 5 Replies

VS 2005 Form Disappears When Reloading?

Jun 18, 2009

This happened to be once awhile ago and I thought I had the solution, but apparently I don't. Very rare, but what happens is, I'll start a new project, build my controls on the form, go into the code window and write some code. I'll save this all out, but when I reload the project, the code window comes up OK, but the design window is just gone. The code for the form and all the controls is still there in the form.designer window, but the form itself just will not appear, and there is no icon for it over in the Solution Explorer to click on

View 1 Replies

Refreshing DataGrid On Parent Form After A Child Form Has Updated DB?

Dec 3, 2009

Basically I have two forms - Form1 has a DataGrid on it (Infragistics) and in the double-click row event it creates an instance of the EditForm and passes along the UniqueId for editing. Once the user saves the changes (if they make changes) - I want the DataGrid on Form1 to refresh. Here is how I thought I could get this to work ... I create a public property called RefreshRequired as boolean. Before unloading the EditForm it sets this property to true. Then Unloads. This continues the code in Form1 (which showed the EditForm as modal) but RefreshRequired is still showing as False? Why isn't my EditForm able to set the property?

FORM 1
Private Sub grdList_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles grdList.DoubleClick
' TODO Ignore Double-Click Event when Right Mouse Button Triggers Event

[code]....

View 1 Replies

VS 2010 - Form.Activated - Refreshing A Form Bound To Different Tables

Feb 4, 2011

I had issues in refreshing a form that is bound to different tables in a database. Various forms allow the user to change and add and update information on the form via the database. I had created a public sub in that form that the other forms could call, after saving the data, that was supposed to refresh the data on the main form. This was not working so I researched the problem. I came across this page which pertains to Form.Activated: [url]

I placed all of the table adapter fills into this event, instead of in Form_Load, and it seems to work now, when the form first loads, and when other forms update data. My question is does anyone have experience using this and what are the consequences, if any, in using this to reload/refresh the data showing on the form?

View 4 Replies

Refreshing First Datagrdiview-form From Activated Second Detailview-form?

Jul 8, 2009

I am working on supplier maintenance file. From mainmenu, opening first form shows records on datagridview through databinding. Clicking add new record, i fired a second form as my data entry with detail view through databinding, minus navigational buttons. I left the delete and save button only. Once through data entry, i save it on server. My problem is, how can i reflect the added record on the first form while i am on my second form? I prefer the new record be added only to the first form. I don't want the idea of retrieving the records again from my server.

View 3 Replies

Child Form Not Refreshing When I Try To Start App From MDI Form

Dec 1, 2010

I have MDI form and child forms in my app.[code]...

now if i try to refresh the items of combo box of Register form from Desig form, then it is not refreshing. i.e. i can't see my new items in that combo box on Register form.

Now when i try to start my app directly from Register form then the same code works perfectly but same code is not running when i try to start the app from MDI form.[code]...

View 1 Replies

Refreshing Datagridview From A Second Form?

Jan 24, 2011

I am trying to refresh a datagridview from a second form to display newly written data. I have read the posts on this topic and can't figure mine out. My first form opens and you input data into text fields, etc. and then you need to select items from one table to copy and write to a new table. The datgridview on the first form shows the new table, and I have a new form that pops up to select the line items to add. Everything works perfectly except when I close the selection form after selecting lines, I would like the datgridview on the first form to refresh to show that the lines have been selected and displayed in the datagrid.

My data is loaded into the datagridview as so;

Public
Sub ShowVoucherLines()
cmd =

[Code]......

View 12 Replies

Correct Syntax For Refreshing Form?

Nov 9, 2010

I just have not been able to find the correct syntax for refreshing my form. The Labels are added to a shape container and I delete them from it as well. All code seems to work only there is a ghost of the label left behind.

View 1 Replies

GUI Not Refreshing When Trying To Update It Through Other Windows Form

Sep 14, 2010

During the first form_load a thread is created from a function of second class(hb) which constantly works and changes the status of parameters i.e enabling or disabling some buttons on GUI of form1 But it is not happening.Problem is the [code]...

View 7 Replies

Refreshing Form During Powerpoint Automation

Dec 2, 2009

I have a VB 2008 Forms application which does Powerpoint automation.I am opening Powerpoint in a minimized window from within my app and am trying to periodically put update messages in a textbox on my main form while the automation is running (it takes a few minutes to complete), but my form window does not want to show these messages until the powerpoint operations are finished.It seems as if I need to force a window refresh or something on my windows form, but I'm unclear how to do that. Below is some code that I'm using that illustrates what I'm trying to do.When I run it, "Step One / Step Two / Step Three" do not show up on my textbox until after the Powerpoint automations are over.[code]

View 1 Replies

VS 2005 Refreshing Form After N Seconds?

Apr 21, 2009

I have an mdi child form called "MyChild".

I need to refresh this form by calling the "MyRefresh()" method if the form has focus, and no controls have been clicked on in this form for the last 60 seconds.

Is there an efficient way of doing this ?

In the activate event of the form I could set up a timer and give it an interval of 60 seconds but what about checking for user intervention at any point in that 60 seconds ?

View 7 Replies

VS 2008 Refreshing A Form That Is Databound?

Jan 5, 2011

I want to refresh a form that has a listbox which is databound to a source. Me.Refresh() doesn't do the job. I tried reloading the orginal sub thats also doesn't work.

View 14 Replies

GUI Not Refreshing When Trying To Update It Thorugh Other Windows Form?

Mar 23, 2010

GUI not refreshing when trying to update it thorugh other windows form?

View 7 Replies

Refreshing Data On Window Form Without Closing?

Apr 21, 2009

have a main form that displays a users score.I hide the main form when going to a child form.When that child form is closed, it will show the main form.The problem is that the datathat has been changed when going to the child form is not displayed on the main form since it has not been closed.Is there anyway around this?

View 1 Replies

Refreshing Databound ComboBox Values On Form

Jun 9, 2008

I have a databound combobox that displays a list of items, and I have a windows form that opens after clicking a button that allows me to make changes to the table that the combobox gets it's values from. When I make the changes and save them (successfully) and return to the parent window, the changes aren't reflected in the combobox. If I exit the app and launch it again the changes are reflected perfectly. I've tried me.combobox.refresh() on the forms GotFocus event, but no luck.

View 3 Replies

Refreshing Form - Display Two Forms On The Screen?

Jul 31, 2011

I need to display two forms on the screen. When I change the record being viewed on form1 I need to change the display info on the second screen. I now know how to share the info, but need to be able to 'refresh' the information on the second form

[Code]...

View 3 Replies

Refreshing Form During Powerpoint Auto-mation VB 2008?

Feb 3, 2009

I have a VB 2008 Forms application which does Powerpoint automation -- I am opening owerpoint in a minimized window from within my app and am trying to periodically put update messages in a textbox on my main form while the automation is running (it takes a few minutes to complete), but my form window does not want to show these messages until the powerpoint operations are finished. It seems as if I need to force a window refresh or something on my windows form, but I'm unclear how to do that. Below is some code that I'm using that illustrates what I'm trying to do. When I run it, "Step One / Step Two / Step Three" do not show up on my textbox until after the Powerpoint automations are over.

View 3 Replies

VS 2010 Refreshing A Datagrid When Add - Deleted Or Edit A Row Via Another Form

Apr 5, 2011

so I am a little confused. I am trying to refresh my datagrid when I have either add, deleted or edit a row via another form. I have it so my main form shows the datagridview, I have bound my controls to the database and I see all rows, no problem. I also have it setup to double click a row and it brings it up in another form to edit that record. This works. but it doesn't refresh the datagrid when saved. I am trying to follow this thread, specifically this post Refresh Datagridview - Post 2 Here is how I am loading the datagridview in main form

[Code]...

View 9 Replies

Disposing Data On Form Close Or Refreshing Data Adapters

Aug 14, 2010

I am working on a huge multiform project for my company, and one of the few issues I am having is that when I am on the Main Menu Form, then go into a specific form (i.e Sales Order, etc.), do updates, changes, or just view data then close the Sales Order Form, if I happen to go back into the Sales Order Form without closing the entire project, then the Sales Order Form will display data instead of opening a blank form like when I first opened it.

Is there something that I should be adding to the Form Close Event to dump all of the data or refresh the data adapters so that if I open the form again, it will display a blank form that is ready to be used like when I first opened it?

I have tried using;
Me.Dispose()
Me.Close()

when closing these subforms, but if I open them again, the data fields (combo boxes and text boxes) will have random data in them.

View 5 Replies

Registry Reloading With .net /c#?

Jun 30, 2010

If we make any changes to the registry, Its necessary to restart the system. can we make it without restarting through program...?

View 7 Replies

Reloading Data To GridView?

Apr 3, 2010

[URL]

I have a GridView, named GridView1 used to getting data from SQL Server Database, because the data from database always changing, I would like to get the new data to display on the GridView1 when a user press the "Fresh Button"

I tried:

GridView1.Refresh() - did not work
Me.Refresh() - did not work
Me.Hide() then Me.Show() did not work

[Code]....

View 3 Replies

Asp.net - Avoid Reloading All XML Data For Each Repeater?

Jan 26, 2011

I am trying to place a repeater within a repeater using xml data. I have it working exactly as I want, but the method I have used reloads the data for each repeater. I think I need to cast as an XmlNode but I'll be honest - I have no idea where to start. Here is my code - I'd like to keep everything in the code behind if possible.

[Code]...

View 2 Replies

Clear Gridview Without Reloading Page?

Apr 10, 2012

I have a gridview control on my asp.net page(vb.net). I also have a "cancel" button, that when pressed, is supposed to clear the gridview of it's current contents.

However whenever the cancel button is pressed, it just reloads the page and the gridview is still there with the same data that I wanted clear.[code]...

View 4 Replies

Populating A Textbox In ASP.NET Without Reloading The Page?

Apr 27, 2011

I have a listbox, a textbox, and a button. The button populates the textbox with the selected item & value of the listbox. As below:

Protected Sub GetVariables_Click(ByVal sender As Object, ByVal e As EventArgs) Handles GetVariables.Click
Me.txtLetter.Text = lstNames.SelectedItem.ToString & lstNames.SelectedValue.ToString
End Sub

The problem I have, is that when doing this it reloads the page each time. Any way around this?

View 2 Replies

Reloading Data Grid After Updating?

Nov 2, 2010

when im updating my data through a textbox and i save it, i dont automatically show the updated file on the datagrid, here is my code btw, i already tried some code but it aint working

[Code]......

View 2 Replies







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