|
This is just a guess, but it looks like you are pointing to:
c:\\test.bat instead of c:\test.bat
I would remove one of the \
Hope that helps.
Ben
|
|
|
|
|
Just to clarify, is it running c:\test.bat, but performing tasks on the debug folder?
or is test.bat not running at all?
|
|
|
|
|
I think you will be interested in ProcessStartInfo.WorkingDirectory
groeten
|
|
|
|
|
First, the command line that you're actually running is C:\\test.bat . The two backslashes next to each other work, but could cause you problems later if used indiscriminatly.
Second, the working directory is the directory from where your code is launched. Like Luc said, you have to set the WorkingDirectory[^] property of the ProcessStartInfo object.
Dim psi As New ProcessStartInfo(Path.Combine(TextBox1.Text, "test.bat"))
psi.WorkingDirectory = TextBox1.Text
Process.Start(psi)
|
|
|
|
|
kubben, i removed one of the \ but that didn't fix it. Its still running from the debug folder.
quote: Just to clarify, is it running c:\test.bat, but performing tasks on the debug folder?
Thats right. Its running from the debug folder, i want it to run from C:\
Luc and Dave, that did it!
Thanks to all of you for your quick answers.
http://www.themightyatom.nl
|
|
|
|
|
I have one menu control in my Main Page and menu has 5 menu items, I have one ASPX page which as one button. Initially 2 menu items in the menu will be disabled. On click of button in the aspx page those disabled menu items should be enabled. But it is not working. Bellow is the code for enabling the menu items.
Protected Sub Sumbit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Sumbit.Click
Dim mnControl As Menu
mnControl = CType(Master.FindControl("Menu1"), Menu)
mnControl.Items(0).ChildItems(4).Enabled = True
mnControl.Items(0).ChildItems(5).Enabled = True
mnControl.Items(0).ChildItems(3).Enabled = True
end sub.
Kalyan
|
|
|
|
|
are you getting an error message?
at first sight I would think you're childitems index just be 2,3,4 but normally you should get an index out of range exception
|
|
|
|
|
Some rethorical questions:
how many ChildItems are there ?
are there just buttons ?
how can you tell what the indices are for the buttons you want ?
|
|
|
|
|
I have some project which was built on VB4.0. But i dont have VB4.0, and i want to migrate to the latest vb5.0 or vb6.0 version.
How can i do it?
Thanks in advance.
Regards,
Kamalasubramanian
Kamal
|
|
|
|
|
The last version of the old VB was VB6, and it's no longer sold or supported by Microsoft. The only place you MIGHT find a copy is on EBay.
I HIGHLY suggest you don't bother with it and get VB.NET instead. You can download the free VB.NET Express Edition from here[^].
There is no way to have an automatic conversion of the code. You'll have to rewrite the project from scratch.
|
|
|
|
|
Thanks for your reply. i have the source in binary format. all other sources which are in ASCII format were migrated to VB6.0. But how to convert the sources (*.frm) which are in binary format to the ASCII format?
Thanks & Regards,
Kamalasubramanian K
|
|
|
|
|
*.frm files are not in a binary format. Well, not in VB6 anyway. If these source files are part of a VB4 project, you simply have no conversion tools available to you. You must rewrite the project from scratch in VB.NET.
|
|
|
|
|
i want to store my client's setting for my application, tell me how & where to store that setting, n how it can easily b retrieved!!!.....
how abt XML? bt i dont know how to use it
(Jameel)
|
|
|
|
|
depends on how many settings you want to store and wich settings
for few settings check out:
the settings on a project (you can set the scope to user)
(is located under the properties of you're project)
if you want to store alot of settings I suggest you use a db
|
|
|
|
|
Thanx Frined . I chose the project->settings.... workd
(Jameel)
|
|
|
|
|
you can also look at serialisation but this is not easy and maybe alot of work depending on what you want to store
It requires you write you're own controls then saves the properties (that you tell it to save) to an xml file
|
|
|
|
|
i have made a software for my own purpose in VB.net.I used SQL Server 2000 in the backend as my database.But i have to configure the Windowapplication1.exe.config file to set the Server,database,username,password whenever i use a different computer.
Can i do it dynamically from my application.
I want know more about .net
|
|
|
|
|
if you want to do it dynamicly you will have to do this before you ever connect to the database
from code you can access the settings as so:
my.settings.'setting name' = ??...??
if you want you're user to input the settings I suggest you make a form that loads first on wich the user gives in the settings , save the settings and go on with you're prog.
to prevent the user having to enter them every time he starts the prog use a boolean you set to true after the settings have ben enterd. then you just check the boolean:
if boolean = false then
frmsettings.show
else
frmmain.show
end if
(something like this)
I suggest that when you alter the settings you enter
my.settings.save
(just to be shure the prog saves the settings)
|
|
|
|
|
Can you please help me to attach my word document to my VB.Net system that I'm currently creating. I need the code so that I can view a word document wen I click a certain button.
Thanks
Mba-lee Keswa Doing 3rd year in D.U.T. Using VB.Net language.
|
|
|
|
|
check out microsoft.office.interop.word
needs the microsoft.office reference (com tab)
|
|
|
|
|
hi Mba-Lee,
To view the word document on click of certain button u need following code
firstly, import the library if u have word 2003 then import microsoft word object library 11.0
or if u have word 2000 then import
microsoft word object library 9.0
then type the following code (code is suppose to be having word2003)
<br />
imports word = microsoft.office.interop.word<br />
<br />
dim objApp as new word.application<br />
dim objDoc as new word.document<br />
<br />
objDoc = objApp.Documents.open("//Path of your word file")<br />
objDoc.visible = true <br />
regards,
koolprasad2003
If the message is useful for U then please Rate This message...
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
Hey,thanks for replying you guys , this is the code that I'm using
Dim appWord As New Word.Application
Dim docWord As New Word.Document
docWord = appWord.Document.Open("C:\mydocument.doc")
And to print it:
Dim myProcess As New System.Diagnostics.Process
With myProcess
.StartInfo.FileName = "C:\path\mydocument.doc"
.StartInfo.Verb = "Print"
.Start()
End With
And this is wat I imported
Imports Microsoft.Office.Tools
Imports word = microsoft.office.interop.word
but interop.word gets underlined I think maybe it's the reference I chose which is:Microsoft.Office.tools.common & microsoft.Office.tools.Word
Or maybe there's some software that I need to download? so that I can use .interop?
Mba-lee Keswa Doing 3rd year in D.U.T. Using VB.Net language.
|
|
|
|
|
hey Lee,
as i say earlier use the reference of "Microsoft Word Object Library 9.0" or "Microsoft Word Object Library 11.0" depending upon word 2000 or word 2003 respectively
regards,
koolprasad2003
If the message is useful for U then please Rate This message...
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
Help me .. Convert code Graphics VB.net windows form to web forms:
Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
Dim dc As Graphics = e.Graphics()
If (e.ClipRectangle.Top < 132 And e.ClipRectangle.Left < 82) Then
Dim bluePen As Pen = New Pen(Color.Blue, 3)
dc.DrawRectangle(bluePen, 0, 0, 50, 50)
Dim redPen As Pen = New Pen(Color.Red, 2)
dc.DrawEllipse(redPen, 0, 50, 80, 60)
End If
End Sub
I want to mark on a picture, first i need learning Graphic on VB.net web form
Please help me.
(Sorry, my English language knowledge .. moderately.. )
-- modified at 5:28 Thursday 26th July, 2007
No job no love no money nothing i have....
|
|
|
|
|
Now And Forever wrote: Private Sub Form1_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles Me.Paint
I have no idea what you're expecting. There is no such thing as a Paint event in a Web Form. It's impossible to convert this code, AS IS, to web forms equivilent because there is no equivilent event.
What is it you want to do in a web form??
|
|
|
|