Pass File To ComboBox?

Sep 1, 2009

I am new to VB environment. I am using Visual Studio 2005.

[code]...

I am thinking of creating EXCEL File, in which I will put all the names in 1 column and call that excel File, when "dropdown" of combo box is clicked.

View 5 Replies


ADVERTISEMENT

DataGridView And ComboBox - How To Pass Value To SQL

Jan 21, 2010

In a form, I have a Combobox (named cbArt) with the values: 1, 2, 3 and 4
I have a table with the fields: Id, art, name, width
I wanna put a datagridview in my form, so always I change the value in the CbArt the Datagridview shows me the fields with this SQL:
"select * from artigos where art='" & cbart & "'"
But, how can I pass the value of the cbart to my Datagridview's SQL?

View 3 Replies

VS 2010 : Pass Combobox Value In Query Builder Filter Column?

Jun 17, 2011

I'm develloping a small application over na Access 2007 database. how can i pass the value of a combobox to a query being built with the query builder tool?If I use ? in the Filter column I�m prompted to enter the value but what I need is to pass the value of a combobox in a form. I tried to use:

HTML
=MyForm.MycomboBox.Value

but it is ignored, interpreted as the value to be filtered.

View 5 Replies

VS 2008 - Pass A Field To "AutoCompleteStringCollection" In A Combobox?

Feb 4, 2010

I am trying to write a routine to bind a combobox to a datasource (coming from a LINQ query)and at the same time populate the "autocomplete" collection of the combo box:

[Code]...

View 11 Replies

File Info - Pass Delete And Copy File Method On A Button?

Jul 22, 2011

i am very new to VB. I am working on file operation such as show files, copy file, delete file, show current directory, rename folder, make folder. My problem right now is with delete and copy file. I have a method of delete and copy but i dont know how to pass this method on a button.

[Code]...

View 8 Replies

How To Pass The File Name

Jun 8, 2010

Suppose I save a file as *.tar (this extension is my own making) using a vb6 program.Now when the user clicks this file, the window asks 'with what program to open this file' and he/she selects the exe of my program. Now I want to pass the name of file clicked to my program. Like when we click *.xls file, the exe of Excel program knows which file has been opened or clicked. Is there a way?

View 2 Replies

Pass A Value To Bat File?

Mar 24, 2009

My program opens and executes a .bat file like so.[code]...

The Top code is a work around, as .net will not run .bat files due to security resaons (unatended process)

I am facing a problem now, where I need to pass a parameter to the .bat file, but because of the way it is executed in the command prompt

View 5 Replies

How To Create File To Pass Another EXE

Jun 11, 2009

I want to create a file to pass to another exe. Used File.Exits and then File.Create. But File.Create returns a FileStream, so I should close the file??

View 4 Replies

How To Pass Parameter To EXE File

Oct 7, 2010

I am currently still learning to use VB.Net feature. Currently I am trying to execute a .exe file where there will be passing parameters to run the script. E.g. this how it works on the command prompt line:
C:Documents and Settingsproject1>textfile.exe file1.txt file2.txt file3.txt file4.txt
Above line will be able to run the textfile.exe script.

I am using VB .Net to create a User Interface where user will be able to use the 'OPEN CLICK' button to choose the files (which will display on a textbox) and click on a 'START' button to run the program. I managed to find a code - process.start() feature, however it cant seem to work..

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Dim MyProg As String
Dim executable As String
executable = "C:Documents and Settingsproject1 extfile.exe"
MyProg = TextBox1.Text
Process.Start(x, MyProg)

View 4 Replies

Pass A File To A Function?

Mar 6, 2009

I'm working on a VB.NET DLL right now, and one of the functions I'm writing is supposed to take a file, and clip out an array of bytes (the method I've got works, and can be abstracted away here). What's the best way to pass a file to this function? Would passing a filename to it be best, or what would be the best way to accomplish this?

View 2 Replies

VS 2005 Update Table - If All Results Is PASS Then The Table2 Should Be Updated As Pass

Jun 8, 2012

I have two tables:

table1

case_no flow result
tc_1 001 pass
tc_1 002 pass
tc_1 003 pass
tc_2 001 pass
tc_2 002 fail
tc_2 003 pass


table2"

case_no result
tc_1 pass
tc_2 fail

Table2 should be updates from table based on the results... If all results is PASS then the table2 should be updated as pass... if any result is FAIL then the entire case_no should be updates a s fail..

View 7 Replies

Sockets - VB9 .Net 3.5 (2008) Code Works On The First Pass.Then Second Pass It Just Hangs On

Jun 19, 2009

This code was working consistently, but now...This code works on the first pass.Then second pass it just hangs on Code:Dim tcpClient As TcpClient = tcpListener.AcceptTcpClient() for about 2 minutesThen the code will fork for another pass, then fail.....

Code:Imports SystemImports System.TextImports System.Collections.GenericImports System.XmlImports System.Xml.LinqImports System.Net.Sockets

[CODE]....

View 2 Replies

Extract User/pass From .txt File?

Jun 18, 2012

Im really newbie in VB.NET and i hope that someone could explain how may i do this successful,ok im explaining now.I had two richtextboxes and one button First richtextbox contains the following text:<user_register.php: 2012-02-21 00:03:49

POST
username=sexhunger15
email=ho_t@hotmail.com
email_confirm=
password=vergota

[Code]...

View 5 Replies

How To Pass File Name Clicked To Program

Nov 28, 2009

Suppose I save a file as *.tar (this extension is my own making) using a vb6 program. Now when the user clicks this file, the window asks 'with what program to open this file' and he/she selects the exe of my program. Now I want to pass the name of file clicked to my program. Like when we click *.xls file, the exe of Excel program knows which file has been opened or clicked. Is there a way?

View 5 Replies

Pass Variables From .bat File To Vbscript?

Jun 21, 2012

Passing variables from .bat file to vbscript. I have .bat file that launches test.vbs. I need to pass variable defined in the batch file inside the .vbs file.

the batch file contains the code

set /p var= please enter the value: cscript test.vbs "%var%"

Where as test .vbs has the following codes

Dim StrText
MsgBox StrText

In my requirement value assigned to variable 'var' in batch should assign to StrText variable in the test.vbs and then it should display in VB message box.

View 3 Replies

VS 2010 - How To Pass Parameters To EXE File

Sep 29, 2011

How would one go about sending parameters to the application? For example, I want to send my exe some switches or parameters.
my_app.exe -param1 -param2
Something like that. Then I can use the para1 and param2 throughout the exe Possible? But it is not command line, it is gui based.

View 2 Replies

Pass Data To Dialog - Manipulate And Pass Back?

Jan 15, 2010

Just started VB programming this week and have found a wealth of information about what I'm trying to do. Problem is, some of it is more complete than others.Here's what I'm trying to do:In Form1 (my main form), I want to instantiate a class that contains a couple of properties (speed setpoint and position setpoint). When I click a button, I want to pass this data to Form2 and populate two textboxes on Form2 with the properties of this object. I want to manipulate the property values on Form2 and click an OK button which closes the dialog and returns the manipulated data, updating the property values of the object. Here's the algorithm I'm following:1) On Form1, instantiate the class2) On Form1's "Pass Data" button click event handler, instantiate a Form2 object and invoke the ShowDialog method, passing the object as a parameter.

3) On Form2, overload the ShowDialog method to accept the object as a parameter and modify the method so that it returns the manipulated class data.4) On Form2, in the ShowDialog method, populate the textboxes with the class data that was passed in.Here's where I get stuck. If I press the OK button on Form2 (DialogResult.OK), it returns me to Form1, but what hook do I have in Form1 to receive the manipulated class data that the ShowDialog method is returning?Here's an example of what I'm thinking about:

Code:
Public Class Form1
Dim clsController1 As New MotionController

[code].....

I'm sure it's probably a very elementary question, but every explanation I've found seems to be incomplete.

View 2 Replies

Javascript - Pass JSON File From ASP.NET To JQuery?

Feb 27, 2012

my problem is that my company does not want to serve up the .json MIME type, so I have to use ASP.NET to fetch the JSON file from the file server. Currently I have jQuery that does a getJSON and traverses the JSON object to build certain elements of the page. Is there a way I can use ASP.NET (VB) to give the object to my jQuery script after I fetch it?

View 1 Replies

New Streamwriter - How To Pass Full File Path

Mar 5, 2012

I have 2 programs.
Prog1.exe is in folder1
Prog2.exe is in folder1/subfolder

When I execute this in Prog1,
Process.Start("subfolder/Prog2.exe")
Prog2 runs.

But...When I execute this in Prog2,
Dim sw as new streamwriter("1.txt")
sw.write("something")
sw.close

1.txt is created in folder1, and not subfolder.
I can do a easy workaround by passing the full file path when creating the streamwriter, but I just want to know if it's a bug or what.

View 2 Replies

Pass Values From Combo Box To A Batch File?

Jun 19, 2009

How do i pass the combo box value to some batch file.The UI will have following parameters:Month (for which user wants to generate the report) Full name of the month e.g. January, February etc. Year (for which user wants to generate the report) YYYY e.g. 2009 We will use the following approach:User will select the month and year as per requisition. From dotNet call a batch file, and pass the selected parameters to the batch file

View 1 Replies

Pass Values To A Parameter In A Rdcl File?

Nov 15, 2011

I have a RDCL Report called Report1.RDCL.In this report I put an image box named logo the select image Source is set to EXTERNAL and in the use this image I have Parameters!LogoPath.Value.

View 2 Replies

Take A Section Of The Xml File And Pass It As A Variable To Another Function?

Jun 5, 2012

I am using XML literals to parse files that contain data. I was wondering if there is a way to take a section of the xml file and pass it as a variable to another function...

<XML>
<DATA>
<STUFF>
<blahblah>sdfsdf</blahblah>

[code].....

I know with XML literals I can use ...<STUFF> and get the info out of that section, but how can I take an entire section of the xml, like MORESTUFF and set it as a variable to pass to another function that can parse that xml?

View 3 Replies

Text File - Get Each Line And Pass It To A Variable?

Dec 12, 2009

i have a text file that contains words.. how would i get each line and pass it to a variable.here how it goes: string variable where each line will be passed and for each line will be passed to a function

View 9 Replies

Creating Temp File To Hold And Pass Information?

Dec 15, 2009

I'm creating temp file to hold and pass information. What is prefered, XML or text files, and why?

View 3 Replies

How To Convert XML File To String And Pass To Stored Procedure

Mar 15, 2010

Trying to convert XML file to string and pass to stored procedure.
Dim fs As FileStream = File.Open(fileUpload1.PostedFile.FileName, FileMode.Open, FileAccess.Read)
Dim buffer(fs.Length) As Byte
fs.Read(buffer, 0, fs.Length - 1)
txtRawXML.Text = System.Text.ASCIIEncoding.ASCII.GetString(buffer)

When I tried to upload file I got error. The error description is 'A name contained an invalid character.'. Could not find prepared statement with handle 0. Could not find prepared statement with handle 0. sp_xml_removedocument: The value supplied for parameter number 1 is invalid. The statement has been terminated.

View 3 Replies

How To Pass WAV File To Media Player Via Memory Stream

Feb 6, 2012

How do you pass a wav file to a mediaplayer via a memory stream? In other words is it possible to pass a stream instead of a url to play a wav file?

View 9 Replies

Read A Text File And Pass The Data As A Variable?

Mar 18, 2011

I have a text file which contains some data as follows

1, 0,0,0,0,0,0,-288.000,-288.000,-16.200,0,0
2, 0,0,0,0,0,0,-432.000,-288.000,-16.200,0,0
3, 0,0,0,0,0,0,-360.000,-360.000,-16.200,0,0
4, 0,0,0,0,0,0,-288.000,-432.000,-16.200,0,0

There r 7 numbers in each row and need to read each of that and store it as an integer value ...I tried the following code..

Imports System

Imports System.IO

Imports System.Collections[code].....

This works and is showing each number by number ...But is there a way to store each number to another variable...something like a(1)=1, b(1)=0...., a(2)=2, b(2)=0......

View 5 Replies

Sql - Configuration File For .net (Unable To Pass In Correct Values)

Aug 30, 2011

An exert from my config file looks liek this.

<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<appSettings>

[Code].....

EDIT: I am able to pass in the string perfectly when using Visual Studio 2005. But when using VS 2003 and a loiwer .net framework it will not let me, unless I hard code it in.

Could something be enabled/disabled on one of these instances of VS? Or could this just be an error with the older versions of .net? I think I am using 1.1??(will have to check) in 2003.

View 2 Replies

VS 2008 Copy File To Network Share With Username/pass Passed In The Code

Aug 4, 2010

I've been looking at accessing shared folders, read and write, via the network without being prompted by the OS for the username and password.

On this forum, and googling, I can find many things about accessing network shares, but none using code which also passes the username and password required.

What I'm basically looking for is to not have to map a drive on the users computer. Then using code, write or read files from a network share and at the same time pass the username / password required for that network share.

View 11 Replies

IDE :: TXT File In Combobox?

Feb 22, 2011

I have Text File of say 200 lines. In that, some headings with special tagging,are present.

View 1 Replies







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