|
Process.Start is how you start another program, in code.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi All,
Could someone help me understand how to pull data stored in an XML file into my Excel spreadsheet?
I have tried to treat the file as though it were text, and wrote a routine to parse it all, but it is very cumbersome to use.
There must be a better way!
Albert Giraudi
|
|
|
|
|
Hi Albert,
There are various ways to read an XML. Some of the standard ways which you can use are –
1. Use the various custom controls available in the market (they are ready to use and easy too).
2. Use the XMLTextReader class which is derived from XMLReader.
Here is some basic code which can be utilized in your application –
*************************Code Part*************************
Imports System.
Imports System.Xml
' Open an XML file.
Dim textValue as String
Dim localName as String
Dim textReader As XmlTextReader = New
XmlTextReader (My.applicatin.Info.DirectoryPath & "\xmltest.xml").
textReader.Read()
If textReader.HasValue Then
' Move to fist element
textReader.MoveToElement()
localName=textReader.LocalName
textValue=textReader.Value.ToString()
‘ You can put your custom code to write the value to an Excel file from here onwards.
*************************End of Code*************************
Albert hope this helps you to get your application up and running . Have a nice day.
Regards,
Gary Bigman.
Software Engineer
ComponentOne LLC
www.componentone.com
|
|
|
|
|
|
Hello,
I want to show a loginform after the mainform is completely loaded. If I place the code in the Form_load event then the loginform is shown before the mainform is visible.
Where do I put the code so that the mainform is visible before the loginform is loaded (visible)
Thanks
|
|
|
|
|
I have not used it myself yet, but it seems .NET 2.0 introduced a Shown event for
this purpose...
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
|
2 possibilities not very elegants but work:
1) you can insert a timer at the end of the load form that will open the loginform
2) in load form event:
Show()
Login.ShowDialog()
Hope it helps
Shay Noy
|
|
|
|
|
2 posibility's:
shown event
activated event (not entiraly shure about this one)
If my help was helpfull let me know, if not let me know why.
The only way we learn is by making mistaks.
|
|
|
|
|
|
I am developing a test application at work, the item being tested operates with a serial comm port, and a network port. I am looking for either VB 6 objects or VB.net 2003 objects to interact with the device. I need to send data strings to it, recieve data strings, change communication settings and speeds. I would appreciate any and all objects and any code samples anyone could provide.
Phill Goin
|
|
|
|
|
Hi Phill,
There is some nice code and steps given in the MS KB which you can access from the given link below –
http://support.microsoft.com/kb/823179
The steps can be used for creating application to access Ports (whether Serial and Parallel).
Have a nice day.
Regards,
Gary Bigman.
Software Engineer
ComponentOne LLC
www.componentone.com
|
|
|
|
|
Thank you for the Information, I am so far successful with the comm port part of the code, it the network access to a device plugged in directly thru a cross over cable that is making my life difficult.
Any information on communicating on that port would be appreciated.
Thank you for the quick response.
Phill Goin
|
|
|
|
|
It's no different than any other TCP/IP based network. You have but two devices, each still requires it's own IP address on the same subnet. If the NIC that the device is plugged into has an IP of 192.168.0.x and the device is on 10.x.x.x, it's not going to work. Both NIC's have to be on the same subnet.
Other than that, it's going to be standard Sockets based communication. "vb6 sockets"[^]
|
|
|
|
|
Thank you for your assistance, I am able to set the IP addresses of both the machine and device, but it is the connecting, data transfer and interaction objects that I have no idea what to use. I would prefer VB.net 2003 but VB6 or VB.net 2005 will work in a pinch.
Thanks all
Phill Goin
|
|
|
|
|
Hi i'm using an access database. My dataset and table adapters are all generated by the "add datasource" wizard and hence all my select, insert, delete and update commands too. If i add a record to a table it inserts fine and i can update it and save. as soon as I add another record and edit the various fields in my datagridview and save, an error occurs (which is the same as the title of this message). i am working in a single user environment and using Vs 2005. Is there something I need to check for? I tried turning off optimistic concurrency but it still doesn't work.
Mr Oizo
|
|
|
|
|
This means that your SQL statement didn't update the number of rows in the database that the DataAdapter/TableAdapter expected it to. If you're using entirely designer generated code, this is usually caused by a starting SQL SELECT statement that is selecting data from more than a single table in your database.
The Adapters only work with SQL that selects and modifies a single table. You can use an Adapter to SELECT from multiple tables, but the resulting code for the UPDATE, DELETE, and INSERT will all fail if autogenerated. The autogenerated code uses the SELECT statement to generate the remaining SQL statements, but it cannot cope with a SELECT that retrieves data from more than one table.
|
|
|
|
|
Hi. Thanks for the reply. I think ill delete my dataset and adapters and regenerate them. I think it could have son=mething to do with the fact that my coulumn in the database named "AbsoluteLength"(which returns the absolute path of the file) is only 50 characters long. I changed it in the database to 200 characters just for safe keeping and it still shows 50 characters for max length for of that field(according to the apapter) . thanks
Beric
Mr Oizo
|
|
|
|
|
Just asking where i can collect any info on coding in java as just got to learn java or another language other than vb.net, any ideas gladly appreciated and if possible any sites similar to code project that can help as no java on this site.
Keep up the good work all
|
|
|
|
|
There's thousands of sites dedicated to Java. Don't tell me you couldn't type "Java programming" or "Java development" into Yahoo or Google??
|
|
|
|
|
i had already just thought i would ask the experts for advice. thank you
|
|
|
|
|
The experts here are just about all .NET/Windows based, not Java. Find a few Java forums and start asking around. THOSE would be the Java experts and know the better sites.
|
|
|
|
|
How can I make my VB application stop functioning when a certain date has arrived without it being obvious in the source code.
I use VB 6.0 and SQL 2000.
|
|
|
|
|
By being very creative?? Really, if we all just said how we do it, we'd be violating our own security by "giving away the keys to the kingdom." The key is hiding your information in plain sight by employing judicious use camouflage.
VB6 isn't supported by Microsoft anymore, and so library support for VB6 is also fading. Libraries that do things like registration and expiring trials.
You'd have to come up with your a method of using and encrypting data that you use to determine the date the app was installed, or the number of times the app was run, or how long the app has been running, or ..., or ..., and even any combination of those information. You store it in some out of the way place that's on everyones machine, either in the Registry or the filesystem somewhere, or both using filenames and registry keys that look like they belong there.
|
|
|
|
|
I am currently working on a program that will open on it’s own each day.
I have tried using the task scheduler, but I keep getting: access is denied (0x80070005)
I have looked in to creating a window service to accomplish this task. I have found a window service
example that would make you system speaker beep every three seconds, that works fine. My question is how can I make a window service that will call a specific program
Programming environment :
Visual Basic (Visual Studio 2005 Pro)
.Net Framework 2.0 SDK
Can anyone out there help. Thanks in advance
|
|
|
|