|
Bob Beaubien wrote: i want it to be in the same folder as my program
The folder where your application is running can be obtained over the Application class, it holds an ExecutablePath[^]-property.
You can use Path.Combine [^] if you want to refer to a subfolder thereof.
I are Troll
|
|
|
|
|
Okay, then use Directory.GetCurrentDirectory to get the path of your application.
This will get the path of the application, even if the user would have installed it elsewhere then the default directory.
My advice is free, and you may get what you paid for.
|
|
|
|
|
WRONG! GetCurrentDirectoty cannot be trusted to return the same path as the executable every time! Try launching an OpenFileDialog and navigating around with it, then see what GetCurrentDirectory returns.
|
|
|
|
|
You are ofcourse right, I actually didn't think of that until after your reply.
My advice is free, and you may get what you paid for.
|
|
|
|
|
if you create a desktop shortcut, you can choose the initial "current directory"; when you double-click it, the EXE gets launched with the chosen curdir, so it is totally unrelated to the exe path.
Luc Pattyn
Have a look at my entry for the lean-and-mean competition; please provide comments, feedback, discussion, and don’t forget to vote for it! Thank you.
Local announcement (Antwerp region): Lange Wapper? Neen!
|
|
|
|
|
Hello to All,
Dim chArray As Char()
ChArray = a_string.ToCharArray
DirectCast((chArray((i - 1) + "`"c)), Char)
DirectCast((chArray((i - 1) - "`"c)), Char) // Error in the line
If you can think then I Can.
|
|
|
|
|
Is there a question here?
You say 'Error in the line'. What error?
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
eg_Anubhava wrote: DirectCast((chArray((i - 1) - "`"c)), Char) // Error in the line
Does this even compile ? It sure doesn't look to me like it should. As the other bloke said, you've given us next to no info, I'm sure the error is in plain English and means what it says, but if you don't tell us the error, we can't really explain it to you.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Error is Operator '-' is not defined for types 'Char' and 'Char'.
If you can think then I Can.
|
|
|
|
|
Yeah, well you're trying to do math with characters. That's not exactly a defined operation.
What are you trying to achieve with this code?
|
|
|
|
|
But Sir,
- Operator is working fine for Strings.
If you can think then I Can.
|
|
|
|
|
So what?? Just because it works doesn't mean it's a good idea to use it. VB.NET does a lot of implied conversions if a type does normally work. In this example:
Dim x As String = "100"
Dim y As String = "40"
Debug.WriteLine(x - y)
results in 60 being output to the Output pane in Visual Studio. Why? Because both strings were automatically converted to Integers before the subtraction operator was applied.
There is no implied conversion for your '-' character because it doesn't translate to a number.
|
|
|
|
|
But sir it not works for Char.
If you can think then I Can.
|
|
|
|
|
But nothing. I already told you you shouldn't be doing this in the first place.
Rework the algorithm to eleminate doing math with characters and strings. You'll have far better and maintainable code.
|
|
|
|
|
Thank u sir
If you can think then I Can.
|
|
|
|
|
Has anyone heard about the new way to migrate VB 6 to the cloud? There was some stuff out there over the past few days.
|
|
|
|
|
What does this actually mean ? I can tell you for sure that VB6 is totally unsupported. Thank goodness for that......
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
|
Looks like a tool to convert VB6 to VB.NET. Microsoft either couldn't write one that works, or didn't care enough, but if someone's got a working one, then I expect that may work. It will work by ditching VB6 and creating a .NET app.
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
aha just for my information i asked , i thought you might had tried
Best Of Regards,
SOFTDEV
If you have knowledge, let others light their candles at it
|
|
|
|
|
|
The only cloud I want to see VB6 migrated to is the one that came out of an elephants ass.
|
|
|
|
|
ROTFL !!! Let me just mark that as a good answer....
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|
|
Collect all the VB source codes, delete them after burning them into CD. Collect the VB documents. Place them in a bin, pour kerosene and set it on fire. It will send them to the cloud
|
|
|
|
|
'the cloud' is just a way of referring to the internet, right ? Making an application into a website would basically put it in 'the cloud' ?
Christian Graus
Driven to the arms of OSX by Vista.
Read my blog to find out how I've worked around bugs in Microsoft tools and frameworks.
|
|
|
|