Well it's as I thought, I tend to hold on to old advice longer than necessary. When VB first had objects (4.0?) they would tell you not to make any more than you need. I guess their first pass at classes and objects was probably slow and took more memory than necessary. When I finally moved to...
Not that I know of. I didn't even know I had an app.config file. (Told you I'm new! :))
I see you're on Version 1.1 of the Framework. I'm on 2.0 (vs.net 2005). Maybe it's a new property? But surely there must be something simliar. In VB6 they had App.Path.
When I execute this line of code:
MsgBox(Application.ExecutablePath)
I see the path to my exe in a message box.
I am fairly new to VB.NET, just trying to help. Perhaps a more experienced user can help?
I looked around for a similar topic but had no luck finding one.
I have an application where the user needs to be able to edit a small piece of text (a bibliographic citation) in a Winform. They have to be able to do some simple formatting, specifically they have to be able to add bold, italic...
1. Do you mean to open a file or save it?
To open:
Documents.Add("c:\path\to\file.doc")
To save to the same place
ActiveDocument.Save
To save somewhere else:
ActiveDocument.SaveAs("c:\new\path\to\file.doc")
2. ActiveDocument is the document of all open Word docs that has (or last had) the...
GetFullPath gets the full absolute path for a given partial path. So GetFullPath("\") should return "C:\" assuming you're current directory is on C:.
I think what you want is Application.ExecutablePath
I'm not sure about the second part. To enforce maximum heights in VB6 I used to check check...
Right. My code comes from the old advice that if you're accessing a property a lot, use a variable. Your code can make many calls to the object. Mine makes 2. Maybe in the fast-lane world of VB.NET 2005 that advice no longer applies?
Signo-
ActiveDocuments.Tables is a 1-based collection of the tables in the document. You can walk through them as needed.
Each table has a Rows collection, and each row a Cells collection. So you can walk through the entire table with code like this:
Sub readtable()
Dim myTable As Table
Dim...
This simple function seems to work...
Function RoundToQuarterHour(ByVal inDateTime As DateTime) As DateTime
Dim minutes As Integer
Dim addMinutes As Double
minutes = inDateTime.Minute
Do While (minutes + addMinutes) Mod 15 <> 0
addMinutes += 1
Loop
inDateTime =...
Thanks Paszt!! I think that's exactly what I want. I am trying to get it to work, but I can't figure out how to get my proxy username and password in. But I'm working on it. Thanks for the tip!
I have a VB6 Windows app that parses references in a journal article, searches a web site for them, and inserts corrected information into the file. The VB6 app uses the old Inet control to send a smart URL to the site. What I get back is XML. I'm looking for the best way to get this...
Thanks a lot, John. I've already downloaded and am reading them! I'm really excited about getting back into VB and glad to be using the latest and greatest.
Hello everyone. I'm new to the forum. Looks great and I hope to learn a lot and hopefully help others along the way.
I have programmed VB since version 1.0 (!) but for the last few years my company was concentrating on Java so I have done no .NET work. (What Java did do was teach me good OO...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.