|
either you are referring to C++/CLI, the managed C++ that is running in the .NET Framework, so you can use the decimal type same as in C# and VB.NET; or you are referring to unmanaged C++ and asking in the wrong forum.
One and the same Visual Studio can handle all four: C++, C++/CLI, C#, VB.NET (the latter 3 being .NET, the former not).
|
|
|
|
|
b-rad311 wrote: a base-10 data type
A what? Are you thinking of BCD[^]?
|
|
|
|
|
I was installing visual studio 2008 on my laptop(windows 7). But the installation stuck when it was trying to install sql server 2005. By googling I learned that sql server 2005 requires .net framework 3.5 to be installed on the system. Then I downloaded .net framework 3.5 sp1 and tried to install it. But the installation failed. My system is already having .net framework 4. How to install sql server successfully.
|
|
|
|
|
Were you given an error when it was trying to install SQL server? The prerequisites are checked pretty well in MS products, so if it couldn't install SQL server, it wouldn't have let you proceed.
|
|
|
|
|
|
Windows 7 already comes with .NET 1.x, 2.0, 3.0, and 3.5 installed, in both 32- and 64-bit (if appropriate) versions.
|
|
|
|
|
But I couldn't find .net framework 3.5,3.0 or 2.0 in Add/Remove Programs.
|
|
|
|
|
That's because it's not there. You look under C:\Windows\Microsoft.NET\Framework and Framework64 (if applicable.) In either case, you'll find folders in there with the versions of the .NET Frameworks that are installed. On my Vista machine, I have:
C:
\Windows
\Microsoft.NET
\Framework
\v1.0.3705
\v1.1.4322
\v2.0.50727
\v3.0
\v3.5
\v4.0.30128
I leave it to you to determine which 32-bit versions of the .NET Framework are installed from that list...
|
|
|
|
|
Thanks. I could see the frameworks under c:/windows/Microsoft .net/Framework. Mine is 32-bit.
|
|
|
|
|
your V4.0 seems a bit out-of-date. Mine is v4.0.30319
|
|
|
|
|
Yeah, that machine still had the RC on it...
|
|
|
|
|
Soumini Ramakrishnan wrote: .net framework 3.5 sp1 and tried to install it. But the installation failed
You can run frameworks 3.5 and 4.0 side by side, so you should not have got any errors during install.
Try searching the internet for the error you get and you may find a solution.
|
|
|
|
|
Hi, I am new in .net and I don't know how to create user control only for decimal and integer numbers?
|
|
|
|
|
milica1 wrote: Hi, I am new in .net and I don't know how to create user control only for decimal and integer numbers?
From usercontrol I suppose you mean a textbox?
Then see here[^].
|
|
|
|
|
What environment are you using, Web or Windows?
A MaskedEdit textbox will work.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Windows, but I think that I found solution...
Thank you!
P.S. If I have some errors, I am sorry my English is bad...
|
|
|
|
|
In Visual Basic there is a method, IsNumeric, to test whether a textbox contains a value that can be converted to a number; C# has no such method. C# does, however, include the type Decimal, which includes a Parse method. The C# Parse method will attempt to convert the text passed to it into a Decimal type, returning the Decimal value or a FormatException error. See this article[^] for information about the Decimal.Parse method.
The advantage of the Decimal type is that it can represent both integer and floating point types. You could test for all the possible real and integer types supported by C#, but that would be tedious and it's unlikely that a user will be typing an entry in a textbox large enough to require one of the more esoteric types possible. It can also be cast into other numeric types easily without loss of accuracy due to rounding errors.
If you are really trying to create a User Control containing textboxes, rather than just a textbox on a form, you can save some time by creating just one method in your control to test the validity of the input text and call it for each of your control's textboxes. That's the approach I took in [insert shameless self-promotion disclaimer] this article[^] about my first User Control. In the ValidateEntry() method, called by all of the textboxes on the User Control, I use Double.Parse() to check the values entered by the user. I don't expect any entries with integer values, so I used Double.Parse, but for your use, Decimal.Parse() is a better choice.
The MSDN article referenced above provides sample code for testing the value in VB and C#, and the samples simply display an error message if the Parse method fails. You'll probably want to do something more useful with your code. In my first User Control project, I displayed a message, set the return value to an unlikely result, then used that result to return focus to the textbox that contains the faulty data. You might want to do something else, as appropriate for your application. It's unfortunate that we don't have a method available in either language to deliver a strong electric shock to a thumb-fingered user via the keyboard but, alas, it's not a perfect world.
"A Journey of a Thousand Rest Stops Begins with a Single Movement"
|
|
|
|
|
You mean like a NumericUpDown?
|
|
|
|
|
We have set of applications developed in .Net Framework 2.0 (both Windows and Web Applications) running in Windows 2003 Server. Now management decided to upgrade it to Windows 2008 Server. Any changes required in Application side?. If not, those applications work with full potential of windows 2008 server ?
Thanks in advance
|
|
|
|
|
No changes should be necessary as long as the proper framework is installed and you are not using a methods that may have been depreciated (can't think of any). Bottom line is you need to do testing.
I know the language. I've read a book. - _Madmatt
|
|
|
|
|
Thanks for your answer and suggestion.
Still has one doubt, Will those applications run without any issue in 64bit mode of win2008 or Win2008 R2 ?
[applications are compiled with 'AnyCPU' option]
|
|
|
|
|
Noone is able to say since they didn't write the code and have no idea what it's doing or using.
If your code uses components that at 32-bit, you're going to have problems. If not, then you might not.
The only way to tell is to setup an environment to test in and thoroughly test your applications before you try to put it into production.
|
|
|
|
|
Hello, how is everyone today.
I wanted to ask how to add a registration form that can appear at the end of an installation process for a windows application.
I used the built in setup process in VS 2005.
If I was not as specific, I can elaborate in more detail.
|
|
|
|
|
There are custom build actions you can add. From here you can launch forms, perform setup etc.
|
|
|
|
|
Hi!
I am using this BackTrack procedure that Fills a map.
Private Sub Fill(ByVal i As Integer, ByVal j As Integer)
If (i < 1) Or (j < 1) Or (i > FillM.Width) Or (j > FillM.Height) Then
Exit Sub
End If
If FillM.Pixel(i, j) = 1 Then
FillM.Pixel(i, j) = -1
Fill(i, j - 1)
Fill(i, j + 1)
Fill(i - 1, j - 1)
Fill(i - 1, j)
Fill(i - 1, j + 1)
Fill(i + 1, j)
Fill(i + 1, j - 1)
Fill(i + 1, j + 1)
End If
End Sub
When The Map has a few pixels that have value 1, It works correctly. but when the map has many pixels that has value 1, It cause an StackOverflowException. How Can I resolve this problem and why .Net Framework 3.5 throw this invalid Exception????
Regards.
Mehdi Ghiasi
|
|
|
|