Forms :: TrailPeriod - Program Refuses To Close

Feb 23, 2011

I have a method where I am making a trial period. When the date has exceded its trialperiod the program will not close.

The code looks like this:
Public Sub DemoRestrict()
If My.Settings.dteStartDate = Nothing Then
My.Settings.dteStartDate = Now
End If
If My.Settings.intTime = Nothing Then
[Code] .....
Why does the form not close? Is just runs to the next method in the load sequence.

View 1 Replies


ADVERTISEMENT

Forms :: Form Refuses To Close?

Dec 4, 2009

I have a method where I am making a trial period.When the date has exceded its trialperiod the program will not close.The code looks like this:

Public Sub DemoRestrict()
If My.Settings.dteStartDate = Nothing Then
My.Settings.dteStartDate = Now

[code].....

View 2 Replies

Close Forms In Program?

Oct 5, 2006

I made a project on vb.net.Im working with multiple forms.Now,from the main form, I activated the 2nd form.then hide the main form. My problem is when I directly close the 2nd form, my project is till running.I closed it trough the "Close Button" of the form.Any way i could interact with that so I could go back to the Main(first) form when i close it there.

View 6 Replies

Close A Program If It Has Multiple Forms?

Jan 18, 2010

how do you close a program if it has multiple forms? Me.close doesn't seem to be
working...

View 1 Replies

Use A Button To Close All Forms And End A Program?

Dec 3, 2011

this might seem a fairly stupid question to ask, but how do you use a Button to close all forms and end a Program?

View 4 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

Close() Puts Forms Into Crazy Open/Close Loop?

Mar 4, 2011

In a program I'm working on, I want a "Loading..." dialog to close when it can't log in to a site using the username and password provided by the user. Basically, I have the code set up right because the function it is supposed to carry out when that occurs does work, but for some reason it ends up in some really weird stuff happening. In the Loading form, I have it set to do "Form1.Show()" and then "Me.Close()", assuming it would simply show the login form and then close the Loading form. However, when this happens, the Loading form closes, and then for only an instant Form1 shows, and then the Loading form shows and Form1 closes. This happens forever until I stop the debugging, and I can't seem to figure out why. Am I using the wrong method? What exactly does Me.Close() do anyways? All I want to do is close the form and open another

View 5 Replies

VS 2008 When Close The Main Form All The Forms Close?

Aug 30, 2009

my web browser is my main form and it has a number of sub forms , how can i set it that when i close the main form my sub forms dont close ?

At the moment when i close the main form all the forms close

View 2 Replies

Forms :: When Me.close() Doesn't Close Form

Mar 2, 2009

I have a situation where me.close() doesn't close the form. I have a form with a button with the code seen below. What happens when the button is clicked is the new form shows, but the original form(calling form) is still there. When I go into debug mode, I can see the me.close() execute, but nothing happens (calling form stays open). When I close the second form both forms close. If I comment out the call for the second form to open the first form closes without problem.

Private Sub cmdNext_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdNext.Click
Dim f As New frmOrder3

[Code].....

View 1 Replies

VS 2008 : Get 2 Forms To Close At Different Times Using A Timer On Each Of The 2 Forms?

Apr 21, 2010

i have a problem with trying to get 2 forms to close at different times using a timer on each of the 2 forms.

This is my form layout:

Quote:
frmMain
Frm1
Frm2



Frm1 and Frm2 are identical to each other. FrmMain has 2 buttons on it. One button to call Frm1 and the other to call Frm2.Frm1 and Frm2 each has a timer. It counts down to 0 and then does a .close(). However, if i pause between clicking the second button they both seem to always disappears at the same time.I would do something like this...

Click on the first button (showing the Frm1 form)

wait about 10 secs...Click on the second button (showing the Frm2 form)they both are shown on screen...hen they both disappear at the same time.... which shouldn't happen since i clicked the Frm2 box 10 seconds AFTER Frm1... So Frm1 should hide before Frm2 does...but it does not.

[code]....

View 6 Replies

Forms :: Multiple Forms Open And Close

Apr 16, 2009

I have two forms frmMain and frmNew, and one module modMain. In modMain I hold public variables which are needed for application. My question is how to open and close those two forms when needed? I ask this because if i set frmMain as startup form, then when closed, application will end, and one of those two forms will always be displayed. Also if I set frmNew as startup form, then when I close this form, application will also end. Is there a way to do this from module or something so my application won't end after closing and opening any of those two forms?

View 2 Replies

Get 2 Forms To Close At Different Times Using A Timer On Each Of The 2 Forms

Apr 21, 2010

i have a problem with trying to get 2 forms to close at different times using a timer on each of the 2 forms. This is my form layout:

[Code]...

View 6 Replies

If Wrong Password X2 Than Close Program And Block User From Opening Program For 180 Seconds?

Sep 2, 2011

I am making a program that NEEDS to be password protected, so i made a textbox with a code so that when the user enters the right password it lets you in. But if the user/person enters a wrong password 2X it will kick you out. So is there a way to keep the

View 3 Replies

Command Line Strings - Make The Program Close If The -1 String Is Sent With The Program

Feb 25, 2010

If e.CommandLine.Count > 0 Then

Dim IncomingCommand As String = e.CommandLine.Item(0).ToString

If IncomingCommand.Substring(0, 2) = "-1" Then

form1.close()

End If

End If

I am trying to make the program close if the -1 string is sent with the program. See my installer allows for me to run certain programs before it actually installs, but it doesn't shut down copies of the program itself. So I have a next startup instance set to shut the program down if the -1 is received. But if the program is not running it starts up instead. This is not desired. form1.close doesn't work. e.cancel = true doesn't work, etc etc. What can I do to make the program not start during this instance.

View 1 Replies

GroupBox Refuses To Be Visible?

Jan 23, 2012

In my card game program, I have used 4 main GroupBoxes to act as dialogue boxes. Some contain additional GroupBoxes to house such things as RadioButtons, TextBoxes and CheckBoxes.Software places them when and where needed, so I usually move them apart in the Design screen to keep them all visible at once. However, with each new GroupBox I added to the program, their behaviour became increasingly vexing.In the design window, they are not allowed to overlap, or they will either partially or completely disappear. When they disappear, I have to find them with the Properties Viewer (when selected, the 4 sizing blocks appear and I can tease the drag symbol to appear).Worse, when my program is running, a GroupBox left in the Design mode in an "unfavoured location" (for lack of a better term) will refuse to appear when called.

I have single stepped past the code that positions the GroupBox and makes it visible and I have noted that the top and left positions are correct, but when I let the mouse hover over the word 'Visible' in the line "GroupBox1.Visible = True" the popup reports it as False.There is nothing I can do at run-time to make the GroupBox appear. I must return to the Design window and try moving it to a more favourable location.

View 7 Replies

Menu That Refuses To Leave

Feb 22, 2012

I have an old app still written in VB2003 that required some changes, part of that was revamping a menu that isn't behaving.I've deleted it and it doesn't show in the designer but when I start the program there it is, and still not correct.How do I really get rid of it so I can build another one?I'd hate to have to delete the whole MainMenu, this is the 5th in line, that would be a lot of re-creating.

View 8 Replies

.net - Close All Forms In Vb?

Oct 19, 2010

How can i close all forms I use wpf vb 2010 To load other form i use like Private frm As MainWindow = New MainWindow to open the window i used frm.Show()and to close it i use frm.Close()Now I have two forms like form1 and form2 I want to open form2 when i click on the button - ok it's easy The Question How can i closed form1 from form2 when i open form2 using button when i user Private frm As form1 = New form1 frm.Close() It like a cricle and can't closed

View 2 Replies

Close All Forms But One?

Nov 14, 2009

The database application starts from the login form, and if the username and then password are correct, the main form with buttons for other forms opens.One of the buttons is logoff button, which should closes/unloads all the forms open at that time and then opens the login form.[code]...

View 4 Replies

RTF Close - Add A Close Button To Menu Strip That Will Just Close The Currently Opened File

Jan 16, 2009

I'm currently in the process of building a text editor type program, and have run into a brick wall. I haven't done VB in years, so I may just need a little reminder on some things. I have coded everything so far as far as opening files, saving them, changing fonts, colors, etc. However, I'm looking to add a Close button to my menu strip that will just close the currently opened file, and not the entire program, while also ask the user if he/she would like to save before closing the file, and then if they select yes, it will show the save dialog, and if not, it will go ahead and close the currently opened item.

View 2 Replies

EXE Completely Refuses Icon Change?

Dec 19, 2011

Okay so ive got this project iv been working on. Almost ready to get the beta on its way, last thing I needed to do is retrieve the EXE and change its icon. I found the EXE in the "bin" folder. Copied it to desktop. I went through the properties, no way to do it. Then I searched youtube, and google. Only possible way to change it I found was to use softwares. I tried Resource Hacker (ive used years back, this program was handy), but it didnt work. I replaced the default window-looking box icon with my icon, and that seemed fine. But once I saved and exit, the new file with updated icon was supposed to be created. Well it was, except just looking at the file icon I knew it didnt work. But when I right click and go to properties, that one changed. So why dosnt the MAIN icon change? In RH I seen no other icons

View 5 Replies

Form Refuses To Draw In Time

May 30, 2010

It seems that my form refuses to draw quickly enough. I am using this

[code]...

This ends with the form freezing for a moment, and then it resizes, but it's not until the end of the resize does it display properly, during the resize, their is a big black bar where the new part of the form is supposed to be.And when it's done resizing, it draws itself correctly.

View 7 Replies

VS 2010 Combobox Refuses To Populate?

Feb 15, 2011

In this windows forms app, I have a form with six comboboxes. Two are parents, one with a single child and the other with three children. All of these work beautifully except for one of the children. The code for each one is identical, and I've verified the query against the database a dozen times. I even have another of the children that is in the very same block of code. One works beautifully, the other one refuses to populate any data. Below is the code for the one that doesn't work. I would tell you on what line the error occurs, but it doesn't throw any errors. Try catches show nothing, and I have VS 2010 set to throw all errors, but I get nothing, just an empty combo box where there should be a list of names.

Public Class errorTracking_submit
Dim ConnectionString = "Data Source=dvmx6030MS2005_DEV1, 2755; user id =CRCUser;password=TWC5uck5;database=CRCTools;Connection Timeout=5"

[code]....

View 16 Replies

VS 2010 Project Refuses To Open On Other PCs

Mar 9, 2012

I've spent weeks working on a project. I develop on both of my computers (Desktop and Laptop) which are both equipped with VS Express 2010. The programs debug, and compile with no issues on both of my machines, even when the .exe is removed from the debug folder and placed elsewhere. However, when I try and run the program on my brother's computer, the initial form jumps up on the screen as desired. Then the program is designed to open the next form upon the click of a button. When that button is pushed, we get the following:

See the end of this message for details on invoking just-in-time (JIT) debugging instead of this dialog box.

[Code].....

View 8 Replies

Close All Forms Except For One Form?

Mar 8, 2011

how can i close all forms except for one form? vb.net 2003

View 4 Replies

Close Forms And Open Other Ones?

May 20, 2012

I want to close form and open another one without termination of the application, when I try to open second form and close first one the application terminate.[code]...

View 2 Replies

Completely Close All Forms?

Jun 4, 2010

Is there a command that closes an application completey down, including any hidden forms, etc?

View 3 Replies

How To Close Forms Properly

Aug 23, 2010

I have couple of forms can be opened on the screen but how can close all forms properly when i click the "x" button from the main form?

View 1 Replies

VB 2005 Every Project Refuses To Compile With Same Error

Nov 7, 2009

I'm using Visual Studio 2005 (college only has 2005 so..) and I have a very important program to write for college.My problem is, every time I try to compile I get the error: "Error while trying to run project: Could not load file or assembly "Program" or one of its dependencies. The given assembly name or codebase was invalid." We're talking a very simple program - I've only been learning for a few weeks.

View 7 Replies

C# - Close All Opened Forms Which Are Created On The Fly?

Sep 10, 2011

How do I close all opened forms which are created on the fly?

Sub OpenForms
dim F as new frmForm1
F.show

[code]....

I want to close all opened frmForm1?

View 2 Replies

Close A Number Of Forms Using The ControlBox?

Mar 19, 2011

I was looking for a way to close a form using the ControlBox and it close a group of forms with it, without closing the whole program (only a certain number of forms) [code]...

View 5 Replies







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