VS 2010 : How To Make Variable Switches

Nov 30, 2009

i have a drop down box, with 2 Options Yes and No,what i want to do is

if questBox = Yes
do this
else if questBox = No
do that
end if

but not sure how to do it.

View 1 Replies


ADVERTISEMENT

How To Make A Program Which Can Accept Switches Like Cmd.exe / K Or / C

Sep 24, 2010

I am trying to figure out how to make a program which can accept switches like cmd.exe /k or /c basically i want it to accept commands by myapp.exe /c mycommand.i tried searching and googling but no luck. Also is there a way to run a function like that? And if anyone is wondering why then basically i am copying a script to my domain computer and executing it. This i already have done but problem is its just getting too much copyin multiple scripts and executing i would put everything in on and run em by switches.

View 2 Replies

VS 2010 Subroutine That Switches Focus To Textbox When TabPage2 Is Selected

Feb 3, 2012

I currently have a subroutine that switches focus to a textbox when TabPage2 is selected. This works fine. [code] However, this doesn't prevent the Textbox from losing focus when TabPage2 is clicked on even though it's the active tab.I have a single button on that tab that disables the textbox if clicked using this: [code] Apart from that button being clickable, I would like the textbox to never lose focus as long as TabPage2 is the active tab.

View 3 Replies

VS 2010 - How To Make ComboBox Array Global Variable

Feb 23, 2012

I have an array of comboboxes on a form. They are declared at the beginning. I wish to make these global variables so I can access them in another form. This does not appear to work.

Code something like this:
Public Class SecondScreen
Public OutputSelectControl() As Combobox = {O1, O2, O3, O4}

Where O1 O2 etc are the names of my comboboxes on this form. I wish to be able to address them from another form like so
localformvariablehere = OutputSelectControl(integervariablehere).Index

View 2 Replies

Pass A Variable To Another Form Or Else Make The Variable Visible To Both Forms?

Sep 5, 2010

Using Visual Basic 2008 Express. I need to pass a variable to another form. Or else make the variable visible to both forms.

View 4 Replies

VS 2010 Compiler Creates New Variable Automatically When Use If Statement Without Strictly Declared Variable?

Jan 10, 2011

Say that i have the following code that parse about 20k records from the DB.

Code #1

vb.net While reader.Read()
list.Add(If(Integer.TryParse(reader(0).ToString, 0), Integer.Parse(reader(0).ToString), 0))
End While

And then another code which does the very same thing but it seems to be a little cleaner.

Code #2

vb.net While reader.Read()
Dim storeowner As Integer = 0
Integer.TryParse(reader(0).ToString, storeowner)
list.Add(storeowner)
End While

This is what i am confused about; does the compiler creates a new variable automatically when i use the if statement without strictly declared variable? What approach is better in sense of performance?

View 2 Replies

Forms :: Can Make Variable Actually Seen As A Variable?

Feb 17, 2011

I have a VBA form in Microstation I am using to try and help automate a task. The only problem I am having is I am reading a textbox (Filebox.Text) and setting it as the variable (FN). It works, because I used Msg.Box (FN) to test it. However, in two of the lines of code, I am trying to use (FN) to pass the typed in filename to the command to run in Microstation. Unfortunently, it gets passed on as (FN).dgn instead of the actual filenale typed into the textbox. Is there a way I can make the variable actually seen as a variable? Code on Pastebin: url....Also, not sure if this is the right section, 100% new to VBA, coming from a world Bashed together.

View 3 Replies

FTP Switches FTP.UPLOADFILE

Jan 26, 2010

I am utlizing a piece of code for an FTP upload process that we want to occur when the check mark is checked, The download function (virtually same structure) works extremely well and without any issues. But the uploadfile function merely creates a file on the destination path called what it should be called, but does not upload any information. I think there is some uploadstream that I have to invoke which I am not. This is just the code starting at that process.

ftp.Method = System.Net.WebRequestMethods.Ftp.UploadFile

'If we were using a method that uploads data e.g. UploadFile
'we would open the ftp.GetRequestStream here an send the data

[CODE]...

View 3 Replies

VS 2010 Merging An Integer Variable With A String Variable?

Jun 2, 2011

Say I have something like this

Dim Level1 as Integer = 83
Dim Goal as String
Goal = InputBox(" What level is your goal?")

[code].....

View 7 Replies

Switches To Another Screen With Different Boxes?

Jan 22, 2009

It is my first time to program using VB. I need to use 3 buttons on the top to do different work. When each button is pressed, different screen with a lot of tool boxes pops up, but in the same form. Can anybody tell me how to switch to different screen after button switches? E.g. when program runs, the first screen pops up together with the first button. If I press the second button, do I have to write code manually to turn off these tool boxes and turn on the boxes for the second button? Any easier way using Visual Studio to draw boxes for the second button?

View 3 Replies

Using Switches In A Deployed Application?

Nov 30, 2010

This may be a dumb question, but I am stumped. I wrote a simple desktop application in vb.net (vs2005) and published it via the "deploy" method. After I deployed the app and ran the deployment exe - the application runs fine. However, I have recently added some command line switches so I can run the app via a scheduled job. But I cannot find the "exe" file in order to run the application from the command line. Am I missing something or did I deploy/publish the application wrong?

View 1 Replies

Open Excel With Command-line Switches?

Sep 10, 2009

how to open excel with switches using vb.net, similar to what "Run.." does in Windows.. eg: this is what you would put in the "Run" ComboBox : excel.exe /r "C:ook.xls"

View 1 Replies

Using MP3 Tag Switches To Create Lame Option String?

Jun 28, 2009

I am using or trying to use the mp3 tag switches to create a lame options string. Here is a list of the switches that I am currently using;
--tt "title"
--ta "artist"
--tg "genre"

Here is the code I am using;
Private Sub gbtnCreateString_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles gbtnCreateString.Click
'For Encoding ONLY. Decoding to .wav = NO MP3 tags.
'Exception Prevention
[Code] .....

I then add the lblLameOptions.text to the Lame.Arguments = lblLameOptions.Text. The following example is for mp3 to mp3. The text would display this;
--resample 44.1 --tt TNT.mp3 --ta ACDC
--tg ClassicRock

View 3 Replies

Asp.net - Create A Querystring So When A User Switches Languages, The URL Changes To ?lang=NL?

Jan 30, 2012

I'm trying to create a querystring so when a user switches languages, the URL changes to ?lang=NL, for example. I have this in the code behind on homepage.master (VB, NOT C#):

Me.Request.QueryString("lang") <> Session([Global].SESSION_KEY_CULTURE) Then

Visual Studio underlines it in blue. When I hover over the left side of the statement, it says "Property Value Must Assign to the property or use its value" When I hover over the right side of the erred statement, it says, "End of Statement Expected".I'm not sure if the code I was given is C#, but when I use the Teleflex translator to check, it says "EOF Expected" and won't translate. All of this is tied into 3 classes I created, BasePage.vb, Culture.vb, and Global.vb. But I think it's just this line that's screwing everything up.

[code]...

View 3 Replies

Give The Form A Command When User Switches To Another Application?

Apr 20, 2009

let's say i have this application running, preset size. and there are other applications, like, firefox, vb, etc. in the background where i can click on them to bring them to front and use. now, when that's done, i'd like my application to minimize by it's self instead of just becoming a application that got sent to the back of another one.. the minimize is just to get me started, since i'll probably resize it to a button or so.just a squirrel looking for my nut...

View 4 Replies

Model Train Set - Control The Track Switches Etc Via Computer?

Jul 16, 2009

I'm doing some very basic ground work, I know someone who is building a model train set and believe now you can control the track switches etc via computer, does anyone know anything about these? could something be built in VB to do this?

View 9 Replies

Datagridview - When User Switches Around Columns It Won't Print In Current Order

Oct 27, 2011

When user clicks on a button on my form, it sends the datagridview on that form to another class that [basically] does a bunch of stuff and shows a dialog with a print preview. Everything works perfectly fine, except that if a user switches around columns it won't print them in that current order. For example, if user moves the LastName column before FirstName column, then it should print in that order, but it prints in the column order that the datagridview was originally loaded. The dgv1, is the datagridview that was originally loaded, not the current one. [Code]

View 10 Replies

Have A Code Which Switches Cursor To 2 Lines By Clicking A Button (or With Checkbox)?

Dec 9, 2011

I like to have a code which switches cursor to 2 lines by clicking a button (or with checkbox). Both lines starts from the edge of window and at the intersection is the cursor's position.

View 1 Replies

PathName In Shell Function With Arguments And Command Line Switches

Jul 10, 2009

I'm using VB2008 Shell function to execute file with arguments. But I'm not sure how should look my PathName in Shell function with all necessary arguments and command-line switches. Without arguments: [Code]

View 4 Replies

Make 1 Variable Into 2?

Dec 23, 2010

I have a variable and i need to seperate it into 2 variables so in code form its like this[code]...

View 1 Replies

Make One Variable = Two Others Instead Of Just One?

Jun 10, 2009

I posted this before and got a few answers that haven't worked for me so far. Therefore I'm going to post part of my code so you can see what I'm talking about. The highlighted part is what I pulled from another post and it's not working for me right now. I'm using visual studio 2008 and the program was written in Basic. I pulled most of this program from the net and started tweaking it to my needs, If you're familiar with arabic you will understand the letters, if not, just use A and B for the variables.

[Code]...

View 2 Replies

Inter-Program Variables - If A Variable In Form1 Is "True" Than, How Can Make A Variable In Form2 Turns To "True" Too?

Feb 11, 2012

I know that

Public Incognito As Boolean

is a variable called "Incognito" that is class-wide that is a boolean.My question is that is there a form-wide variable form that can like communicate with different forms. So if a variable in form1 is "True" than, how can you make a variable in form2 turns to "True" too?

View 1 Replies

Make A Variable Textfield?

Feb 9, 2009

I want to make a Variable textfield, so i can use it in a while loop. I know that in FLASH it's like[code]...

View 10 Replies

To Make Variable Global?

Jul 28, 2009

Private Sub NoteTabToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NoteTabToolStripMenuItem.Click
Dim NewTab As New TabPage

[code].....

View 6 Replies

Dim A Variable That Will Be Used Make A Class And Then Ferer To It?

Jun 10, 2010

Having trouble accessing a dim variable inside a btOk or Load event. when I dim a variable that will be used a lot, do I need to make it a class and then referer to it?

View 7 Replies

Make A Textbox Choose What To Name A Variable?

Oct 19, 2010

How do I name a variable depending on what is in the textbox?

Like would it look like:
Dim (textbox.text) as string
etc.

The reason I want to do this is because the user is gonna click a button to create a task. When the button is pushed, a label is created by the code I already have, the problem is, I want them to be able to click the button more then once and new labels will appear below the one that just was there. By being able to name a variable by what is in the textbox, I will be able to do so many things.

View 6 Replies

Make A Variable Accessible To Any Module?

Dec 30, 2009

I have an issue with an app i am writing, i need to make a variable accessible to any module or class within the project but that cant be accessed outside of the app as it is accessing info the end user shouldn't have access to.

Ok, well a practice i have gotten into in the last few years is to declare a module on the same page as the main form and declare variables either friend or public (global variables). with my app public is not good so i tried Protected Friend but i cant use this within a module.

I tried placing it at the top of the main form but one of my classes can't access it, what would be the right way to do as expected. besides the main form i have 2 classes call them class1 and class2:- main interacts with both classes class1 accesses class2 class2 doesn't access class1

View 7 Replies

Make A Variable Accessible To Other Forms?

Oct 21, 2011

How do I make Variable eccessable to other forms in my app?

View 3 Replies

Make Variable Exesable To A Dialog?

Oct 15, 2011

I need this code below to be able to make use of an Var called EditingIndecator, this Var is on Form1.[code]...

View 7 Replies

Take A Dictionary Of Key Value Pairs And Make The Key The Name Of A Variable And The Value The Value

Dec 16, 2009

What I would like to do is be able to take a Dictionary of key value pairs and make the key the name of a variable and the value the value. From searching the net seems to be very vague on whether this is possible.

[Code]....

View 2 Replies







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