Command line programs like ffmpeg.exe accept a parameter like so: c:> ffmpeg.exe -i img%03d.png img.gif This will grab all these images in the directory and use them inside the program:
[Code]....
Is there a clever way to implement this in my VB.net command line project, or do I have to parse the argument for the %0?
I have a VB.NET application that takes command-line arguments. It works fine when debugging provided I turn off Visual Studio's ClickOnce security setting.The problem occurs when I try to install the application on a computer via ClickOnce and try to run it with arguments. I get a crash when that happens (oh noes!).
There is a workaround for this issue: move the files from the latest version's publish folder to a computer's C: drive and remove the ".deploy" from the .exe. Run the application from the C: drive and it will handle arguments just fine.
I'm currently making a text editor, and I wanted to make my application accept arguments from the command prompt, you know <Directory>myapp.exe <textfile>. How can I do this?
I have a GUI VB application, and a seperate command line module. How can i run the command line module through the gui app, without binding / installing?
I have beginner skills using VB (am using the Express edition to learn). I would like to know how to set up a conditional statement in a Windows Form (WF) app that would check if a specific command line has been passed by another separate app that launchesthe Windows Form app using command lines, and if not passed, then the Windows Form app would shut down (exit, close).So far, I can use:
For Each s As String In My.Application.CommandLineArgs If s <> "xyz" Then Me.Close()
I'm writing a command-line application in .Net. The app itself is fairly simple, but it has to connect synchronously to a web-service, which in turn has to connect to a Oracle database, and those pieces are fond of taking their time.
Is there a straightforward way (without dividing my app exe in two) to continue executing but nonetheless yield execution to the command prompt?
It's Windows, so no "&". Also, I cannot use cmd.exe's "start" cmdlet.
First let me say that I am not sure whether or not this should go in this section or the API section, and if it needs to be moved I apologize. My issue is fairly straight forward, but for some reason I cannot get it to work.
I am trying to send a command to a command line and then submit the command. I have been trying without success to get this to work in v2008 Express and v2010 Express, Here is the code I am trying to us:
Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" ( _ ByVal lpClassName As String, _ ByVal lpWindowName As String _
Dim IncomingCommand As String = e.CommandLine.Item(0).ToString
If IncomingCommand.Substring(0, 2) = "-1" Then
form1.close()
End If
End If
I am trying to make the program close if the -1 string is sent with the program. See my installer allows for me to run certain programs before it actually installs, but it doesn't shut down copies of the program itself. So I have a next startup instance set to shut the program down if the -1 is received. But if the program is not running it starts up instead. This is not desired. form1.close doesn't work. e.cancel = true doesn't work, etc etc. What can I do to make the program not start during this instance.
I only want one char per line to be accepted in my multilined richtextbox. This means that when one char is typed, then the richtextbox should automatically change line.
So typing 'hi!' should show as: h i !
I tried this but i seem to get out of bounds.
Private Sub txtrtb_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtrtb.KeyPress txtLength(txtrtb)
I am using a CheckedListBox that is populated with Filenames (full path, i.e. C:TestTest.jpg)When I have the files that I want in the CheckedListBox I wish to click a Start Button which will process the list one at a time using an exe program that runs on the Command Line. There are arguments that need to pass to the command line as well as the file location in order for the program to process.I currently have it working but the issue is the loop finishes quickly and it is left up to the CMD.exe to finish the process. What I would like is for the LOOP to wait until each file completes processing before passing the command for the next file in the CheckedListBox.There some reasons I wish for it to work this way.
1) I would like to have a button that can Pause/Restart the Loop.
2) I would like to have a button that can Stop the Loop so the whole process can end.
3) I would like to have the Loop remove each file one by one from the CheckedListBox after it has been processed.
4) I would like to display a Message once all the files have been processed.
5) And if it were possible I would like to report the status either by text or a progress bar showing where it is at in the process.
6) And the ability to add some error handling if possible.
Since the Loop finishes so quickly as it just passes the command to the command line using the & as a seperator it is the command line that is handling the rest of the process. Because of this there is not control over it in the GUI.The code I am using allows the Command Line text to display in the Form so it won't open up a seperate window to run CMD.exe. This is the desired affect as I would like everything to appear to run from within the Form itself.
I have a program to read line by line from text file. [code]There is run time error while TextLine data has ' or "May I know how to read the data with ' or " character?
I am struggling to pass a parameter to a VB.NET application via a Windows scheduled task. It works perfectly in Visual Studio (passing a command line arguement via project properties).If I am calling a VB6 application, then I will supply the following parameters and it works:
Run: c:progra~1TestTest.exe TestParameter Start In: c:progra~1Test However, if I supply the same parameters in VB.NET, the program throws an exception when it tries to create an instance of a class in the Form.Load: System.NullReferenceException cannot create instance of object.
I have also tried the following:Run: c:program filesTestTest.exe TestParameter Start In: "c:program filesTest" This time the status of the scheduled task changes to "cannot start".What is the correct way to specify command line parameters in a scheduled task for a VB.NET program?UPDATE I found the solution on this web page:[URL}.. I am still confused as to why the program would not create an instance of an object when I used the 8 bit paths (i.e. progra~1)
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.
How should i make a textbox to accept only string? And if there is error to appear the Error Provider. I have fixed it for the integer, but it doesnt work in string.
I am trying to make a textbox accept on the numbers 1-4 & the backspace key. The numbers part is working fine, but it will not delete the number once it's inputted into the box using backspace. Here's my existing code:
Private Sub txtCode_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles txtCode.KeyPress 'allows the textbox to only accept 1-4 & backspace If (e.KeyChar < "1" OrElse e.KeyChar > "4" _ AndAlso e.KeyChar = vbBack) Then e.Handled = True End
hows to make a textbox accept only numbers? and ".". i tried looking in the Help, couldnt find something relating to it. i guess it's something to do with the keys pressed on the keyboard so if i could determine and reject certain keys (anything thats not a number) it could work.
I've got a little function that just changes empty and null strings to "null":
Public Function CatchString(ByVal stringValue As String) As String If stringValue = "" Or stringValue Is Nothing Or stringValue Is DBNull.Value Then Return "null"[code].....
I added the bit about DBNull because sometimes it gets null values from a database. This doesn't work, though, because it won't take DBNull as a parameter.I tried changing the stringValue parameter from a string to an object, but then the If statement gives this error:
Quote: Object reference not set to an instance of an object.How do I make the function accept DBNull as a parameter?
On Form Level, I use following codes to make textboxes to accept only numbers,How to add these codes in main module, instead of of writing these codes on every form.
If TypeName(Me.ActiveControl) = "TextBox" Then With Me.ActiveControl If Not IsNumeric(.Text) And .Text <> vbNullString Then
How do I make a textbox control to accept dates only and convert to a valid date format? I don't want to use the calander control. e.g. if I enter 2/17 or 2-17 or 02/17 or 2/17/2012; it will convert to 2/17/2012
How would I make my web browser accept only file paths? It's a little import manager for a program that I am making, allowing the user to import files, but I dont want but reports that say that they can access google or something through it.
I am in ethiopia and we have 13 monthes. 12 of them with 30 days each and 13th month with 5 or 6 days. I want to sort my data by date using the bindingsource sort method. But to do that I need to set my date field a date data type. When i set the datatype to date, i can't enter some values like 13 for the month value and 30 for day value of 2nd month.
What I want is just to make my application accept 13 as a month and 30 as a day for all monthes, so that i can sort my data by date. Is it possible to do so by setting culture for my application or by some other means?
I have a field called PODate & TextBox txtPODate.text. It saves/updates fine when the txtPODate is filled. But when the txtPODate is blank, it throws an error. The problem is that I can't enter date for each record unless I got Purchase requisition converted into Purchase Order. Once it is converted to PO, I need to enter the date to update that filed. So, how can I make my program to accept blank date field.
I am having a problem on setting the SQL CE table column a field type. What field type does a column that only accepts only two inputs.. Example: If a table has a column named Gender..it should only accepts two types of input...like Make or Female.