VS 2008 Changing Variable Value?

Feb 1, 2010

with vb.net 2008 expressmy intention is to change the value of a variable to dbnull.value if the variable = ""so that i can insert null values in to the data base

Module sonsilaxa
Public Function deFcheck(ByVal i As String)
If Not i = "" Then

[code].....

View 5 Replies


ADVERTISEMENT

VS 2008 Variable Changing - How To Stop It

Feb 18, 2010

The following procedures sorts a listview column based on what the tag is, 'Numeric', 'String' or 'Date'. When you click on the column header the sort procedure kicks in. On the first click it will sort ascending and on the second click it will sort descending.

My problem is that when I click a second time it won't sort descending but re-sorts ascending again.It appears when the sortorder is passed to the ListViewColumnSorter.vb classes it changes back to ascending even though it's called as descending. I've bolded the offending variables using a Numeric search.Now here's the really iritaing thing, I have exactly the same code in another application and it works perfectly?

Private Sub lvwResults_ColumnClick(ByVal sender As Object, ByVal e As System.Windows.Forms.ColumnClickEventArgs) Handles lvwResults.ColumnClick
SortMyListView(Me.lvwResults, e.Column, , True)

[code].....

View 6 Replies

VS 2008 Changing The Path (environment Variable) Under VISTA With VB?

Mar 27, 2009

i need to change the "PATH" environment variable in a VB program (Visual Studio 2008). Here is the code i use to add the "C:TEST" folder at the end of the existing one.

test
Dim PathVal As String
PathVal = Environment.GetEnvironmentVariable("Path", EnvironmentVariableTarget.User)

[Code].....

View 5 Replies

Random Changing Of A Variable In A Class?

Aug 16, 2009

am running VB express (2008 edition). I have a class that holds 2 arrays (1 array represents the digits of the integer side of a number the other holds the decimal digits) I have overloaded all the operators to work with these numbers as if they were one. Each operator has the following format:

[Code].....

whats happening is that the sign of the b variable (and only the b variable) randomly changes. Almost allways at the statement bb=b (bb is in place so when I reach that point I know what the variable had before the calculation). I can watch it change as I step through the code (stepping over the operators) I can watch it change almost allways at the bb=b, but sometimes in other odd places (such as the d=a*yparam statement). I can change the values back to their original and step through the code(stepping into the operator this time) and it will not do it. It NEVER does it when stepping into the operator, only when I dont, and only sometimes. I have spent the last two days working on debugging this one problem, with every other variable in the function it works like it should and I am not sure what to look at next. I know it does you no good without seeing the code but didnt think pasting 8,000 lines of code would go over too well so I would be willing to send the source to anyone

View 6 Replies

Random Number Changing Variable?

Apr 14, 2009

have code to generate a new random number as follows (which is 100% working and generating numbers between 0-9:

Dim randomNumber As Integer
Dim randomNumber1 As New Random

[code].....

View 3 Replies

How To Avoid Changing Value Of Variable On Page Load

Jan 5, 2011

I am using Vb.net. I have a counter variable Dim rc as Integer This is a class level variable. loading the page for the 1st time, its value should be 0.But later I manipulate its value in various methods.My page reloads after most methods & the value of rc is re-initialized to 0. how can I avoid this. I need the page to reload but the counter should keep incrementing.

View 1 Replies

VS 2008 Error: Range Variable 'sender' Hides A Variable In An Enclosing Block Or A Range Variable Previously Defined In The Query Expression

Mar 25, 2010

I am getting the error:"Range variable 'sender' hides a variable in an enclosing block or a range variable previously defined in the query expression."for this

Imports System.Data.SqlClient
Imports System.Linq
Public Class Form1

[code]....

I can select any other item from the table without the error. "sender" has the same properties as "receiver" in the SQL table.

View 2 Replies

VS 2008 Use The Value Of One Variable To Call Another Variable Of The Same Name?

Feb 7, 2011

I am trying to use the value of one variable to call another variable of the same name.I have 2 variable one called VAR1 and VAR2.

The variable VAR1 has a value of "VAR2"
The variable VAR2 has a value of "HELP"

I want to be able to get the value VAR2 from the variable VAR1 I have defined the value of VAR2 early in the code and now I want to call that value by using the value of VAR1.The reason I am doing it this way as I have a list of 50 variables that are pulled from one system. Each of these variables have the same name as the columns of a spreadsheet. The total number of Variable stay the same but the total column headers may vary each time. I need to loop through each of the column headers match them with the variable names and add the data to the spreadsheet.

VAR1 = "VAR2"
VAR2 = "HELP"
i =1

[code]....

This is the tricky bit...if the value of the cell(1,i) = "VAR2" How do I get it to display the value of the variable of the same name In this case how will I get it to display "HELP" when I only have from the VAR1 value "VAR2" I know my code will bring back the value as a string but I want it to bring back that string as a variable and display the value of that variable?

View 9 Replies

Forms :: RichTextBox - Changing Font Size Without Changing Families And Styles

Sep 21, 2010

I'm searching for a way to change the font size of selected text in a RichTextBox (rtf) having different font families (e.g. Arial and MS SansSerif) and font styles (underline, bold...) using the FontDialog, but without changing the families and styles. The following code resets all the font attributes, which is not what I want:

[Code]...

View 5 Replies

Vb 2008 Changing Ip Address In IE ?

Mar 20, 2009

I have a webbrowser1 and textbox and button is there anyway i can put an proxy in textbox1 and change mine to it ? so webbrowser1 can browse a website under that ip and not mine ?

View 2 Replies

VS 2008 Changing .EXE Icon

Dec 31, 2010

I need to change my .exe's icon easily without having to rebuild it unless I can compile my code AND change exe through command line.

Reason for needing to change exe is for a small game creator so everyone doesn't have same exe.

View 5 Replies

VS 2008 Changing Process Name?

Aug 28, 2009

How would I change the process name? Like if the program is named Program.exe, how will I change it so that in task manager it shows up as something like Program2.exe

View 7 Replies

VS 2008 Impersonate Vs. Changing UAC

Jul 24, 2010

I've read alot where users have disabled the UAC or tried to set the level higher in the manifest file. My application uses a control that requires admin user rights and I'm trying not to have it prompt the user each time. I read more about using the Impersonate another user in Windows for vb.net. Would using the impersonate user method not prompt for admin and give the user admin rights as long as it has the username and password? I hate to disable the UAC - not good at all!

View 14 Replies

VS 2008 Label Changing

Aug 22, 2009

I have a label where several sentences of text is displayed, 2 radio buttons below it and then a Button. Instead of making the radio buttons display a MsgBox, would it be possible to make the radio button (depending on which you choose) alter the Label where the text is?

View 6 Replies

Changing Computer Name And IP Adress With Vb 2008?

Mar 4, 2009

I am trying to change the computer name and IP address of a client computer, doing so locally.Ideally, I would like it to look something like thisNew Computer Name: [TextBox]New IP Address: [Textbox][Button]That comes up when you click the executable and the program changes the computer name and ip and automatically reboots the computer to apply said computer nameI think have figured most of it, but I can't figure out how to get the my.computer.name out of "readonly" mode.

View 3 Replies

Changing Fonts In A Textbox - VB In VS 2008 Pro

Aug 2, 2010

I am working on a a program that uses a textbox to display data from a telescope. Normally the data is standard ASCII characters, but there is one time when the data is displayed as blocks to indicate the number of degrees to go. The textbox font is set to Sans Serif in the property box. When I show the blocks, I want to switch to Wingdings. I have searched how to change the textbox font and tried several ways found, but none of them work. I know that the textbox will handle Wingdings - I can set the font property and it displays correctly.

The most common method I have seen is: txtDisplay1.Font = New Font("Wingdings",26.0, FontStyle.Regular) ,but like all the other methods tried, the font never changes.

View 7 Replies

IDE :: VS 2008 - Controls - Changing The Look Of The Control?

Oct 26, 2010

I'm trying to change the look of some controls in VB.An example would be a button, I now have a stack of 4 images on top of eachother. By using the mouseover events and such, I get the same result as a normal button. However, I'd like to be able to insert those images into a normal button like thing.

I know it's possible to do this by creating a custom control, but that'd end up with the exact same code, just in a different file.

However, the real issue would be a dropdown box and slidebar. I'd like to get them to look nice with my theme. (Background, buttons, borders. Things like that..). I got absolutely no clue on how I should do that.

I know that there's a tool to create controls, but that's from scratch and I can't get a grip on it, at all.

View 10 Replies

VS 2008 - Add A Button And A Hotkey Changing

Sep 9, 2009

My current program starts if they press of a assigned HotKey. But, I want to add a button and a hotkey so they keycode I typed in the text box (And after pressing a "change hotkey" button" the HotKey would be reassigned.

[Code]...

View 11 Replies

VS 2008 - Changing The File Permissions?

Mar 22, 2011

I've added an FTP client to a batch publishing program that I wrote about a year ago. The batch program "publishes" CAD files from "Pro/E" to "eDrawings". Upon publishing, some of "eDrawings" files are automatically uploaded to an external server via the newly written FTP client.The publisher and FTP client are working great.I'd like to add functionality that automatically changes the permissions on the files I'm uploading to our unix server (RHEL5). When I do this via SSH, I simply utilize a chmod command (i.e. chmod 0755 file.htm).I'm using VB.Net's DirectCast in my FTP Client.Is it possible to change the permissions on the files I'm uploading via FTP once they're on the server as part of the file uploading process?

View 1 Replies

VS 2008 : Changing .txt Files At Runtime?

Jun 4, 2009

I am working on a project that uses a .txt file to store data for my arrays. Everything is working correctly i.e. I can read the file and write to the file, my issues when I exit out of runtime I get this msg

Quote:

M:My4BVB....Customer.txt

This file has been modified outside of the source editor. Do you want to reload it?I understand what it means, what I would like to know - is there a way to stop it from popping-up?

View 2 Replies

VS 2008 : Changing Font In A RichTextBox?

Oct 31, 2009

I'm trying to figure out how to change the font in a RichTextBox without having to select the text I want to change first. I know I can select text and change it like this:

RichTextBox1.SelectionStart = RichTextBox1.Find("working")
Dim tfont As New Font("Arial", 16, FontStyle.Regular)
RichTextBox1.SelectionFont = tfont

What I want to do is set a font and then any text added to the richtextbox will use that font. Then I want to set another font and all text after that point will use that font and so on. I'm adding text to the RichTextBox with code, but I'd eventually like to add a RichTexBox to an app where the user enters the text and can change fonts like a word processor.What I'm try to accomplish would go something like this:

' Set the font for the header here
rtbPrint.Text = rtbPrint.Text & mHeader & vbCrLf
'Set the font for the body here
rtbPrint.Text = rtbPrint.Text & mBody & vbCrLf

View 3 Replies

VS 2008 : Changing My.Settings Value During Runtime?

Sep 4, 2009

How do I change my code so that it will change the Value of the My.Settings.* to what TextBox1.Text is

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
If RadioButton1.Checked = True Then
My.Settings.Acc1 = TextBox1.Text And My.Settings.Pass1 = TextBox2.Text

[code]....

View 2 Replies

VS 2008 Changing And Saving Backcolor?

Aug 22, 2010

what im trying to do now is allow the user to change the backcolor on each form if they would like a different color.The application im working on has 6 forms in it.

View 4 Replies

VS 2008 Changing Combo Items On The Fly?

Oct 18, 2011

I have two combo boxes. box1 and box2 both on same form. Depending on what is selected in box1 will determin the items in box2. I would like box2 to change in real time (not pressing a button!)

Whats the best way to do this? use a timer on the form with lots of if else (or case) statments?

View 3 Replies

VS 2008 Changing CRC32 Code?

May 3, 2012

I am making a program for a game to change the textures. But when you edit an image file(the texture) it will change CRC32 and the game will notice you changed it so if you start the game the texture will just become grey. So what I want is that you can change the CRC32 code back to the old one that the game wil recognize and the texture won't turn grey. Now I found the CRC32 calculation on the internet but I can't figure out how to change it to the code you want.The CRC32 calculation class:

Option Explicit On
Option Strict On
<System.Diagnostics.DebuggerStepThrough()> _

[code]....

View 8 Replies

VS 2008 Changing Decimal Sign?

Mar 24, 2009

I want to change the language settings for the decimal sign.My language settings is dutch.Here the decimal sign is "," the data i'm reading uses a decimal sign "." How can i change de decimal sign settings?

View 3 Replies

VS 2008 Changing DGV Fonts At Runtime

May 9, 2009

I have 2 Comboboxes on my Form which also has a DataGridView. One ComboBox is populated with Font Names and the other is populated with a range of Numbers (Font Sizes). On a button click I've added this code

[Code]...

View 2 Replies

VS 2008 Changing Form Shape?

Jul 14, 2009

I want to change the form shape. like round corners.

using designed images as form but are transprant.. like this

View 6 Replies

VS 2008 Changing Label Location?

Jul 18, 2010

if the users clicks on a setting the text of a label will change, but its not aligned so I want to get it aligned? Label1.Location and then?Label1.Location (blabla ;blabla) won't work so..

View 7 Replies

VS 2008 Changing Object Name In Combo Box

Jul 19, 2009

I was just starting to learn how to use classes today and I think I might have a vague handle on them.Anyways, I was using a class to generate troops (as objects, since I needed various statistics tied to each individual one) in an army for sort of a basic medieval-type game I was creating and adding them to a combo box.It all works perfect and the index holds my object and I can call data from it, etc., my only issue is with the aesthetics of my result.All of the troops I add to the combo box as objects appear in the dropdown list as "WarProject.Soldier", the name of the object. This is obviously not something an end-user would understand or want to see. I have no idea how to change what an object appears as in the combo box.

View 6 Replies







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