|
And you expect us to guess where the error occurs?
|
|
|
|
|
actually my code trying to get information like OS name, processor name, user name and computer name..
|
|
|
|
|
Since you haven't bothered to tell us the line where the error occurs, I'll have to guess:
Private Sub TextBox11_TextChanged(sender As Object, e As EventArgs) Handles MyBase.Load
TextBox11.Text = My.Computer.FileSystem.GetDriveInfo("D:\").TotalSize \ 1000000000 & " GB"
End Sub
Private Sub TextBox12_TextChanged(sender As Object, e As EventArgs) Handles MyBase.Load
TextBox12.Text = My.Computer.FileSystem.GetDriveInfo("D:\").TotalFreeSpace \ 1000000000 & " GB"
End Sub
On computers with a single hard-drive, drive D: (if it exists) is typically the DVD drive. If there is no DVD in the drive, then you won't be able to read the drive's information, and you'll get a "device not ready" error. You need to check the IsReady property before trying to access the other properties:
Dim drive As DriveInfo = My.Computer.FileSystem.GetDriveInfo("D:\")
If drive.IsReady Then
TextBox12.Text = drive.TotalFreeSpace \ 1000000000 & " GB"
End If
You should also give your controls meaningful names - without reading the code, it's not possible to know what TextBox11 should contain.
Also, give your methods less confusing names. At first glance, it looks like TextBox11_TextChanged will handle the TextChanged event of the TextBox11 control, which would send your code into an infinite loop.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
oh.. wow.. thanks a lot... i appreciate it!!
-- modified 30-Mar-15 15:45pm.
|
|
|
|
|
<pre lang="vb.net">hi,,
it is possible to adjust the size of a rectangle which is drawn in a picturebox with drawrectangle function.. During run time i want to adjust my rectangle width using numericupdown control..
thank u</pre>
|
|
|
|
|
Yes, collect the coordinate values from your up/down control and then redraw the rectangle with the new values. You probably need to override the OnPaint method in order to do it properly.
|
|
|
|
|
My understanding of basic Python is pretty good, but my memory fails me on all available modules and so forth, but when I last used Python, we had no luxuries like the DLR. I'm now looking for some advanced, in-depth Python tutorials, and I thought it best to look for ones that concentrate on integration with .NET. All suggestions are most welcome.
No object is so beautiful that, under certain conditions, it will not look ugly. - Oscar Wilde
|
|
|
|
|
|
Hehe, oops.
I somehow missed the "IronPython .NET Integration documentation" when I downloaded IronPython. It is more reference format though, but I should be quite fine walking myself through building something small.
No object is so beautiful that, under certain conditions, it will not look ugly. - Oscar Wilde
|
|
|
|
|
How can i learn OOPS concepts in a easy way to get the grip over the subject and use it in my daily coding life.
|
|
|
|
|
|
That was Object Oriented Programming concepts.
|
|
|
|
|
I know, hence my comment: it's OOP not OOPS. And did you follow the link I gave you?
|
|
|
|
|
Thanks Richard. I am getting an error while trying to opening the link it is showing error message as I am trying to open it from Google. Could you please suggest me another link so that it'd be grateful for me to learn.
|
|
|
|
|
|
|
Dear All,
**Actualy, I am a student and i want to join course of WCF And Web API But Friends I am Totally confused WCF And WEB Api is Different or Similar .Can I join the Both Course Of Join Only One Course (WCF and Web API).**
|
|
|
|
|
You can find the answers you seek quite easily just by Googling for "difference between wcf and web api".
|
|
|
|
|
|
Your post is completely unreadable. Don't copy and paste the text from the web page. Copy and paste the actual code that threw the exception and put it inside PRE tags.
|
|
|
|
|
sOutput1 = "<td> <input type='text' name=DEPT maxlength = '4' value="
sOutput2 = qresults("DEPT")
soutput3 = "></td>"
Response.write (sOutput1 + soutput2 + soutput3)
(I really didn
|
|
|
|
|
The original post ended up in 4 columns. When the formatting gets all weird compared to a standard post I cannot assume I have all the information intended. To you, it looks fine because you are the only person who saw the screen and you are the only person who knows what to expect in the copy'n'paste.
Other people who have not seen your screen do not know what to expect.
You don't show the definitions of the sOutput1, soutput2 or soutput3 so assumptions have to be made.
If your code snippet was a copy'n'paste job, not typed by hand, try it this way
Response.Write(String.Concat(sOutput1, soutput2, soutput3))
|
|
|
|
|
Try to replace it with "+".
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
nope.. same message with the '+' instead of the '&' (but thank you for the suggestion!)
|
|
|
|
|
You're still using ADODB in a .NET application; you should look at switching to ADO.NET[^] instead, which has much better support.
Using ADO.NET for beginners[^]
Migrating from ADO to ADO.NET[^]
The problem is most likely that ADO is returning an ADODB.Field object, which can't be used with string concatenation. If I remember correctly, you need to access the field's Value property, and convert that value to a string:
sOutput2 = Convert.ToString(qresults("DEPT").Value)
You should also specify the types of your variables when you declare them:
Dim sOutput1 As String
Dim sOutput2 As String
Dim sOutput3 As String
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|