|
RTFM[^] - it's at the bottom.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
mm.. isn't it at the top instead?!?
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station....
_________________________________________________________
My programs never have bugs, they just develop random features.
|
|
|
|
|
No. The relevant section is about 6 paragraphs from the bottom.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
Hey, all.
I met a problem, how can I write data to an Excel 2007 file by using VB.Net (3.5)? For example, the data in a TextBox will be written to the excel file every 30 seconds.
I searched on the Internet for a while, but none of the codes worked for me and the description is not clear not all. Please give me a hand with a piece of code to help me understand, I just started to learn VB for one month.
Thank you very much for your time in advance
|
|
|
|
|
This article might help you.
|
|
|
|
|
Hi everyone,
I need a base-10 data type, and was wondering if there is one for the environment that I'm using. I'm using C++ in Visual Studio 2008 (Standard Edition). I know there is one in vb.net and c#.
I've tried ::DECIMAL but it says this is undeclared.
Thanks.
|
|
|
|
|
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
|
|
|
|