|
It appears that you have created a windows form project as indicated by the Class called Form1. Try creating a Console app instead. This worked for me.
Module Module1
Sub Main()
System.Console.WriteLine("About VB Example")
System.Console.WriteLine()
' Prompt user for identifier
Dim ReplyString As String
System.Console.Write("Type A or B: ")
ReplyString = System.Console.ReadLine()
System.Console.Write("You typed: " & ReplyString)
End Sub
End Module
|
|
|
|
|
You are absolutely right!
Thank a lots
|
|
|
|
|
hi all,
i have a datagridview in my program which contain Combobox type column. My problem is that combo box column require two click to open drop down list.
anybody have idea that how can i open dropdown list on single click ?( as we do in normal combo box control)
thanks in advance
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
i am populating the datagridview from db. i am making changes to datagridview and also i am adding new row.
|
|
|
|
|
Please provide more information.
|
|
|
|
|
i am going to populate the datagridview. i want to make changes to datagridview and i want that changes to be available in database . i will insert new row in the datagridview , i want to add newly added row to database. i am using sqlcommand option . but i want to use sqlcommandbuilder but i am uanble to update using sqlcommandbuilder.
Siva.
|
|
|
|
|
I would say use the RowAdded Event to trigger a function that finds which row was just added, parse that information, build an appropriate update command, then use that to update your database
|
|
|
|
|
hi all
i want to Call an Exe, that is a Console Application, in that Exe i want throw in Commands from e.g like "Dir", but i want to do this in vb.NET.
Thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
You can use the Process class to achieve this.
"Find it your bloody self - immediately!" - Dave Kreskowiak
|
|
|
|
|
i have Googled it , and i will read about it thanks
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Vuyiswamb wrote: i have Googled it , and i will read about it thanks
All you need is:
<br />
Process.Start("ConsoleAppName.exe")<br />
Pete Soheil
DigiOz Multimedia
http://www.digioz.com
|
|
|
|
|
Wow Thanks man
its So Easy.
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
One more thing , how to i tell the Compiler the location of the File?, should i use the Path ? like
Process.Start("C:\ConsoleAppName.exe")
?
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
|
Thank you
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sudden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
hi all,
i m creating directory structure (mean which contain subdirectory & other files). Everything is working well except one thing. In 40% case i get error -Access to the Path "Some Path & "\*.txt" is denied.
Here one thing, that i want to explain is that on every run, i select same folder
any body have idea where i am wrong ?
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
Are your permissions set right?
"Find it your bloody self - immediately!" - Dave Kreskowiak
|
|
|
|
|
hi ponard,
i already specify that some time code works well but sometime not. Each time i select same path.
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
Can you please show the exact statement(s) that fail? and the exact error message?
are the difficult files freshly created by your app?
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
hi luc .following is the code that i use
Private Sub CreateTextFile(ByVal Filepath As String, ByVal data As String)<br />
Dim oFile As System.IO.File<br />
Dim oWrite As System.IO.StreamWriter<br />
Dim oRead As System.IO.StreamReader<br />
Dim PreviousData As String = ""<br />
Dim CheckHypen As String<br />
<br />
If File.Exists(Filepath) Then<br />
oRead = oFile.OpenText(Filepath)<br />
While oRead.Peek <> -1<br />
If PreviousData = "" Then<br />
PreviousData = oRead.ReadLine()<br />
Else<br />
CheckHypen = oRead.ReadLine<br />
If CheckHypen <> "-" Then ' if file already exist then remove hypen from file. Hypen is last character of File<br />
PreviousData = PreviousData & ControlChars.NewLine & CheckHypen<br />
End If<br />
End If<br />
End While<br />
oRead.Close()<br />
End If<br />
oWrite = oFile.CreateText(Filepath)<br />
<br />
If PreviousData = "" Then<br />
PreviousData = data<br />
oWrite.WriteLine(PreviousData)<br />
Else<br />
PreviousData = PreviousData & ControlChars.NewLine & data<br />
oWrite.WriteLine(PreviousData)<br />
End If<br />
oWrite.Close()<br />
oFile.Delete(Filepath)<br />
PreviousData = PreviousData & ControlChars.NewLine & "-"<br />
oFile.AppendAllText(Filepath, PreviousData, System.Text.Encoding.Unicode)<br />
End Sub<br />
have any idea where i am wrong ?
Rupesh Kumar Swami
Software Engineer,
Integrated Solution,
Bikaner (India)
My Company
|
|
|
|
|
So I guess your app just created this/these file(s) and now wants to delete them?
This is my standard answer for renaming/deleting new files:
if you want write or delete access (anything other than read access) to a file
that just got created (by yourself or someone else, does not matter),
chances are you will find the file is being accessed by some other process,
and your access is not granted.
The other process very likely is some server code that is there to assist you
somehow. Candidates are:
- anti-virus software (Norton, McAfee, whatever)
- indexing software (Google Desktop, MS Office, whatever)
The common thing is these packages are looking all the time for new files, so
they can inspect them.
Microsoft is aware of the consequences; Windows Explorer will try rename and
delete attempts up to five times (with one-second interval), and only reports
failure if the action continues to fail for that time.
The solution:
1. either use a different file name
2. or remove all background reader candidates (bad idea)
3. or implement the retry loop as Explorer has it (use a Windows.Forms.Timer
for this)
Hope this helps.
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
hi
i am having a webpage (developed in asp using vbscript) in it i have one hyperlink button when i click on that button file starts downloading from my system with that file name.its working fine, but now i want to download the file from another system which is connected to my system(say MS01 is another system name ) through LAN. can anybody send me the source code for this task.
|
|
|
|
|
sunilwise wrote: i am having a webpage (developed in asp using vbscript) in it i have one hyperlink button when i click on that button file starts downloading from my system with that file name.its working fine, but now i want to download the file from another system which is connected to my system(say MS01 is another system name ) through LAN. can anybody send me the source code for this task.
You could create a virtual directory inside your project, and set the directory for it to the network location on the other machine. You would just have to make sure that your domain user has read access to the folder on the other machine.
Pete Soheil
DigiOz Multimedia
http://www.digioz.com
|
|
|
|
|
It is posible to load local file from client to variable in active scripts like js or vbs.
But it is requires special permitions for web site. (full-trus in IE).
|
|
|
|
|
How can i blank out a column in a datagridview which is a datetime picker type column.
Sekhar
|
|
|
|