Answer Questions
golu Closing Objects in Finally
I have the following code: Private Sub Test() Dim xd As XmlDocument = New XmlDocument Dim xtr As XmlTextReader Try xtr = New XmlTextReader("C:\Test.xml") xd.Load(xtr) ' ............ Catch ex As Exception '.......... Finally xtr.Close() End Try End Sub I get a warning because the xtr object is possibily used before it is assigned a value and c ...Show All
ivan.paul Reading characters from a line
I was wondering (DESPERATELY) how to read only certain characters from a line of text and how to define where the code will start reading and how far into the line the code will read. and lastly - is it possible to store these specified characters in a variable I've been messing around with "Mid()" but its not doing exactly what I need it to. THANX alright - i know this is probably reall ...Show All
Shruti00 Block Scope and For Next Loop
Inside a function, I have a variable named Combined inside a For Next block of code. As an example without actual code.... Private Function(yadda,yadda) as integer For a as integer = 0 to myarray.length - 1 Combined += Combined next a Return Combined 'Does not work because it lost its scope outside For Next block End Function Was hoping someone could tell me a workaround for this that will allow me to return the value of the ...Show All
leviticus ListBox as an argument
Here is one for the group. Can a list box become an argument, ie. ListBox(21) ListBox(22) My problem is that I have several list boxes with data. I need to compare ListBox1 with ListBox2 and 3 and so on. It would be so much easier to use a variable like ListBox(x) as the list box number. Thanks, rmc The easiest way is to create an array of the TextBox type and add your TextBoxes to it ala: 'Creat ...Show All
Tom McAnnally How to keep a Form on screen without clicking on a usercontrol behind the form
Hi, I have a main form with buttons at the top and inside this form, I have a Panel control to host usercontrols. Within the usercontrol, I have a linklabel control that calls a form. What I want to do is keep the form on screen and prevent the user from clicking on the usercontrol on the main form unless the user clicks on the Cancel button. How do I go about resolving this small problem. Regards Dipendra ...Show All
ckramer VBasic .Net Standard version and Win XP Home Edition
Hi everyone, I am begin to programmer in VBasic .Net 2003 standard version and my laptop with windows xp home edition, there are any difficult or troubles with this configuration I am going to develop application and ODBC to FoxPro database please help me to know if I need to upgrade somthing Thank you Jesus vb.net/vs.net both work well with foxpro. Theres a oledb managed data provider, thats used to connect to foxpro.Microsoft have a su ...Show All
Chris Howarth How do you search for data in a data row?
How do I search for data in a datarow What I am trying to do is: The user enters data into a form I then write it to a datatable, at a later stage I want to access the data in the row and write a HTM file. So the user will enter eg. the jobcard number. I then need to search for that value in the datatable, access that row and then using the data in the row produce the file. ( the jobcard number will always be unique but it is not the prima ...Show All
Ajay serial port - com
I toke from the VB6 the example about using the serial port with MSComm. I run this program in VB2005 after it was upgrade ofcourse by the VB2005 and try to send and receive strings in a loop(1-1000). But sometimes in this loop the string that I'm sending is stuck or something that I don't understand why I run this loop with the some strings a lot of times and everytime is a different string that stuck. if someone can ...Show All
ejadib Built in functions
Hi All Does VB 2005 Pro version have a way of listing all the build in functions. For instance where could I go to get the correct syntax for computing the first and last day of the current month Dim FirstdayOfMonth as Date = fday(thisMonth) Hope that makes sense VB newbie Andre or of course the help system or a web search ... the functions built into the language and the .net framework ar ...Show All
erudite_22 What's the diff: Directory. VS. My.Computer.FileSystem
What's the difference between using Directory.<member> and My.Computer.FileSystem.<member> My.Computer.FileSystem contains extra methods for copying, moving and deleting files/directories that can make use of the Windows Shell dialogs, which the System.IO.Directory class does not. All the 'My' stuff is just shortcuts, so probalby nothing. There are some subtle differences in places. But your ...Show All
Unterforsthuber RC1: "Compiler has encountered a problem..... NEED HELP from MICROSOFT
I do have a rather big VB Windows Project and I get all the time interrupted by a compiler error &Hc0000005&. Have to restart. It happens while I edit the code, two three keys pressed and I get the compiler error. Don't think there is any error in the code itself. It is close to impossible to work with VS anymore. Thanks very much for your help - Thomas Just an update on this issue: - I've tried Thomas ...Show All
Ling Chen Wu Disabling PInvokeStackImbalance in Visual Basic Express 2005
I have a problem on how to prevent the PInvokeStackImbalance message. How can I disable this Hi, I used a DLL file on my smart card reader, the SDK of that hardware used Visual Basic 6 on their SDK. I developed an application using Visual Basic Express 2005 and I used the following codes below: Enum KEYTYPES ACR120_LOGIN_KEYTYPE_AA = 0 AC ...Show All
Silviu Vlasceanu Handling of unsigned values?
Why is this code not compiled Const UnsignedValue As UInteger = &H80004005 To make it more strange this compiles: Const UnsignedValue As Integer = &H80004005 The value is larger than Integer.MaxValue but smaller than UInteger.MaxValue. No problem :) In VB, literals (including hexadecimal literals) are considered to have type integer - as such &H80004005 is a ...Show All
kdoan In need of help
ok, ive made my XML plugin, and the app reads it like this: Try Dim sr As New System.IO.StreamReader( "settings.xml" ) Dim xr As New System.Xml.XmlTextReader(sr) Dim settingsxml As New System.Xml.XmlDocument settingsxml.Load(xr) Dim NumberofcatagorysXmlNode As System.Xml.XmlNodeList = settingsxml.SelectNodes( "settings/numberofcatagorys" ) Dim number As System.Xml.XmlNode = NumberofcatagorysXm ...Show All
Kryton delay displaying .net forms
I'm calling a .Net exe from VB6 and loading the .net form has a delay. If you click on the current VB6 window before the .Net form loads it ends up behind the current window and the icon never appears in the taskbar. The only way to get to it is the alt-tab. I'm calling execute and wait from my VB6 app so the .Net exe has to finish before the VB6 app can go on. How can I get the .Net app to act like a modal window and not allow them to click off ...Show All
