Creating A System Variable?

Jun 10, 2011

WINDOWS PLATFORM: WINDOWS 7APPLICATION LANGUAGE: VISUAL BASIC 2010 EXPRESSWINDOWS FORMS DESIGN.CONTROLS: CHECKBOXES, RADIO BUTTONSDear VB Programmers,The function of the checkbox is to: check whether the application will display a particular page @ start up or not.

View 2 Replies


ADVERTISEMENT

Cast Array In Object Variable To Type In System.Type Variable?

Apr 14, 2010

I have this function:

Public Sub DoStuff(ByVal type as System.Type, ByVal value as Object)
End Sub

The 'value' argument is always an array of the same type as 'type'. How can I loop through the values of the array?

I'd like to be able to do something like this:

DoStuff(GetType(Integer), New Integer(){1,2,3})
Public Sub DoStuff(ByVal type as System.Type, ByVal value as Object)
//Strongly types arr as Integer()

[Code].....

View 3 Replies

Creating An Array With A Variable Value?

Mar 22, 2010

i want to declare an array with a name that is the value of a variable. I need to do this because i want to create arrays from a text file that i'm reading.Basically, if someone could make this work then i should be able to change it to fit my use.

Dim var1 As String = howdy

Dim var1() as Integer

In this case i'd like to be declaring an array with the name 'howdy' that stores integers. In reality i'm looping a bunch of read names and would like to create an array for each name i read- but i'm quite capable of sorting the rest.

View 6 Replies

Creating A Graph Using Variable Values?

Feb 23, 2011

I have created an array of 6 numbers which are randomly generated, I can create a graph using six randomly generated numbers, however what I want is to use the random values that are placed in the array to create my graph, I have enclosed the code that I have:

Private Sub btnGraph_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnGraph.Click
txtAns.Text = ""

[Code]......

View 3 Replies

Creating A Unique Filenamme With A Variable

Dec 18, 2011

is there any way of creating a file in visual basic using a variable as the file name? I have tried using the following but keep getting an error "The given path's format is not supported." ??? I am trying to create a log file of machine use every shift (8 hours) and just want to use the same name for the file with the date and time appended to the end of the file name. the section of code giving me the error is below.

[Code]....

View 6 Replies

Creating A Variable For Bunch Of Stuff?

Mar 1, 2012

I want to create a variable that will hold bunch of stuff.

I will be using over 50 IF statements (it's a complicated number game) and the IF statements will be something like this.

If something = 1 then
' do this
' then do that

[Code]....

View 12 Replies

Creating Variable - Expression Does Not Produce Value

May 1, 2011

Why I cannot get a variable to come in. I keep on getting the error "Expression does not produce a value" for one of my Dims.

Imports System.IO
Public Class Main
Dim image_1 As Integer = Openimg1.FileName
'The line below is the one causing my problem
Dim image_2 As Integer = My.Computer.FileSystem.RenameFile(Openimg1.FileName, "_hid" + System.IO.Path.GetExtension(Openimg1.FileName))
[Code] .....

So basically, how can I create a variable from something that has yet to be created?

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

Error Creating Global Variable?

Sep 19, 2009

I have got a bit of code which creates an error when you start debugging. the code is:

Dim Gravitee As Decimal = TrackBar1.Value / 100

This code is a declaration (outside of a sub) so that it can be used in any subs I choose. I don't know why this causes an error?

View 3 Replies

Creating A Session Specific Global Variable?

May 12, 2012

Is it possible to create a variable that is global for each session in ASP.NET? Usually I do this with Session:

Session("my_variable") = 10
But this necessitates casting it every time I want to use it like so:
Dim my_variable as String = CInt(Session("my_variable"))

[code]......

View 2 Replies

Creating New Instances Of Form1 With Variable Properties

May 13, 2009

I'm trying to elaberate on some basic examples of .Net programming in using VB. The basic example of creating a new instance of Form1 is:
Dim x as New Form1
x.Show
I've added some OptionButtons to set the StartPosition of the Next Instance of Form1 as well as some Labels that display the Top, Left, Width and Height properties when the new instance of Form1 is Shown.

This is the code I'm using.
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim x As New Form1
If Me.RadioButton1.Checked = True Then
x.Top = 0
x.Left = 0
[Code] ......

View 1 Replies

Multidimensional Array - Creating A Variable For A Grid In .net?

Sep 6, 2011

I need to store elements in a multidimensional array. Specifically, I need to save "tiles" to a grid (e.g.Grass at x:2 y:5, Dirt at x:3 y:5, etc.). Using a multidimensional feels very hacked up and is very glitchy (having to resize my arrays and having to create new ones were they are non-existant). Is there some kind of element made for this? Something I can say obj.getPos(2,5) and get my Grass Element and use obj.setPos(DirtObj, 3, 5) to set it to my Dirt Element?

I'm just wondering if there is something easier to use than multidimensional arrays in vb.net, that is all.

View 1 Replies

VS 2008 Creating A Sql Query With A String Variable And Executing It In VB

Feb 15, 2011

Ok I'm creating a sql query with a string variable and executing it in vb. The string would look something like: Insert Into Table (vara,varb,varc) Values ('vara','varb','varc') This works fine.

[Code]...

View 2 Replies

Calander Click Event, Auto Creating A My.setting Variable

May 24, 2011

Im trying to create a diary system that on click event of the built in calander in vb.net opens the current diary entry for that day. i am using the my.settings variables to store the entrys the problems i am having is how to create a my.settings variable automaticly if one dosnt exist for that date (will be using the date of the clicked day as the name e.g. 10/5/2011)

So basicly i want the user to be able to click through the dates on the calander and the entry be displayed in a text box next to it, blank if nothing is there and the user can edit/save them after just need the code to auto create and i guess how to search the my.settings im quite new to using this storage, i normally use text files. the pic shows the program so far, it has one diary entry but it has no relation to the date. the label is linked to the calander also , displaying the selected date.

View 2 Replies

Calander Click Event, Auto-Creating A .setting Variable?

Aug 11, 2011

im trying to create a diary system that on click event of the built in calander in vb.net opens the current diary entry for that day.i am using the my.settings variables to store the entrysthe problems i am having is how to create a my.settings variable automaticly if one dosnt exist for that date (will be using the date of the clicked day as the name e.g. 10/5/2011)so basicly i want the user to be able to click through the dates on the calander and the entry be displayed in a text box next to it, blank if nothing is there and the user can edit/save them afterjust need the code to auto create and i guess how to search the my.settingsim quite new to using this storage, i normally use text files.the pic shows the program so far, it has one diary entry but it has no relation to the date.

View 2 Replies

Creating A POS (point Of Sales) System

Dec 15, 2011

I have just finished college and I am awaiting my exam date. I have created some desktop applications for my portfolio, but now I want to create a Point of Sales (POS) system to add to the list.I notice in supermarkets and various shops that POS systems use touch screen monitors to interact with the program.My first question is, do I need to use different code or controls in my applications so they can be used with touch screen monitors.I have created an application for hotels for booking rooms (not for a client, just as a demo project), but if there is anyone out there who could give me some pointers on how to create the POS system.I will be doing some research and I will start designing some controls over the next few days. I am looking forward to getting this project started.

View 2 Replies

Creating A Stock Control System Using .net?

Jan 15, 2007

my project is about creating stock control system to a bookstore which you can get details of books available,slow moving books..etc i just want to know about creating forms for my project what kind of forms you needed for ex: add,edit,delete btns.

View 4 Replies

Creating Simple POS System For Bakeshop?

Jun 21, 2010

i want to create a simple POS system, can you tell me how can i hide group of buttons/ controls on the first load of a form and then group of controls will just show after a button is clicked or selected. Also i want to have a display (on same form) of what is selected by the user.

View 3 Replies

Using Variable In System Graphics

Jan 14, 2012

I am trying use a variable which is set by the Color dialog box in the FillPath and Drawpath. ie: to select the color

[Code]...

View 1 Replies

Challenges Creating A Correlative Update System

Apr 8, 2010

I have a program that I have gotten as far as programming it to inform the user of updates, have them push a button to download it. The updated version of the exe will be downloaded into a subfolder called "Updates", where there is a program called "Updater.exe"This program is one form, with a progress bar and informs the user the program is being updated. Every time I run through it step by step it appears to work, but in a real environment the program stalls out. It doesn't crash, but the bar continues to move with no action being taken. I can not help but wonder what on earth must be going on in the code, which you can see is quite sloppy and rather unweildy:[code]And there is of course the issue of not being able to change data on the hard drive without administrator privileges as is being discussed here: url... When I finally get a manifest working for this program to require administrator access....how could that screw up this updating process...How can I better perform this, what seems to me, simple process of deleting the old file and replacing it with the update?

View 8 Replies

Creating A Tool To Log Encountered By Users Of System

Jan 14, 2009

I haven't been doing a programming for awhile now. But, I was a VB programmer before. I will be creating a tool to log issues encountered by the users of our system. It will be a web based. I'm planning to create it in VB.Net. Any resources that you could share is greatly appreciated. I'm looking for a ready program that I could start with to speed up my programming.

View 1 Replies

Creating User Account Login System?

Mar 14, 2012

I am trying to create a windows forms login using vb.net and sql that has the option to create user accounts with such properties like administrator and more.

View 6 Replies

Creating WAV Files Or A Mp3 File Using The System Beep?

Aug 5, 2010

i've been looking at something like this A Simple Beep - Reminiscing about ZX Spectrum audio - CodeProject But is not what i'm looking for. I want to know how to create a wav or a mp3 file using the system Beep!Simple i want to write a wav file with the specific Console.Beep(700, 220) Sound.

View 2 Replies

System.IO.IOException When Creating A Test File

Aug 26, 2009

Determining the max filename & path size of the OS.zip I whipped up a quick app to test the max filename & path length for a chosen folder. It works gr8 except when I choose the root of the C-drive. When I do, I get this error:

[Code]...

View 3 Replies

.net - Variable Seen As System.EventArg Which Seems To Be KeyPressEventArg?

Jun 11, 2012

Private Sub RichTextView_TextChanged(ByVal sender As Object, ByVal e As
KeyPressEventArgs) Handles RichTextView.KeyPress, RichTextView.TextChanged
Dim c As Char = e.KeyChar

[code]....

The above code produces the error: Unable to cast object of type 'System.EventArgs' to type 'System.Windows.Forms.KeyPressEventArgs'. It throws the error at capitalise_first_letter.Add(h) (capitalise_first_letter is a List of String).

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

Creating Folders In System Root - No Sufficient Privileges

Jan 11, 2010

I am trying to create a new folder in C:\Windows\System32\oobe but I cannot get sufficient privileges. Here is the bit of code that has the error
' I have "CreateDirectory("C:\Windows\System32\oobe\info\backgrounds") in the Form load sub
Sub CreateDirectory(ByVal Path As String)
Directory.CreateDirectory(Path)
End Sub

And then in Form Load I have:
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
CreateDirectory("C:\Windows\System32\oobe\info\backgrounds")
End Sub

It keeps saying I don't have the privileges. Is there any way around this? I also need to put files in that folder later on.

View 5 Replies

Is AES A Viable Solution For Creating A Hash Verification System

Apr 1, 2009

I am writing a program that and like to implement data verification system. It needs to return a unique string for any value entered. My question boils down to: is it possible for an AES function to return the same value for two different entries? The source values will becoming from data held on a magnetic stripe card.

more details

I posted this through my phone originally, and I am now just getting back to this post.

I've been looking around the web and while reading Wikipedia's article on SHA, I see that SHA-2 (SHA-256/224, SHA-512/384) have no detected collisions (assuming the article is accurate/up-to-date). This is desirable. Any recommendations on what version of SHA-2 I should use?

View 5 Replies

Threads / Timers Troubles While Creating System Service

Apr 5, 2012

I thought that creating a simple system service under VB .NET would be a piece of cake. Boy, was I wrong. First, I find general postings through Google that say you should use the Windows.Forms.Timer. Then, I found conflicting information that says you have to derive the timer from a timer class through code to make it work. Then, people are reporting all sorts of trouble using the various types of threads available. I can't debug threads using the VS 2010 Just-in-Time debugger for obvious reasons (although, I don't know if there is an alternate method to doing this).My project is an application launcher (similar to cron) that will fire off periodically within a certain amount of seconds. I am trying to use the Process.Start() method. I have a Beep() function as the first instruction, and the Process.Start, along with a Process.WaitForExit method to make it block as the last instruction. I had my code doing this through timers, but now I am starting to use threads. No difference in execution. The over-ridden OnStart method does kick off (as I am certain through debugging), but nothing ever happens when starting the service in production, as if it were ignoring all my code. Putting loops and logic in the OnStart method yields a process that won't start. I know it is a threading issue, but I also know it must be mandatory to use threads. I am now dumbfounded as to how to make this work. I am curious to know the solution.

In addition to the service class, I have a ServiceInstaller and ProcessInstaller implemented that I copied verbatim from MSDN.Here is some of the code I am trying to work with. Note that this simply reflects the current state of my code in trying to implement the logic within a thread instead of a timer (which to me would be optimal):[code]

View 2 Replies

Use A Variable With System.Windows.Forms.Keys?

Apr 25, 2012

I want to use System.Windows.Forms.Keys with a variable for example

shortcutkey = "A"
keydata = System.Windows.Forms.Keys.shortcutkey

The idea was to implement custom shortcuts that the user specifies to perform certain actions.

My code is like this

If (((BindingFunctions.IsKeyDown(Keys.ControlKey) AndAlso BindingFunctions.IsKeyDown(Keys.ShiftKey)) AndAlso BindingFunctions.IsKeyDown(keyData)) AndAlso (keyData = Keys.L)) Then

[Code].....

View 1 Replies







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