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


ADVERTISEMENT

.net - Creating Global Variables In Asp.net Using C#?

Nov 25, 2009

I was working on window appication previously where i used to create global variables using modules in vb.net, but i found that in C# there is no concept of modules. so how can i create global vaiables in C#

View 9 Replies

Creating Same App With Different Variables Values

Feb 21, 2010

I would I have a program that I use in the computer in my network, but for every user I need to edit the source to this user, thus the user cannot edit his information, just use the program how it was ... So, looking over the internet I found a "program" that may contains my solution... Its a Keylloger, I'm not meaning use this keylogger, no, but it has a a very interest feature: I use the main form to edit the information then after all it create a new program with the new information inside... I use my main program to create every userprofile then my program create a new program with the profile inside...

View 12 Replies

Creating Variables And Populating From XML?

Feb 25, 2011

I have created a script in powershell that has done this, but amo moving to a VB app and am having troubles.The snippet that I am adding shows what I did in powershell. I created variables using the XML and from a SQL database compared them, and updated the XML to reflect changes pulled from the database. I want to cycle through creating the variables as more may be added in time and want to make sure I don't have to keep adding code to pull out the data manually one node at a time.rudimentary code as I am new to both powershell and VB. Currently using VS2008.

code/xml below.
$xml = New-Object XML
$xml.load("g: estingackup_local_config.xml")[code].....

View 2 Replies

Creating Variable Names From Other Variables?

May 20, 2010

how do I DIM a variable's name using previously declared string varialbes? I have been using PERL for processing data stored in text files but I now have a business need to use VB2008. I would like to do something like this:

dim name1 as string = "ABCD"
dim name2 as string = "123"

'here is the part that I don't know how to do - create a 3rd variable name concatenated from name1 and name2:

dim string.concat({name1,name2}), or maybe use a counter in a line like 'dim namex as string' with x being a counter value.

Essentially I want to dim variables using text strings extracted from a file. In PERL I have declared literals and arrays, such as 'my @$name1', which creates an array named with the contents of $name1. In VB2008 I am not sure how to make this work with the DIM statement.

View 5 Replies

Accessing And Creating Variables Inside A For Loop?

Oct 15, 2011

I have some variables that are distinct by numbers, like in1, in2...If I have for loop, how would I access those variables, using the counter, and attaching it to the variable?I believe in JAVA, you could just use in+ct... where ct is the counter to access the variable.also how could you make a new variable in the for loop?Initially I had variables declare outside of the for loop. The problem was how to access those variables using the for loop.

var_nm1 = in1.Text
var_nm2 = in2.Text
var_nm3 = in3.Text
Dim nmList(2) As Integer

[code]....

This is object oriented programming, and I made the textboxes in1, in2, and in3 using the GUI editor. that was so easy.

View 10 Replies

Creating Temp Local Variables - Bad Practice?

Jan 12, 2012

When I want to maintain code readability and keep things neat. I would create temp variables . Below is one of my functions that uses it. Is it a bad practice? I would create temp variables cost more memory ?

Private sub test(byref transac as transaction , byref txntime as string )
Dim cmd as OracleCommand = nothing
Dim Adapter As OracleDataAdapter = nothing
Dim SQLStr As New StringBuilder
[Code] .....

View 9 Replies

Creating Variables Based On Textbox Input?

Nov 6, 2011

I have a form with a few text boxes, one of which has it's contents stored to a integer variable.

The value stored will end up being one of a few numbers ranging from 12 to 98, and I need to the same number of new variables as the number in the textbox.

Can I automate the creation of new variables based on the value stored, or do I need to define the max number required and just ignore the rest when using less?

View 2 Replies

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

.net - Creating System Level Environmental Variables Manually?

Feb 16, 2010

How do one create System Level environmental variables manually. I just installed a GeoSupport Desktop Edition software and in the document it is mentioned that I need to create system-level environmental
variables for PATH and GEOFILES manually

Add the location of the GDE executables to the system-level environmental variable PATH.Normally this means adding C:Program FilesGeosupport Desktop Editionin to the PATH.

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

Creating Multiple Forms At Run-time - With Variables Passed To Form

Oct 4, 2011

I'm making a IM LAN Chat, and I don't want to limit it to a specific number of chats that can be open at any given time (By re-producing the forms and setting variables once a chat is open).

[Code]...

View 4 Replies

VB 2008 - Creating A Program That Can Store Numerical Values In Variables

Apr 15, 2010

I'm creating a calculator in visual basic 2008, and with this calculator I want to implement a feature that can store numerical values in a variable for instance x. Similar to the feature used in most graphing calculator that have the button showing: "STO->". I was thinking on using the My.Settings. But I'm having trouble on it.

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

Creating A DLL From Project?

Mar 20, 2009

im trying to create a .dll called PDTKey.dll (for example) that will hold all of my applications Product Keys..and when the user inserts a Product key into the main application..it searchs in PDTKey.dll to see if the Poduct key specified is there..

View 13 Replies

Creating A Project From A Project

Apr 6, 2011

I have a pretty large project built in vb.net under VS 2008. This project is heavy using SQL.

There is one part of the project, that I need to make a smaller project. So I am taking 6 forms out of 23 and adding them into this new project. Instead of adding the data set, I built a new one. With a different name. But it's connect to the same database.

First of all, is this a good way to make a sub-project, or is there a better way.

Secondly, I am running into a problem where my table adapters are not members of dataset. I get this error in the design code. I know it's not a good idea to manually change this code.

View 5 Replies

.net - Creating A COM Dll In VB 2008 And Using It In A C++ Project?

Jul 28, 2011

create a COM dll in Visual Basic. [URL]I now want to use this dll in a C++ project. I used OLE/COM Viewer to create an .idl file as is described in the second half this tutorial.[URL]I compiled the .idl with the midl compiler and included the .h file that was created in my c++ project.Here is my Visual Basic Code

<ComClass(MyComClass.ClassId, MyComClass.InterfaceId, MyComClass.EventsId)> _
Public Class MyComClass
#Region "COM GUIDs"

[code]....

I receive the following errors when I compile my c++ project

error LNK2001: unresolved external symbol _CLSID_MyComClass
error LNK2001: unresolved external symbol IID_MyComClass

View 1 Replies

.net - Creating A Logging Project In VB From Zero?

Dec 27, 2011

I've been assigned to start a new Logging Project from zero in VB.NET.The final exit of the main project is information organized in paragraphs like this:

[code]...

Every paragraph correspond to a database connection. Every connection is made with an entire diferent database.i need my logging project to save everything the user does, so the logging exit would be like the system exit but with exceptions and other important information like this: Paragraph's title 1 Paragraph's content 1.Paragraph's title 2 User wasn't able to see this information because an exception ocurred: System.WhateverException:couldn't connect to WCF.as you can see the exit is the same but i need to create a detail log because the information is delicate and the DBA needs to now wich user did what and what was the response of the system. Also i need it to be and independant project so i can re-use it in another projects. Seeing the final exit of both the main project and the logging project, what would you recommend me to use for logging in .NET?

View 1 Replies

Creating A .Net Project Programmatically?

Oct 3, 2010

i'm currently working on building a program that will take a MS Access database system produced by my company and create a VB.Net project with all the forms in it (obviously the code should be manually done, but to save time the forms and controls can be produced automatically).I have tried Googling and seem not to be able to find anything about this (which probably means I wasn't searching with the right keywords), I was wondering whether anyone knows any good resources on how to create the VB.Net project programmatically as I already know how to do all the access stuff.

View 1 Replies

Creating An Error Log In VB Project

Jul 23, 2008

I am building an error log in a VB project. Is there a way to extract: 1) the name of the sub that a sub routine fails on? 2) what line of code a sub routine fails on? 3) what other items can I extract that are meaningful?

View 2 Replies

Creating Custom Events In Project?

Sep 28, 2009

I am working on a project that has some events already created and working. One of these events is called SelectedIndexChanged Event. I am using it for one of my Subs in my frmNewInspection Class, and I am trying to use it for a second Sub and it says that "Event SelectedIndexChanged Cannot Be Found".

The event is created here in a class called LabelComoBox
Private Sub tctlInspection_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles tctlInspection.SelectedIndexChanged
'MsgBox("Index: " & tctlInspection.SelectedIndex.ToString)
[Code] .....

View 11 Replies

Error Creating Project (Win XP) VS 2005 Pro

Feb 23, 2009

So, I fired up my old laptop while my current app was running and tried to start a new project.

As soon as the form comes up, I see this instead of the normal windows form.

Code:
at Microsoft.Win32.RegistryKey.Win32Error(Int32 errorCode, String str)
at Microsoft.Win32.RegistryKey.GetValueNames()
at Microsoft.VisualStudio.Shell.Design.WindowPaneProviderService.AppendWindowPanes(RegistryKey parentKey, ArrayList windowPanes)

[Code]...

View 4 Replies

No Forms In Creating New Project In VB 2010?

Dec 20, 2011

no forms can be seen when creating a new project.. i am going to choose a window form but there are no forms to choose.

View 12 Replies

No Items Found In Creating New Project?

Dec 20, 2011

i am trying to create a simple program in vb.net but i cant start because there are no items found.. no forms are found am i missing some libraries or i installed it the wrong way?

View 22 Replies

Ppt On Mini Project - Creating Web Browser

Jun 12, 2009

i am a student of b-tech i want a ppt for my mini project i.e. web browser using vb.net .

View 4 Replies

.net - Creating A Pop-Up Calendar In A VSTO Excel Project

Apr 23, 2009

I'm trying to use the System.Windows.Forms.MonthCalendar control within a VSTO Excel workbook. I want the MonthCalendar to pop up when I click a button in the ribbon, but so far I can't get the control to display at all.

Private Sub DeliveryDateFromCalendarButton_Click(ByVal sender As System.Object, ByVal e As Microsoft.Office.Tools.Ribbon.RibbonControlEventArgs) Handles DeliveryDateFromCalendarButton.Click

[Code].....

View 2 Replies

Creating .net Component -function To Be Utilized In A C# Project?

Aug 11, 2010

Given the following code and link to SkyDrive VS2010 project, how would I create this vb.net project and access it in my c# application?

//the following c# project reference to function in vb.net is not working

string retval = ConvertUTF8_toASCII.UTF8_toASCII(stirngToConvert);

View 5 Replies







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