Start Project With A Sub Main By Disabling The Application Framework?

May 14, 2009

I want to start my project with a sub main by disabling the application framework. The problem is that if i do this then the application starts and then exits in a few moments. Is there a way which could hold it until the last form is closed.

View 7 Replies


ADVERTISEMENT

Start Project With Sub Main()?

Mar 7, 2012

I have created one Windows form based VB.Net project in which I want to start my project with Sub Main()

I have added one module and created one Public Sub Main() method but when I am trying select Sub Main from Startup form, I am not getting the method there. I am using VS 2010

View 4 Replies

Application Start And Main Form?

Oct 2, 2009

I am developing a commercial application that needs to do some environment checking upon start up. I need to check things like the following. 1. Is there a registry entry on this machine that has various keys for paths to SQL Server 2. If it does not I need to create them. 3. Prompt user for the path to the SQL Server 4.Check the SQL Server to see if the database I need exists. 5. Create the DB if not. 6. Populate the DB with the tables I need 7. Create stored procs in the DB 8. Write the registry. I could do all this in the form load of the main form. However is there a better way? Like doing all these checks as part of a splash screen for example.

View 2 Replies

Load The Sub Main At The Start Rather Than Loading A Form On Start Up?

Feb 24, 2012

How can I get my application to load the Sub Main at the start rather than loading a form on start up.

I have tried declaring 'Public Sub Main' on my forms and in some modules, yet in my project properties, it is not one of the options.

View 12 Replies

VB 2010 - Disabling Taskbar, Start Menu And Alt+F4

Oct 3, 2011

I'm making a security program that locks the users screen. I have already figured out how to disable task manager but now I need to disable the task bar from showing and the start menu. Also, trying to do an event on alt+F4 doesn't seem to stop the program from exiting. Any other solutions? This program is intended for security reasons and I am not using it for any viruses.

View 6 Replies

VS 2008 Disabling Start Menu - Code Not Working?

Oct 10, 2011

So I need to disable to start menu and have found a code on a website but it doesn't seem to work. Heres the

Dim TFlag As Boolean
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (byval hWnd1 as Long, byval hWnd2 as Long, byval lpsz1 asstring, byval lpsz2 asstring as Long
Private Declare Function EnableWindow Lib "user32" (ByVal hwnd As Long, ByVal fEnable As Long) As Long

[code]....

Edit: I'm creating a program for places like schools or library where the password for all users are the same. I already made the program go to full screen and always on top and have disabled the user from using taskbar but I can't stop the start menu from appearing.

View 3 Replies

C# - Detect If Application Start Using A Manual Handling (Pressing An Icon) Or Start When Windows Start?

Feb 28, 2011

I have made my application to start automaticly when windows start (registry ../currentversion/run/appname + path). In this mode the application start minimized and an little icon appear in the notification icon area. With this icon you can maximize the app or exit it.If you exit the app and start it again using the Menu (Start/programs etc) than the application start in minimized mode (and in this case I would like to have it in normal mode) because the setting autostart is still true.Is there a way you can detect when the application start when windows startup using the above registry or when people click on an icon in the programs menu (or desktop)?

View 2 Replies

.net - "No Symbols Are Loaded" In New Application Framework Project?

Dec 28, 2009

In vb.net 2008, when I start a new project, it defaults to "Enable Application Framework." I add the following code to a button click handler to the main form in the new project:

Dim k As Integer
Dim s As String
For k = 1 To 5000000
s = Mid(s & k, 1, 30)
Next k
End Sub

Then, when I try to break execution to debug using the pause button, I get the message "No symbols are loaded for any call stack frame. The source code cannot be displayed." If I uncheck the "Enable Application Framework" project option, it breaks and debugs properly. (This also happens with other code not just this example).Is there a way to disable the Application Framework by default in a new project?Is there a setting that will allow a project with Application Framework enabled to break and debug? Did I mangle the installation? This is a recent VS2008 installation. Is there some option I should have selected during installation?

View 2 Replies

Project Was Disabling USB Flash Drives From Being Used?

Apr 22, 2011

I'm working on a project and would like to know the best way to tackle disabling the cd burner in windows.The first step I took in the project was disabling USB flash drives from being used.

View 1 Replies

Add Command Line Switching - Start The Application In XX Mode - Start Application With 30 Second Delay?

Mar 27, 2009

My intentions are to add command line switching. I am trying to see if i could run my application in varoius ways i.e.

App.exe -S - Start the application in XX Mode

app.exe -T30 - Start application with 30 second delay

and that kinda switching.

View 7 Replies

Upgrading .Net Project From Framework 1.1 To Framework 4.0?

Feb 2, 2011

I have a solution that I wish to upgrade from Vb.net framework 1.1 to framework 4.0. The solution consists of a number of projects, all but one of which compile to dll's. The master project compiles to a executable which provides a menuing system which dynamically loads the dll's and connects to entry points.

The projects contain normal classes, numbers of forms and also controls, which are either usercontrols or are inherited extensions of standard windows controls.There are a number of third party components (eg reporting and grid controls from Component One, Ribbon control from DevExpress etc).

[Code]...

View 4 Replies

Start Up With Sub Main?

May 2, 2005

How do I start up with sub Main? I created a sub Main in a class. I clicked properties on my project. It provided a combobox of possible startup forms, but nowhere could I find an option to choose sub Main.

View 2 Replies

Start Your Program From Sub Main?

Mar 11, 2010

Is there a way to start your program from the sub main() like you could with vb.net

View 4 Replies

Start Main Form As Invisible?

Jan 10, 2010

I'm using the command line parameters to start my applicaton. To do that, I'm using the Application Startup event:

Friend Sub MyApplication_Startup(ByVal sender As Object, ByVal e As Microsoft.VisualBasic.ApplicationServices.StartupEventArgs) Handles Me.Startup
If e.CommandLine.Count = 1 AndAlso e.CommandLine(0) = "-startintray" Then

[code]....

Code works but I can't set my startup form as invisible. It always shows itself as usual. I want to put it to system tray.

View 2 Replies

Start Windows Forms App With A Sub Main?

Mar 11, 2010

I am trying to make a windows forms application that starts using Sub Main instead of the Form1_Load event.I have tried putting this in Public Class Form1

[Code]...

View 2 Replies

Show Main Form Before Start Loading?

Feb 9, 2011

In this code the program did not show me the screen and start loading.I see the Form when they has finished with the load of the file

Private Sub Main_Form_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
TotalRecords = 0
Call Find_Total_Records()

[code]....

I want the program FIRST show me the screen and after i see the form to start load the file I have try with the 'Application.DoEvents() and System.Threading.Thread.Sleep(200) without any effect?

View 3 Replies

VS 2008 Start Load File After Main Screen Showed?

Nov 24, 2010

I have a startup form with one list view and one combo box. When combo box SelectedIndexChanged a make call a subroutine that perform read of a file. In Main_Form_Activated i give a default value in my Combo box. The problem is: The program didn't show me the main screen and after call the subroutine to load the file but without show me any screen starting to load the file and they show me the screen AFTER the load of the file.

View 6 Replies

Disabling Keys In Application?

Sep 8, 2008

is there a way to disable keys on a keyboard?

like the windows key?

View 9 Replies

Process.Start To Start An External Command Line Application

Aug 4, 2009

I'm using Process.Start to start an external command line application and using the StartInfo.Arguments method to send parameters to the application. I imagine I'll need to use a loop... but I can't figure out exactly how yet.I need to send anywhere from 1 - an infinite number of files names to this application. Each file has to be sent one after the other. So once the first one is done, I need to loop back around and past the second one.I can probably use the Directory.GetFiles method to get all of the files, but I don't know how to assign them.

View 7 Replies

Use Process.Start To Start An Application Without Administrator Privileges On Windows 7

Feb 24, 2012

Visual Basic 2010 - Net Framework 4.0 Client

I have an application (application #1) running with Administrator privileges on Windows 7.

I want application # 1 to start another application (application #2) without Administrator privileges so application #2 is running as a standard user.

Is there a way to do this? I have been using Process.Start.

View 5 Replies

.NET Framework Unhandle Error When File Not Exist On Windows Start Up

Aug 4, 2011

Actually this application will run on window start up. what i try to do is to delete the file for certain date. I ask the program to delete file if set date equal to now system date... i also ask the program to check if the file is exist or not. If the file is exists. the program run properly but if the file not exists then on windows start up. .NET framework unhandle problem come out [Code]

View 5 Replies

Error 0xc0000135 Says It Needs .Net Framework ... Create An Auto-Start CD ... Running App From CD Only - No Install Of App

Dec 10, 2009

My Application as you may remember ONLY runs from the CD and is never installed onto a computer. It is a Product Support CD. All Information that a customer may need is on this CD, they can Download PDF's and Drawings and even save some Software Apps that may be needed onto the user's Hard Drive, but the CD App running is never installed onto a computer.

[Code]...

View 5 Replies

Unable To Publish Main Project

Aug 31, 2009

Since I'm unable to publish my main project, I've decided to start from scratch to see if I can locate the problem. I created a brand new project, just a simple form and dragged 4 controls onto it (a label, a button, a combo box and a checkbox). There is no code in any of the controls.I published this using Clickonce at url...(I'm aware people may not be happy clicking links). It's set to run only from the webpage. It runs fine on this PC, but on my friends PC and on my spare PC, it simply churns up a page of html error codes.

View 6 Replies

Forms :: Disabling A Splash Screen When Application.Restart Is Called?

Dec 28, 2011

I have an application with a splash screen which gets shown before the application starts. One of the requirements of the application is to allow users to restart (or atleast clear the form) so that other test cases can be ran. Because there are so many forms and variables, we elected to simply call Application.Restart() to accomplish this.

What we would like to do now is disable the Splash Screen when Application.Restart() is called. That is, only show the Splash Screen when the application is initially started, not when it is restarted.

View 1 Replies

Include .exe In Project And Attach To Main Process?

Apr 16, 2012

I have a VB.NET project (main.exe) and include an additional .exe application as internal resource. Now I do not want to run the extra .exe as a separate process but want to attach it to the process of main.exe so I have just 1 process overall and not 2.

View 1 Replies

Sub Main In A Project-static And Global Variables

May 17, 2009

I try to create a sub main in a project but i can not.I have create a module called Module 1 and inside i have created a Main Sub which is intended to creta a thesaurus_form class instance , like this Code: Module module 1Public Sub Main()Dim thesaurus_form2= New Thesaurus_formEnd SubEnd module.Instead of this, once it has cretaed a first instance of the thesaurus_form class, it creates another one what i dont want at all..How can i do do make it execute the code which is inside the thesaurus_form_load sub..I also can not create a global variable or a staitc variable, because i receive this message.static is not valid in a member variable declaration.

View 2 Replies

Way Of Hiding Forms And Classes From Main Project

Aug 31, 2009

the client has asked for all forms and classes to be hidden from the main project, so when he sells it, they will only be able to see part of the project and not all the classes and forms.My Solution: I have created another project called project2, and added all the forms and classes from main project, fixed all errors and compiled it.I deleted all the forms from the main project and added a reference so that it gets all the forms from the other project by referencing the dll file, but it does not seem to work and get a lot of errors.is there an easier way of hiding the forms and classes from the main project or do I need to do more then just add the reference.

View 2 Replies

One Project That Targets 2 Versions Of The Framework

Oct 4, 2011

I don't think this is possible but thought I'd just double check...

I have a class library project (i.e building this project results in a DLL being created) and I add a reference to this DLL in several of my other applications. This DLL project targets .NET Framework v2.0.

However, some of these apps that use the DLL target .NET 2.0 (or 3.5) and some target .NET 4.0. But because .NET 4.0 does not include 2.0 and 3.5 in it, its possible for someone to have .NET 4.0 installed but not .NET 2.0, therefore meaning that they won't be able to run my app because of the reference to a DLL that requires .NET 2.0.

So the solutions as far as I can see are: 1. Include .NET 2.0/3.5 as an additional prereq for my .NET 4.0 apps... ewww. 2. Create a copy of this DLL project and make it target .NET 4.0 then in my .NET 4.0 apps add a reference to that rather than the .NET 2.0 version.

So far I've been using the second option, which is working fine but its just very annoying having to remember to copy and paste any changes I make in one version of the DLL project into the other one.

So is there any way I can have a single DLL project but have it build 2 versions of the DLL, one targeting .NET 2.0/3.5 and one targeting .NET 4.0? As I've written this down I've just realised I could always build the solution, copy the DLL out to another folder, then change the target framework and build it again to get the new DLL but that's still not ideal.

Using VS 2010 Ultimate by the way in case that makes any difference to the options I've got available

View 6 Replies

Create A Sub Main Inside A Class Which Is Itself Part Of A Project

May 17, 2009

why, when i create a sub main inside a class which is itself part of a project, i need to create it as a shared sub like this.[code]

View 2 Replies

Make An External Application 'child' Of Main .Net Application

Jan 23, 2010

I use SetParent to make an external application a "child" of my Main .Net application. This works fine.What I need to know is why can't I use Me.MDIChildren(0)I thought that using SetParent would increase the number of children by 1, thus allowing me to reference it with the above code, but it shows there are no children in the array.I have been trying, without luck, for 2 days to try to maximize an external app being displayed in my app. I can get it to display, but I would love it if it could Dock to the same size as its container (a panel)

View 3 Replies







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