How To Find Unused Variables In Project

Sep 22, 2009

In my project there are lot of variables, and some of them are not used at all.I want to clean up the code by removing these unused variables. These variables are not shown as unused when i build the application. The problem is with the global variables, and not with the local varible for a function .Is there a method to find these unused variables?

View 8 Replies


ADVERTISEMENT

Automated Tool To Cnvert All Unused Variables And Functions With No Return Type

Sep 9, 2009

Planning on migrating from 1.1 to 2.0 framework.After doing the automatic vs 2005 migration, it did highlighted lot of lines: due to unused variables and functions with no return type..Is there a tool which can fix those unused variables plus function with no return types.

View 2 Replies

Identify Unused DataSets In Project?

Sep 3, 2010

I'm working on my first real vb.net project, after years of using VB6. I'm using Visual Studio 2008. While I've been learning, I've added lots of DataSets to my project and then realised I'd got something wrong, so I've added, and begun to use, a new one. Trouble is, I'm not sure now which ones are used and which aren't.

How can I identify which DataSets aren't being used, and then what is the best way to remove them cleanly? Or should I stop worrying about tidying up and get on with the development work? ;)

View 2 Replies

Get Rid Of Unused System Properties Like Unused Button Names In VB 2005?

May 30, 2009

I have created some check boxes and buttons, and changed the names, but it seems like the system.properties saved both names now I would like to rename the button back to the original name but the name is being stored for some reason, and I cant access the original name, how do I clean this up?

View 6 Replies

Sql - Find Tables Used From A .net Application To Remove Unused Tables?

May 10, 2012

We are presently developing an application, let's call it APP1, which uses a SQL Database which have about 800 stored procedures, 600 tables, etc. APP1 was originally created in order to replace another application, APP0, from which we do not have source code but only SQL tables, Stored Procedures, views, etc. Previous programers of APP1 used some DB objects from this same database and added some other objects specific to APP1 because it becomes bigger than APP0. And we do not need APP0 anymore as APP1 does all what we want, and more.

So, now, we are thinking about a way to find out which objects are used by APP1 in order to remove objects which are ONLY used by APP0.What is the best approach to discover all objects used by APP1 without having to open every single class and form?

Once we will have a complete list of these objects, it will be easy to use a program we bought which detects all dependencies for all SQL Objects specified directly from SQL and remove objects which do not return from any dependencies. Any ideas of how I could get this list without having to go through all our program that have many, many, many classes and forms?

Note : I know, in a perfect world, all calls to PSs and tables should be in a DAL but in the case of the application we're presently working on ... this is not our case! Yippy! (sarcastic yippy) ;)

Note 2 : This application is not using any ORM. So all queries are directly using SqlCommand. So any call to any DB objects are in string format.

View 3 Replies

VB - New Project - Creating Variables ?

Nov 29, 2010

I'm studying visual basic and wanted to know where I place my code in the new project which looks like this below:

Public

Class Form1

Private
Sub Form1_Load(ByVal sender

[CODE]...

I'm creating variables.

View 7 Replies

Find References And What Types Are The Variables?

Mar 23, 2010

[URL]

Where do I find the references and what types are the variables in this example. I copied the code into a new VB 2008 windows project, and all the vaiables and some method calls have "is not declared" wavy lines.

View 1 Replies

Passing Variables From One Project To Class Library

Mar 10, 2009

How to pass a variable in one project to dll in vb.net

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

Adding A Module To Project - Variables Never Get Set To The Values In The Text Boxes?

May 4, 2011

Form1 has 2 public string variables defined and initialized to "" (an empty string).Form2 has 2 text boxes and a button. When the button is clicked the public variables on Form1 get set to the values in the text boxes.This works fine.I recently had to add a module to my project so that I could use Main as the startup item. Ever since doing that the above no longer works.The variables never get set to the values in the text boxes. They just stay empty.My Main code is simply this for now:

Dim f As New Form1
Application.Run(f)

View 1 Replies

Setting Global Variables Within Web Project On Login And Set Expiry Time

Dec 1, 2011

I'm developing a revised version of a system I have been using for years, but with all the advantages of .NET features that were not around when I first made this. It's proving a steep learning curve! So, when a user logs in through my Login.aspx page which simply compares username/password to Database record, the system creates a session variable containing the user's Username and various other things. There are two type of variable which will be common to all elements of this system
User Specific data, Username, Permissions, etc

Setting variables, drawn from a database of pre-set facilities which are setup within the system, some will determine which facilities work, how they work, and some will be dependent upon the User's permission. Obviously, I could set everything within the Session data, but that'd be inefficient wouldn't it? If I were to set these globally available variables in my App_Code, how would I go about setting this up so that, for example, those variables which require a database call, are set for the duration of the Logged-In session and do not require constant Database lookups? Further to that, those variables which are dependent on the session state, would need clearing on each LogOut. I am using VB.NET.

View 1 Replies

Warnings In Project Make No Sense - The Variables 'uxRecentlyOpened' Is Either Undeclared Or Was Never Assigned?

Aug 14, 2009

I have a form called SearchScreen and on that screen is a custom control of class recentlyOpenedCompany called 'uxRecentlyOpened' within the form. I have made no changes at all to the SearchScreen form. I have added an aboutdialog to the project and deleted an about form. Thats itand

View 1 Replies

.NET Remove Unused Code Tool?

Apr 23, 2009

I need to remove all the unused code in my companies project. There is about 1.5 million lines of code, therefore I need a tool to help track it all down. I was wondering if anyone could recommend a tool. I found Project Analyzer but I need good justification on why we need to use this software because the verndor is foreign based.

View 2 Replies

Check The Lowest Unused Number?

Jul 6, 2011

I have a table named tbluser with fields code and name. I want to check the lowest unused number in code. For example table below:

code name
60688 jane
60689 dina

[Code]....

i have also one textboxt what is the first, second and third number to search
ex.

if
text1.text=6

therefore first number is 6 second and third is 06 and the result should be
60601 since in the code the lowest unused code is 60601.

View 23 Replies

Deleted The Unused Image File?

Jun 7, 2009

deleted the unused image file

View 4 Replies

Trim Unused Array Index?

Apr 26, 2009

I have some arrays that I don't know the exact number of indexes it will have, but I know the max it will have which is 1024, but let's say only 24 of those are actually used, is it possible to trim off the excess 1000 indexs that are worthless for efficiency purpose (if that even matters)?

View 7 Replies

Unused Local Variable Error?

Mar 24, 2011

Sub WriteEOFData(ByRef FilePath As String, ByRef EOFData As String)
Dim sFileBuf As String
Dim RoPepfMiyYgyrTfLY7YxdpSoSOycKgR06b1oCptGcO As String
Dim lFF As Integer
Try

[code]....

View 3 Replies

Cannot Find Controls With In The Same Project?

Nov 22, 2010

I am trying to update a Vs2008 project to vs2010. In one of my projects I have two controls. The controls are not being seen by the form when I open it up in design view. They are friend controls. (No code has changed since I opened it up in vs2010.) But it was running fine in vs2008.

View 4 Replies

Find The Project Types?

Sep 9, 2009

Suppose somebody created a solution which contains many projects. How can I find the project types? I mean that how can I know whether a project is a library type or console application and so forth from IDE?

View 4 Replies

Find The Value Of The Key Pressed Down In A WPF Project?

May 28, 2009

I am working on a WPF project in Visual Basic. In some textboxes I want to limit what the user should be able to type. The sub roughly looks like this:

Private Sub Intervall_KeyDown(ByVal sender As System.Object, ByVal e As System.Windows.Input.KeyEventArgs) Handles Intervall.KeyDown
'Determine whether the keystroke is a digit from the digit keys on the top of the keyboard.

[Code]....

If the I type backspace or delete, keydown doesn't react, so these particular cases I've handled in KeyUp.

There are two problems with this code: The test If e.Key < Key.D0 only checks whether the user has pressed the key that contains 0 at the top of the keyboard. It is also possible to enter some other signs if the user presses shift, and this test doesn't discover whether the user presses shift. I therefore need to extract the actual character that the user entered, not only which key he or she entered, and check if this character is a legal one. This is easy in a Windows.Forms project; there I can use e.Keyvalue, but in my WPF project I don't get that alternative when I enter a dot after "e".

It's necessary to solve this problem in order to do the next step: The user should also be allowed to enter colon, as this textbox describes a time that an action should be performed. If I could check the content of the key pressed, this would be easy. The problem is that the test If e.Key = Key.OemPeriod returns true whether the user pressed shift or not, i.e. whether the user entered a period or a colon, which are on the same key on my keyboard, I don't know how it is on other standards of keyboards.

I have tried hard to find a solution for this on Google, [URL] and MSDN, but I haven't managed to find any articles or topics about this particular problem. Does anyone know how to do this in a WPF project?

View 6 Replies

Having A Find Dialog In Vb Project?

Jun 21, 2010

I'm using Common Dialog in my project but I can't find the "Find and Replace" dialog there, how can I use that?

View 1 Replies

VBA: Cannot Find Project Or Library

Oct 4, 2005

I am having a problem running an Excel/VBA program that has been working till this morning. The error I got when I ran a macro I wrote is: Compile error: Cannot find project or libraryWhen I check the references in VBA editor, I find the list of references to be different than when I ran it on another machine. I have some xla libraries on a server that I've linked to the application, and the libraries are being shared among my colleagues. I tried relinking the libraries but that didn't work either. Sometimes, I get another message saying the library is being used by another application.

View 10 Replies

Getting 6 Unused Local Variable Error Messages

Nov 8, 2010

I am getting 6 unused local variable error messages. If I comment out the variable, I get en error because it really is in use. I tried re-building project.

error

Warning 2 Unused local variable: 'sqlCustomerInsertTicketConn'. C:UsersJeffDocumentsVisual Studio 2008ProjectsJeffComputersPOS1JeffComputersPOS1Module1.vb 1741 17 JeffComputersPOS1

View 4 Replies

Unused Bits In The Decimal Data Type?

Sep 21, 2010

What's the deal with those 23 unused bits in the Decimal data type? You know, there's the 96-bit integer portion, then 16 unused bits, then 8 bits for the exponent (which can only be 0 through 28, so doesn't even use all 8 bits), then 7 more unused bits, then the sign bit [URL]...

View 1 Replies

Can't Find DynamicDataEntry Project Code

Jun 9, 2012

Find the COMPLETE CODE for the DynamicDataEntry project mentioned in Evangelos Petroutsos book, Mastering Microsoft Visual Basic 2010, page 239, theme "Handling Repeated Data Items".

View 2 Replies

.net - Windows API Leads To Different Results Based On Name Of Unused Variable?

Apr 5, 2012

Everything I know about .Net programming tells me that the behavior I see here is completely impossible. Simple code:

Structure WKSTA_USER_INFO_1
Dim wkui1_username As Integer
Dim wkui1_logon_domain As Integer

[Code]....

When I put a break point in here, I see that after RtlMoveMemory, my wk1 contains a pointer to a username, and all the others are 0. This is consistant. Now, if I change Dim test As String = "" to Dim login As String = "" and run it again, wk1 contains pointers to both username and logon_domain.

If I change it to Dim login As String, it contains a pointer to only the username. Depending on what I change that (completely unused) variable name to, I get a different result.

I have always been under the impression that it cannot possibly matter what you choose to name your variable. And that declaring a variable, and then never using it, cannot possible be different from not having a variable there at all.

I've tried this on 2 computers, with consistant results (one on .Net 3.5 and one on 4.0). When I tried converting it to C#, however, I was not able to reproduce it.

I am aware, by the way, that I can just use System.Environment to get what I need about the current user information; this was old VB6 code that was automatically upgraded (and I've edited it a little to make it more trivial).

View 1 Replies

VS 2010 Remove Null / Unused Arrays From A Program?

Sep 19, 2011

How to remove unused arrays from a program? The array is has an upper bound of 19. If the array isn't full, I get a null array error.

View 9 Replies

Compile Error: Can't Find Project Or Library

May 7, 2010

Does anyone able to advise on abovementioned error? Under Private Sub UserForm_

[Code]...

View 2 Replies

Find Total Number Of Warnings In Project?

Aug 15, 2011

I've just converted a project from .net 1.1 to 3.5, and I'm being given loads of warnings in the error list. The program compiles and runs ok, but I think I should probably try to at least reduce this large number of warnings.The trouble is that the error list only tells me about the first 102 warnings. Even when I fix one, the number stays at 102. So I have absolutely no idea how many warnings there actually are. If there are 150, I'd like to get rid of them. But if there are 10,000, I don't have the time to fix them all.Is there a way to see the actual total number of warnings?

View 2 Replies

Publishing A Project - Can't Find The Installation Directory

Mar 18, 2009

I am trying to publish a project. Via the publish wizard I have published the project. So I have:Project.applicationSetup.exeand a directory application files in which:Project.applicationProject.exe.deployProject.exe.manifest. When I start the setup it does it's thing (only one question: do you want to install ...etc) and 2 seconds later its done.

Problem:
1. I can't find the installation directory... (I can find the app in the 'add/remove programs' but not anywhere in program files or ..)

2. there are a few xml and mdb files I want to include in de project (or else the project does not work).

But because of (1) I don't know where to do so. Or beter yet, I would like to include these files in the installer.3. Why doesn't the installer ask me where I want to install?

View 5 Replies







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