How To Create File To Pass Another EXE
Jun 11, 2009I 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 RepliesI 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 RepliesI want to create a pass or fail integer into my multiple choice radiobutton quiz.
View 6 RepliesI have a function Process(data, f) where data is a normal parameter and f is a function needed to process the data (passed as a delegate to Process)
The signature of f is int f(a,b,c), with a, b, c supplied by Process when it calls the delegate.
Up until here, standard delegate usage.
Now, I have a special but common case where I would like to call Process with a constant f function. So I would like to write SimpleProcess(data, k) so that the caller does not need to create a delegate in this case, just pass the constant k (the only information needed).
So I need to dynamically create a constant function, g(a,b,c) which takes 3 parameters (which are ignored) and always returns k. This has to be done within the SimpleProcess function, so that I can then simply call Process(data, g) from within that function, without the need to rewrite the whole Process function for this special case.
I am currently learning VB.net but for a project I need to create and array and pass it using a property. The data to be passed will be a train's destination, the time its due and the expected time of the train. I was wondering if someone could simplly explain how to first produce an array and then show how to pass it to a custom control
View 1 RepliesI have an application that reads another processes memory.I initially had multiple scanning threads for the various areas I needed to read.This was processor intensive so I decided to go with the observer pattern.All was well except that I am having a weird behavior.Here is what is happening.I have 2 radars (overlay and mapped)Both have a watcher class that attaches to the memory scanner and is notified on a new list of mobs.so I open radar 1 (mapped) it attaches it's watcher to the scanner and waits for mob list update notifications
Open radar 2 (overlay). same thing happens and another watcher is attached.all is well and good so far.Now there are properies on the mobs in the list, one of which is IsFilteredOut.This property is set in the radar code after it receives the list. Now the weird behavior is that no matter what I do, the second radar to be opened changes all the properties of the mobs in the list of both radars.It is as if I am passing the list by ref, but I am not.I actually create a new instance of the moblist class every time I pass the list.Here is the notify code. As you can see I create a new instance of the moblist class each pass.
Private Sub NotifyMobListUpdated(ByVal Mobs As List(Of MobData))
If Mobs IsNot Nothing Then
For Each w As Watcher In _watchers[code].....
I`m looking for a way to parse a parameter name like linq does.I want to filter before i download the date from the database.With LINQ the data is already red into a dataset. I only want to select data from the database witch i need. how i can send a property name to a function without using the property name as string and without to use to mutch code inside the function and without creating an instance of the object, etc.
Module
Module1
Dim user
As user =
[code]....
I'm new to MVC2 and my question should be pretty basic. At least I thought so until I could'nt find any answer on the web, so here I am.
I have a parent object Pool that can have 0 to many children Question.
In my Details view of Pool, in addition to the Pool's property, I render his childs using RenderAction on the Question action List, so far, so good.
Inside my List view of Question (which is always rendered inside the Details view), I want a button to start the Create action of the Question object. My problem is, I don't know how to pass the Pool object, which is the model of my Details view, to the Create action so that I can link my Question to the right Pool.
Is there a way to access the "Master" Model inside the "included" view via RenderAction and if not, what's the best way to implement a work around.
In other languages (PHP/Python), I am used to creating a class which represents a given HTML page layout. These classes can have an unlimited number of attributes and dynamic features, such as Navigation (multi level), error messages, info messages, footer text, etc... Most of these items have defaults, but may be overridden on a per-page level. For example:
[Code]....
My question is: how do I implement similar functionality into ASP.Net MVC 3 Razor (VB)? So far, I have been able to see how you can use ViewData to pass various bits of data to a view. Also, I have been working with strongly typed views. Frankly, I'm not sure who's job it is to have this logic, the controller or the view (or is there a model that should be in there somewhere). Here is a summary of what I am shooting for:
A single place to initialize the default values for the layout (like the first layer of navigation, etc...) Strongly typed attributes, such as Public Readonly Property Nav1 as List(of NavElement) And a single place to render these layout elements (I assume _Layout.vbhtml) forgive the here-and-there of this post... I'm trying to figure out the "right way" it's done on a platform that is both new (Razor) and new to me (ASP.Net MVC).
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]...
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 RepliesMy 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
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)
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 RepliesI 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.
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..
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]....
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]...
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 RepliesPassing 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.
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.
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.
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 RepliesI 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.
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 RepliesI 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 RepliesI 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?
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 RepliesI'm creating temp file to hold and pass information. What is prefered, XML or text files, and why?
View 3 RepliesTrying 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.
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