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...
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.
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#
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].....
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.
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.
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] .....
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?
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.
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).
what if you created a pool of numbers: 1 - 21 and then chose a random selection from the pool? Something like the following:[code]This gets rid of those messy if statements and all of those loops.
i had a look at how to set values of variables from nummbers stored in external txt files the variables then needed to be added up so i used trial and error first
((XVAL) + (NEWVAL))
assuming that XVAL was set to 10 and NEWVAL was set to 20 i expected to get the answer of thirty but waqs presented with the new value of 10 20 VB.net pysicaly added the two values together but i wanted the mathematical product of the two which is ((10) + (20)) = 30
I have a VS 2008 C# application that I'm converting to VB 2008.
This statement in C# works as I expected: IPAddress IPAddr = new IPAddress(0xFFFFFF0A); IPAddr has a value of 10.255.255.255.
However, in VB this fails:
Dim IPAddr As New IPAddress(&HFFFFFF0A)
with invalid argument (the parameter of IPAddress should have type Long).This also fails:
Dim Addr as Long=&HFFFFFF0A Dim IPAddr As New IPAddress(Addr)[code]....
does not produce a value of 4294967050, but -246. It appears to have defined a .net type of Int32, not Int64.How do I declare an Int64 variable in VB using a hex constant?
I have 3 variables. Lets call it "a", "b" and "c". These 3 variables can "independently" have 3 different values. Lets say: "1", "6" and "10". when you think of them as combination; there are (3^3) 27 combinations. I am told that it can be done through the recursive functions. However i am not a good developer to handle with that. Would u please help me?
- 3 variables and 3 different values are simplified. In fact; the numbers of variables and different values can vary.
- i know only the language, visual basic in .net; please don't answer in other coding languages.
additional note: i am going to put the these combinations in the string format into a collection.. for example "1;1;1", "1;6;1", "1;6;10".. and so on..
I have a database in my app which loads and displays some information on a form by binding the Comboboxes and Textboxes. However, I need to get some of the other values from the database for calculations before they are displayed on the form and I can't seem to find out how to do this.I could bind a couple of Textboxes to the database and then use those values to calculate, but it doesn't seem like a very efficient way of doing things.The dataset is created using the wizard and the controls are linked in the UI.
I am programmer from some time only, I have certain doubts in fundamentals, could you please clarify on the following:Case 1:
[Code]...
Does case 1 and case 2 yield same result, I mean is a private value necessarily in there?, can we use property itself to use its own value in its Set and get statements?
I am learning visual basic .net and I am attempting to translate some java source code to a vb.net project. The project reads mp3 details and then splits the file accurately according to the frameheader details etc.
I am new to VB.Net 2008. I have a tricky task to resolve, it is regarding extracting characters (values) from a long string, the extracted values from the text shall be summed up and sorted by keywords, reformatted and saved into a CSV file.
I as part of the support VB code for a larger ASP project, I need to read back the existing data from an Access database, to see if user has changed a value.
I'm reading the existing data back into a DataView using the following function:
Public Shared Function GetPolicyStatus(ByVal intPolicyID As Integer) As DataView Dim strConString As String Dim conMyData As OleDbConnection
I have this string mainString="/MyApp/ViewPage.aspx?userId=admin&password=1&id=975"
I am getting value in mainString using this code Dim mainString As String = Request.QueryString("dest")
And I have two sting variables 1)strTempUsername 2)strTempPassword In these variables I want to store userId and password values from mainString.
So for this requirement how I write logic in code Dim arrArray() As String '/MyApp/ViewPage.aspx?userId=admin&password=1&id=975" strIndexq = mainString.IndexOf("?") ' Check QuestionMark Exist or not in mainString If strIndexq > 0 Then Dim strTemp As String [Code] .....
Here I am getting userId and password but in this code I will get problem when after ? if userId and password starts wit capital letters and password maybe contain characters like "1&a"
And after getting userid and password. I want to remove userid and password from mainstring. So I want mainstring look like: "/MyApp/ViewPage.aspx?id=975"
I have a dataview and want to update using a stored procdure. My Update procedure is as follows. When I have a watch on my variables (int & amt) it is reading empty string even though I pass values. Yes cell(1) is my ID coumn and cell(8) is my amt coulmn
Protected Sub GrdResult_RowUpdating(ByVal sender As
I am using an INSERT INTO ... VALUES statement in the following matter to insert data into a new row of a database:
[Code]...
How can I substitute variables for the explicit values of X and Y in this statement (for example, variables XName, XAddress supplied by user input via text box)?
I have a program that calculates values of a function, say f, with respect to another variable, say L.I have an array of f(L), for L going from 0 to a given integer value, say t-1 in steps of a value i.I need to export the values of this function to an Excel spreadsheet in a given column, and to do this, I would like to re-index the function f, since i is much less than one, and so the following loop I use (see below) won't work:
For L = 0 To t - 1 Step i Sheet.Cells(L, 1) = L Sheet.Cells(L + 1, 2) = f(L) Next L
The first code in the loop will essentially load the values of L itself, at which the function is defined and calculated, and the next line will load the values of the function at each value of L.Since the indexes of the row and columns in an excel spreadsheet only go in steps of 1, I need to convert the indexes of the function, or the indexes to which L is loaded, so that it would be scaled so that the first entry corresponds to L=0, but the next is L=i, but loaded into row number 2, etc.