|
Support123 wrote: Should i add this at the end:
objOutFile.Close
Yeah, that would probably be a good idea.
Support123 wrote: it is working without it but i get error...
And that error would be ....??
Support123 wrote: so it works the first time round but fails second time round...
This is probably because you didn't close the file and are trying to open it again.
Support123 wrote: this bit of code is in a javascript file
No, it's not. This is code snippet you posted is VBScript.
|
|
|
|
|
Support123 wrote:
this bit of code is in a javascript file
No, it's not. This is code snippet you posted is VBScript.
sorry about that... i was thinking one thing and writing another. I had a java question too (i am working on a ssis project and asp.net project so i messed up the question).
i appologize and thank you for the info. I will add the objOutFile.Close() section to the VBSript. (i dont know what the error is exactly... it is not displaying anything of use... it is saying that i have issues in one of my script files (vb.net) in the ssis package but it is working fine through visual studio... Only a problem when it is ran through a job in sql, so i thought that maybe the VBScript needed to be tweeked a bit.)
I will test to see if it works.
Thank you for your time.
"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison
|
|
|
|
|
Hi,
I'm developing a network application for a windows CE 5.0 device.
I need to visit a certain http:// url to process a php script. I have tried using process.start but that doesn't work.
So i'm using a webBrowser control to do the job.
The device is hooked to a usb cable on activeSync sharing the PC's internet connection. The connection works. ( I tried tracert somesite.com and it returned 30 hops.)
I'm using this code:
Dim uri As New System.Uri("http://www.somesite.hr/subfolder/index.php")
WebBrowser.Navigate(uri)
This code is on a button's click event. ( it works the same way on .net framework 2.0 but not the compact)
I keep clicking, and the code executes but the web browser is empty, nothing happens.
Any ideas?
Thank you!
|
|
|
|
|
unix_master01 wrote: ( I tried tracert somesite.com and it returned 30 hops.)
30 hops?? The only way you should get that may hops to a web site is if you bounced the signal off of Mars and through NASA's Deep Space Communuications Network.
It would appear as though the packets are getting looped through the same set of hops, over and over again. This would indicated that there's something wrong with your network setup somewhere.
|
|
|
|
|
Any one can help.? a i'm new in vb.net i have a problem to shutdown, rebot and display screenshot of certain computer in local group by intering ip their address. heres my problem..!
=>> A program that will ask the user to input an IP address and then capture the screenshot of the computer,restart,shutdown, the computer will the given IP address.
Hope Anyone can help me here.? Thanks and have a nice day..
God Bless....?????
|
|
|
|
|
IF you have a username and password, you can remote desktop to machines that support that, with an IP address. I don't know if it's possible through code.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Christian Graus wrote: . I don't know if it's possible through code.
Actually there is a Microsoft provided utility called shutdown.exe (shutdown -i) invokes a 'Remote Shutdown Dialog'. But I am not sure whether that can be automated though.
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
angelo07 wrote: =>> A program that will ask the user to input an IP address and then capture the screenshot of the computer,restart,shutdown, the computer will the given IP address.
Are you intending to make something like 'Remote Shutdown Dialog ' which gets invoked using shutdown -i from Windows XP onwards?
Vasudevan Deepak Kumar
Personal Homepage Tech Gossips
A pessimist sees only the dark side of the clouds, and mopes; a philosopher sees both sides, and shrugs; an optimist doesn't see the clouds at all - he's walking on them. --Leonard Louis Levinson
|
|
|
|
|
Hi all,
I'm using VB.net and currently I want to do a depositary which allow people to upload file to it. I researched and found a lot of resources, which they did using ASP.NET
1) Can VB.net - Window Form create depositary (upload files (.doc, .txt ..), etc?) [i know asp.net is also like under vb.net group, but the codes are kinda different, some functions only work for one but not for the another]
2) If yes, how do I do it? (cos' ASP.net uses localhost, how about general VB.net - Window Form)? Where would the files be uploaded to?
I hope I'm not too vague. Any help is appreciated. Thanks in advance.
telly
|
|
|
|
|
tellytub wrote: Where would the files be uploaded to?
Good question. You can do it, if you have an FTP site set up to copy the files to.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
hi,
i have a .net windows application that support multiple languages, if it is installed in a spanish system, in what languages will the exception messages will be generated (ex.message). what other issues we may face while deploying the application.
please share your experiance, feedback and comments on this post with me.
if any more clarification is needed pl let me know.
thank you,
kalai
|
|
|
|
|
Hello every one
I am developing a application in VB 2005
I am using On Error Goto to handle errors.
Now my issue is that I want to handle different type of errors in a function separately.
That is like
Do some thing if the database connection is not there
Do some thing else if the data is not found
And so on
I am not able to identify the errors in that way.. I am able to displaying the error number and description provided by the error object.
Is there any way to find out or a list of error numbers available?
|
|
|
|
|
Why are you still using this totally abandoned way of error handling?!!!
Use Try...Catch instead:
<br />
Try<br />
.<br />
YourCodeHere<br />
.<br />
Catch ex1 As DataException<br />
<br />
Catch ex2 As IOException<br />
<br />
Catch ex3 As Exception<br />
<br />
Finally<br />
.<br />
.<br />
.<br />
End Try<br />
|
|
|
|
|
Why are you using On Error Goto when you have Try... Catch block in VB.NET??
|
|
|
|
|
So, in other words, you're not using the mechanism that allows you to do this, so you want to know why you can't do it ?
Anything that VB.NET gets from VB6 is almost certainly a disaster.
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
i want to convert some code in vb to vb .net..and i dont know how it will be. the vb code is
Screen.MousePointer = 11
i want to write in vb.net.. how we will write this code in vb.net. or in c# .net
|
|
|
|
|
You may change mouse cursor using cursor property of Form, such as –
Vb.Net-
Me.Cursor = Cursors.WaitCursor
C# -
this.Cursor = Cursors.WaitCursor;
I hope this helps .
-Dave.
Dave Traister,
ComponentOne LLC.
www.componentone.com
|
|
|
|
|
My.Computer.Scree.MousePointer=Cursors.WaitCursor
|
|
|
|
|
Hello!
1)How can I reset the picturebox so it doesn't show a picture in it.
I have a code that show a picture from a certain file path in it.
Private Sub Button1_Click(..)
PictureBox1.Image = System.Drawin.Bitmap.FromFile("C:\...\PICTURES\IMAGE1.jpg ")
EndSub
I want to create a new Button that shows no image in PicureBox1?
2) I also wanted to ask how can I make local file path ( I want my program that it always looks for a certain picture in a subfolder PICTURES of parent folder PROGRAM ( ...\PROGRAM\PICTURES\ ). Now I use absolute file path and it is very usefull.
Now I use this string:
PictureBox1.Image = System.Drawin.Bitmap.FromFile("C:\..\PICTURES\IMAGE1.jpg" )<-- I want to
replace this path in brackets.
3) And I want to write a code for writing a list of file names in a specific folder like PICTURES:
Dim FileName As String
For Each FileName In My.Computer.Filesystem.GetFiles("C:\...\PICTURES\"
ListBox1.Items.Add(FileName)
Next
That's all
|
|
|
|
|
Hi
1. PictureBox.Image=something puts something as the Image. Now what would
it take to show nothing whatsoever?
2. relative paths start without a device (such as "C:"), but are relative to the current
directory, which could be anything (especially after some FileDialog operations).
A path relative to the apps EXE file should be constructed, starting with Application.StartupPath
|
|
|
|
|
Thanks for help I will see what comes out of it.
Well I wanted to ask you how can I make this error image to appear in case there is no such picture file in the path folder.
|
|
|
|
|
BOREC wrote: how can I make this error image to appear in case there is no such picture file in the path folder
Put the regular code in the try part of a try-catch, and signal any problem in the catch
part, maybe by setting PictureBox.Image=someErrorPicture (which could fail as well unless
you use an embedded image resource...).
|
|
|
|
|
Hello,
I am a newby to Visual Basic.. I have been having some problems with adding my data in my program. I am using Vb2005 and trying to use sotored procedure but h have error on run time
message error : No mapping exists from object type System.Windows.Forms.TextBox to a known managed provider native type
This is what I have so far :
Dim con As New System.Data.SqlClient.SqlConnection("Data Source=.;Initial Catalog=School;Integrated Security=True")
Dim com As New System.Data.SqlClient.SqlCommand("proce_school_info", con)
com.CommandType = CommandType.StoredProcedure
com.Parameters.AddWithValue("@School_NameAr", Me.textBox1.Text)
com.Parameters.AddWithValue("@School_NameEn", Me.textBox2.Text)
com.Parameters.AddWithValue("@School_Edara ", Me.textBox3.Text)
com.Parameters.AddWithValue("@School_Address", Me.textBox4)
com.Parameters.AddWithValue("@School_City", Me.textBox5)
com.Parameters.AddWithValue("@School_Nation ", Me.textBox6.Text)
com.Parameters.AddWithValue("@School_Phone", CType(Me.textBox7.Text, Integer))
com.Parameters.AddWithValue("@School_Fax", CType(Me.textBox8.Text, Integer))
com.Parameters.AddWithValue("@School_Email", Me.textBox9.Text)
'com.Parameters.AddWithValue("@School_City", Me.textBox8.Text)
com.Parameters.AddWithValue("@School_Country", Me.textBox10.Text)
com.Parameters.AddWithValue("@School_Abbrev", Me.textBox11.Text)
com.Parameters.AddWithValue("@School_FirstYear", Me.textBox12.Text)
con.Open()
com.ExecuteNonQuery()
con.Close()
Ahmed hassan
|
|
|
|
|
hassanasp wrote: com.Parameters.AddWithValue("@School_NameAr", Me.textBox1.Text)
com.Parameters.AddWithValue("@School_NameEn", Me.textBox2.Text)
com.Parameters.AddWithValue("@School_Edara ", Me.textBox3.Text)
com.Parameters.AddWithValue("@School_Address", Me.textBox4)
com.Parameters.AddWithValue("@School_City", Me.textBox5)
com.Parameters.AddWithValue("@School_Nation ", Me.textBox6.Text)
com.Parameters.AddWithValue("@School_Phone", CType(Me.textBox7.Text, Integer))
com.Parameters.AddWithValue("@School_Fax", CType(Me.textBox8.Text, Integer))
com.Parameters.AddWithValue("@School_Email", Me.textBox9.Text)
'com.Parameters.AddWithValue("@School_City", Me.textBox8.Text)
com.Parameters.AddWithValue("@School_Country", Me.textBox10.Text)
com.Parameters.AddWithValue("@School_Abbrev", Me.textBox11.Text)
com.Parameters.AddWithValue("@School_FirstYear", Me.textBox12.Text)
I've bolded two lines above. You will notice that the lines in bold are missing something that the other lines have. That is the .Text property.
And, by the way, naming your text boxes as textBox1, textBox2, etc. won't win you any friends. Please give them better names because the person that comes after you to maintain your code will curse you for it. And if you end up having to maintain the code you'll end up cursing yourself.
|
|
|
|
|
I notice that some .net programs do this -- allowing tab pages to float and dock in other places. Is this done with a 3rd party application, or can I do it through normal .net code? Perhaps this will be a new feature in 2008?
Thanks
|
|
|
|