|
Thank you...
I did go through your C# codes and they are very good. Hey, your comments about my english "Nice English" was it a joke? I am not offended, if not so.
|
|
|
|
|
No its a Joke, In South Africa we have this Commedian who makes jokes about being a Priest. So he always breaks his English for the sake of his audience
Dont worry i wouldnt attempt to upset you
Am Glad you you got help from my code
Thank you
Vuyiswa Maseko,
Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding
VB.NET/SQL7/2000/2005
http://vuyiswamb.007ihost.com
http://Ecadre.007ihost.com
vuyiswam@tshwane.gov.za
|
|
|
|
|
Public Function Rating(ByVal iNPS As String, ByRef iRatings() As String) As String
Select Case iNPS
Case "1/2"""
iRatings = {"150#", "300#"} 'This is the line where I get an error
End Select
End Function
In the error list I get an "Expression Expected" error. I'm trying to return a string array so I can populate a combobox for a user. Any help would be much appreciated.
Eric.
|
|
|
|
|
Public Function Rating(ByVal iNPS As String, ByRef iRatings() As String) As String()
'Never argue with an idiot; they'll drag you down to their level and beat you with experience.' ~ anonymous
'Life's real failure is when you do not realize how close you were to success when you gave up.' ~ anonymous
|
|
|
|
|
Thank you for replying so quickly. I tried your suggestion and I still have the same problem. I am using vb.net express 2008. The blue squiggly line is under the first(opening) bracket.
|
|
|
|
|
Public Function Rating(ByVal iNPS As String, ByRef iRatings() As String) As String
Select Case iNPS
Case "1/2"
iRatings = New String() {"150#", "300#"}
End Select
End Function
|
|
|
|
|
You don't need to put a ByRef array in the header. You just need:
Public Function Rating(ByVal iNPS As String) As String()
Dim result As String()
Select Case iNPS
Case "1/2"""
result = New String() {"150#", "300#"}
.
.
.
End Select
Return result
End Function
|
|
|
|
|
I would like to known the name of an object that always appears describing a list of properties.
For example, when I am adding nodes to a treeview control it always appears an object that it's like a list box, but its categorized containg all the properties of each node.
I would like to use this object in my application, but I known even its name.Does anyone can help me?
Thanks,
Estevão
|
|
|
|
|
|
PropertyGrid[^]?
When you're alone in the Dark, Fear will protect you...
|
|
|
|
|
Yes thats the GridProperty control..thanks a lot!!!!
|
|
|
|
|
Is it possible to compile against .Net 2.0 and 2.1 framework versions in VS 2008?
I have the Advanced Compiler Settings screen open and am looking at the framework versions listed. 2.0, 3.0, and 3.5 are listed. The problem is that I need to compile apps under 2.0 and 2.1. Is this possible?
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
There's such thing a .NET Framework 2.1. The valid versions are:
1.0 and 1.0 SP1, SP2, and SP3
1.1 and 1.1 SP1
2.0 and 2.0 SP1 and SP2
3.0 and 3.0 SP1 and SP2
3.5 and 3.5 SP1
|
|
|
|
|
My bad. For short hand at work, we call 2.0 SP1 simply 2.1.
Is it possible in VS 2008 to target 2.0 and 2.0 SP 1 specifically during compile time?
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
No, you can only target a specific version, not a specific service pack.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Sigh. I was afraid that would be the answer.
Great feature in VS2008, but should more power to target a specific framework version (down to the SP level).
We still have to support Win98, meaning 2.0.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
The fact that .NET versioning is even included in Visual Studio 2008 should be good enough (unfortunately no 1.1 support though). What do you want specifically from the different service packs? Nothing really new is introduced, just fixed. If you want to target a particular service pack of the .NET framework, then make it a requirement of the program.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my Blog
|
|
|
|
|
In our organization, it is simply not possible to upgrade all clients mainly because we have *alot* of machinery that is controlled via apps originally created for DOS/Win98; and there are compatibility issues with newer versions of Windows. We could upgrade machinery which in turn would support a newer Windows version, but that costs are entirely to high for something that currently works fine esp. in a recessionary period.
We have several apps that we maintain and use for inventory control etc. In Win98, only 2.0 is supported. In WinXP+, we can support anything but tend to use 2.1 so that the same source files (95% of the time at least) can be used in compiling against 2.0 and 2.1. Currently we duplicate the .sln and .vbproj files to point at different compiled versions of referenced .dlls (2.0 vs 2.1).
It is nice that VS2008 allows you to target a framework, but in our scenario, it doesn't really help. Targeting a framework version, at least to me, would allow a developer to target a specific framework version regardless if it's the base version or a SP version; not just what ever version happens to be the latest.
In a perfect world, we would all run 3.5 and upgrade our OSs at M$s will......... but that perfect place doesn't exist here.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
kissdznuts wrote: In a perfect world, we would all run 3.5 and upgrade our OSs at M$s will......... but that perfect place doesn't exist here.
Agreed, Microsoft did it's job too well. People clinging to their old OS-es like there was no alternative.
|
|
|
|
|
What version of Visual Studio do you use to compile against 2.1?
Do you actually distribute a version with 2.0-framework libraries *and* a version with the 2.1-framework libraries?
kissdznuts wrote: We still have to support Win98, meaning 2.0.
I'm using VS2008, Windows XP SP3. Just compiled a form against the 2.0 framework, without problems. I didn't test it under 2.0 SP1 though.
|
|
|
|
|
Eddy Vluggen wrote: What version of Visual Studio do you use to compile against 2.1?
Currently using VS 2005 for compiling against both. I have 2 virtual machine environments setup so that I can compile against 2.0 and another for the 2.1 framework library.
Eddy Vluggen wrote: Do you actually distribute a version with 2.0-framework libraries *and* a version with the 2.1-framework libraries?
Two different library versions get deployed. Win98 gets the 2.0 librarys, while everyone else gets 2.1. If the machine isn't running Win98, they the client has WinXP or higher.
Eddy Vluggen wrote: I'm using VS2008, Windows XP SP3. Just compiled a form against the 2.0 framework, without problems. I didn't test it under 2.0 SP1 though.
Not sure I'm following you here. Are you saying you compiled a win form app targeting the 2.0 framework, and the app worked in Win98? I thought by default VS2008 installs 2.0 SP1?
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
kissdznuts wrote: I have 2 virtual machine environments setup so that I can compile against 2.0 and another for the 2.1 framework library.
So you redistribute the framework-libraries with the installer?
kissdznuts wrote: Are you saying you compiled a win form app targeting the 2.0 framework, and the app worked in Win98?
I'm saying that there is no way to target 2.1 specific. One targets 2.0, 3.0 or 3.5. Microsoft only provides Redistributable Packages for those versions of the framework. You'll have to traverse the registry to find out wether SP1 is installed (or any security-updates for .NET, in case those DLL-versions are important to you)
Take a look at the version-list;
http://en.wikipedia.org/wiki/.NET_Framework_version_list
|
|
|
|
|
Eddy Vluggen wrote:
So you redistribute the framework-libraries with the installer?
Kinda - we have a custom app that is similar to the click once. We have an exe that starts prior to any other apps, determines what updates need applied and installs them (meaning frameworks, windows installer, other 3rd party software), and then runs the appropriate program (determine by command line sent in).
Eddy Vluggen wrote:
I'm saying that there is no way to target 2.1 specific. One targets 2.0, 3.0 or 3.5. Microsoft only provides Redistributable Packages for those versions of the framework. You'll have to traverse the registry to find out wether SP1 is installed (or any security-updates for .NET, in case those DLL-versions are important to you)
Right, that's what Guffa was stating earlier. Basically, the 2.0, 3.0, 3.5 points to the highest installed version of each.
I check the Net Framework Setup\NDP\v2.0\SP key or system.environment.version
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
kissdznuts wrote: Basically, the 2.0, 3.0, 3.5 points to the highest installed version of each.
Someone who has 2.0 installed might not have version 1.1 of the framework, so it doesn't point to the "highest installed version".
It simply points to the version of the Framework, regardless of (security) updates and/or service packs.
kissdznuts wrote: we have a custom app that is similar to the click once
How does it handle the differences now? Does it update an XP installation if SP1 for .NET 2.0 is not installed? If so, do you *overwrite* the old libraries, or do you *add* the new versions to the GAC?
|
|
|
|
|
Eddy Vluggen wrote: Someone who has 2.0 installed might not have version 1.1 of the framework, so it doesn't point to the "highest installed version".
It simply points to the version of the Framework, regardless of (security) updates and/or service packs.
You may have misconstrued what I was explaining. In VS 2008, when you do a target framework, there are 3 options listed: 2.0, 3.0, and 3.5 frameworks.
If you have 2.0 installed, 2.0 SP 1, and 2.0 SP2 installed and you target 2.0 in VS2008, it compiles with 2.0 SP2. Same with 3.0 and 3.5.
The highest installed version of *each* framework when doing a targeted framework.
Eddy Vluggen wrote: How does it handle the differences now? Does it update an XP installation if SP1 for .NET 2.0 is not installed? If so, do you *overwrite* the old libraries, or do you *add* the new versions to the GAC?
We have a few assemblies that rely on interop, so all files are copied into each program's directory on the client from a shared directory. If the client = Win98 it copies down the 2.0 versions; if XP or higher it copies down the 2.1 versions.
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|