Shell Command


I need a code which will open a file (or list) using another.

ie.. shell ("c:\textfile.txt using c:\notepad.exe")

I cant believe the junk I get stuck on sometimes!
Posted On: Monday 24th of December 2012 01:11:28 AM Total Views:  226
View Complete with Replies

RELATED TOPICS OF Visual Basic PROGRAMMING LANGUAGE




Re: shell command

when I compress the data using winrar shell command ,it shows command prompt in the status bar . Is there any provision through which I hide it thanks , oh man, I can't believe I never saw that. when I read command prompt I thought of a prompt to the user. I see now, what he ment was the Command window is showing. nice one akhileshbc. As usualy, you are thinking outside the box , Just tested: Shell "notepad.exe", vbHide Works fine. notepad is not visible in the taskbar. but I can see notepad.exe running in task manager. This is working as expected. I'm assuming that your WinRaR command is opening it's own command window, in which case you need to look at a possible switch in the winrar command to hide the WinRaR process. Can you post the code please, showing the shell command so we can help you debug.
VIEWS ON THIS POST

163

Posted on:

Thursday 18th October 2012
View Replies!

Re: shell command

hello! Error 5: Invalid call proccedure or argument i tried the ff: also the shell32 in API tnx Code: Private Sub btn_Click() Dim RetVal RetVal = Shell(App.Path & "\rdp\myremote.rdp", vbMaximizedFocus) End Sub Private Sub btn_Click() Shell(App.Path & "\rdp\myremote.rdp", vbMaximizedFocus) End Sub
VIEWS ON THIS POST

151

Posted on:

Thursday 18th October 2012
View Replies!

Quickie: Delay between multiple shells

Hi In my code, i got 2 shell commands. One kills a program, then loads it. for example Shell ("C:\killapp.bat") Shell ("C:\loadapp.bat") sometimes, the killapp lags behind a bit so it loads it then kills it. Is there anything i can put between them like a delay of 2 seconds before it loadapps
VIEWS ON THIS POST

243

Posted on:

Wednesday 24th October 2012
View Replies!

Web UserControl problem

Can anyone tell me why i'm getting the message "Object reference not set to an instance of an object." on the following line of code below. GridView1.DoWork1(CInt(Me.TextBox1.Text)) I can post the rest of my code on this page if it would help.
VIEWS ON THIS POST

100

Posted on:

Friday 2nd November 2012
View Replies!

AddHandler event seems to cause the themes' css file to not be applied...

I am currently writing a website for a company to display their products to their customers. One of the things I am putting into it is the ability to add news items onto the homepage, only part of the admin side of the site. I have managed to extract some news items fromthe database, and display them dynamically in a Web User Control which I have added to Default.aspx. I have managed to add buttons for "Update" with events. The problem is that, on clicking one of these update buttons, the page reloads with the theme applied (as it should), but the css files from the theme do notapply - the body text is bigger than it should beand changes back to the default font. I know the skin files apply as I have tried setting all button backgrounds to black by default. The css files seem to apply to any text which is generated from clicking an update button (I have it so it writes the title of the news item for the button that was clicked. This text is the size and fontit should be). I have spent HOURS trying to work out why this is happening, with loads ofGoogling butno success. It is almost as if thetheme isbeing applied between the PageLoad event and the ButtonClick event, but the skin files would say otherwise. Does anyone know why this is If it helps, I am setting the theme in the @Pages directive in the web.config file. I am also setting the master page here which seems to be loading fine. Here is the code for the relevant parts. 1\t 'RecentNews.ascx.vb 2\t 3\t 'Inside the Init event 4\t btnUpdate = New Button() 5\t btnUpdate.ID = "update" & ni.ID 6\t btnUpdate.Text = "Update" 7\t AddHandler btnUpdate.Click, AddressOf btnUpdate_Click 8\t 9\t 'Inside the btnUpdate_Click event 10\t Try 11\t Dim btnSrc As Button = CType(sender, Button) 12\t For i As Integer = 0 To Limit - 1 13\t Dim ni As NewsItem = nis(i) 14\t If btnSrc.ID = "update" & ni.ID Then 15\t Response.Write("News Item: " & ni.Title) 16\t End If 17\t Next 18\t Catch ex As Exception 19\t End TryAnyhelpwouldbeappreciated.
VIEWS ON THIS POST

106

Posted on:

Friday 2nd November 2012
View Replies!

Validate Textbox

Hi , I got this code that validate text box that ASCII value in the hey press event of the textbox and validate the character. But I didnt understand one line of code. Select Case Asc(e.KeyChar) Case 97 To 122, 65 To 90 Case Else e.Handled = True End Select What does this line mean
VIEWS ON THIS POST

162

Posted on:

Friday 2nd November 2012
View Replies!

Visual Basic 2005 Publishing

The application is complete and now I wish to publish it. When first doing so it popped out a couple files including a setup file.. on install it it just does its thing and the program is installed... 3 things Ive noticed are missing from this equation... On setup I would LIke it to include: And option to choose where you would like the program installed and An Info screen preceeding the Start install such as you would find a liscence/eula And finally once it has installed the program is issued a standard blank icon instead of the one I designed and incorporated in Form1
VIEWS ON THIS POST

59

Posted on:

Saturday 10th November 2012
View Replies!

Graphics Problem

Hi all. I have a form, ScaleMode = vbPixels, Movable and sizable, WindowState = Normal In the resize event I have: Private Sub Form_Resize() Me.Cls Me.Line (10, 10)-(Me.ScaleWidth - 10, Me.ScaleHeight - 10) End Sub If the form's Autoredraw = ...
VIEWS ON THIS POST

61

Posted on:

Tuesday 20th November 2012
View Replies!

IT CAREERS

IT CAREERS http://www.pcidata.net/career.asp http://www.globalfreecalling.com/reg.asprefcode=GGB...
VIEWS ON THIS POST

43

Posted on:

Wednesday 21st November 2012
View Replies!

baseball ticket

i cant seem to get it to identify Season or Single game. Public Class frmBaseball Dim _decLowerDeck As Decimal = 25000D Dim _DecBoxSeats As Decimal = 15000D Dim _decBoxSeats2 As Decimal = 55D Dim _decUpperDeck As Decimal = 25D Dim _decLowerDeck2 As Decimal = 35D Dim _decStandingRoomOnly As Decimal = 15D Dim _strLowerDeck As String = "Lower Deck $25000" Dim _strBoxSeats As String = "Box Seats $15000" Dim _strBoxSeats2 As String = "Box seats $55" Dim _strLowerDeck2 As String = "lowerDeck $35" Dim _strUpperDeck As String = "UpperDeck $25" Dim _strStandingRoomOnly As String = "Standing Room Only $15" Private Sub frmBaseball_load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Threading.Thread.Sleep(5000) End Sub Private Sub cboType_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cboType.SelectedIndexChanged Me.lblticket.Visible = True Me.txtNumber.Visible = True Me.lblType.Visible = True Me.cboSeat.Visible = True Me.btnEnter.Visible = True Me.btnClear.Visible = True If Me.cboType.SelectedIndex = 0 Then Season() End If If Me.cboType.SelectedIndex = 1 Then SingleGame() End If Me.txtNumber.Focus() End Sub Private Sub SeasonTicket() Me.cboType.Items.Add("Box Seats" & _decBoxSeats.toString("CO")) Me.cboType.Items.Add("Lower Deck Seats" & _decLowerDeck.tostring("CO")) End Sub Private Sub SingleGame() Me.cboSeat.Items.Add("Box Seats" & _decBoxSeats2.tostring("CO")) Me.cboSeat.Items.Add("Lower Deck Seats" & _decLowerDeck2.tostring("CO")) Me.cboSeat.Items.Add("Upper Deck Seats" & _decUpperDeck.tostring("CO")) Me.cboSeat.Items.Add("Standing Room Only" & _decStandingRoomOnly.tostring("CO")) End Sub Private Function ValidateInput() As Boolean Dim intNumberOfTickets As Decimal Dim blnValid As Boolean = False Try intNumberOfTickets = Convert.ToInt32(Me.txtNumber.Text) End Try End Function End Class( it is not completely finished but it is not doing what i want it to. Admin Edit: Please use code tags when posting your code. Code tags are used like so => :code:
VIEWS ON THIS POST

71

Posted on:

Wednesday 28th November 2012
View Replies!

help for importing from FoxPro DB

Hi all, I am making a little VB app to show the contents of a FoxPro .dbf file, and when showing the returned result in a textarea, all characters with accents are messed up, example: "" becomes "+". "" becomes "", and so on. I am using this code to open a connecion: Set DBConn = CreateObject("ADODB.Connection") DBConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;" & _ "Data Source=" & "C:\a" & ";" & _ "Extended Properties=""DBASE IV;"";" 'Open recordset from table Dim xtitre Set xtitre = DBConn.Execute("Select TITRE from [Films#DBF] Order By TITRE") 'Output the recordset titre.Text = xtitre.GetString(, -1, ", ", vbCrLf + "--" + vbCrLf) accented characters are now fucked up. Any tip now to prevent this
VIEWS ON THIS POST

208

Posted on:

Wednesday 28th November 2012
View Replies!

Store Value in Label for next use

Good Day ! I just want to ask to anyone of you.. Is there a way or a code that can store the value on a label without dbase ex. i am trying to make a auto number and every time the user open the application this will generate a number. i am using this code dim a as string a=0 if a = o then a=0 a = a + 1 label1.caption = a else a=a+1 label1.caption = a end if thanks in advance! This post has been edited by rpcswizz: 28 April 2009 - 06:53 PM
VIEWS ON THIS POST

122

Posted on:

Friday 30th November 2012
View Replies!

Birthalert! Birthday Reminder

, Here's my Latest School Project...BirthAlert Birthday Reminder...Check it out *here*. It's a bit lame...but that's all I could do in the limited time I had. BTW the code works only on Windows XP. I thought I should share this App with you all...Let me know yur views on it...
VIEWS ON THIS POST

66

Posted on:

Friday 30th November 2012
View Replies!