|
The appended character specifies that the literal value should be treated as a certain datatype instead of the type that's infered by the number. For example, 10000# says that the number should be treated as a Double type instead of an Integer. 10000@ should be treated as a Decimal type. The documentation on it (VB.NET) is here[^].
|
|
|
|
|
This is one of the older style type suffix characters (e.g., #, $, %,...).
You can still even declare variables without specifying a type with these (e.g., Dim myDouble# - not recommended though). This is outdated syntax that should be purged from the language.
I would recommend using the newer type suffix 'R' for this case. ('R' for double literals, 'D' for decimal literals, 'S' for short literals, 'I' for integer literals, 'UI' for unsigned integer, and 'US' for unsigned short).
David Anton
http://www.tangiblesoftwaresolutions.com
Instant C#: VB to C# converter
Instant VB: C# to VB converter
C++ to C# Converter: converts C++ to C#
C++ to VB Converter: converts C++ to VB
C++ to Java Converter: converts C++ to Java
Instant C++: converts C# to C++/CLI and VB to C++/CLI
|
|
|
|
|
Within VB.Net 2003, I noticed a odd thing. When I try to round a decimal such as .805 to 2 places, I get .80. If I round a decimal such as .815 to 2 places, I get .82. Is there a reason that VB.net does this? Is there a way to get around this issue? Thanks for the help.
In some additional testing I have found that it appears that when the hundredths position is 0 or an even number it rounds down and when it is odd that it rounds up. This seems very odd and inconsistant to me. I hope that someone has the answer.
-- modified at 17:09 Friday 14th September, 2007
|
|
|
|
|
The .NET CLR uses "bankers rounding", or "Round-To-Even". Read[^].
It's not just VB.NET that does this. It's any language, including C#, that targets the .NET Framework.
|
|
|
|
|
I have a radio button that is disabled on form load, why is the font color(forecolor) different when disabled and how do I change it? Thanks.
mshytech
|
|
|
|
|
mshytech wrote: have a radio button that is disabled on form load, why is the font color(forecolor) different when disabled
Because it's disabled. This is standard Windows functionality.
mshytech wrote: and how do I change it?
You don't. There is no property to change the disabled foreground color.
You can simulate the "normal" colors with a disabled RadioButton by leaving it enabled, then handling the Click event of the RB and resetting it's Checked property to the opposite of what it is:
RadioButton1.Checked = Not RadioButton1.Checked
|
|
|
|
|
Great, that works! What ever happened to control arrays?
|
|
|
|
|
add a class to your project which inherites radiobutton
add this code to your class .to disable the event do not write anything in the subroutine.
Protected Overrides Sub OnEnabledChanged(ByVal e As System.EventArgs)
End Sub
-- modified at 15:42 Friday 14th September, 2007
A.E.K
|
|
|
|
|
You might want to review your post and clean it up a bit. Noone can read it unless they reply to it.
|
|
|
|
|
what are you talking about Dave?
A.E.K
|
|
|
|
|
Originally, your post just had the peach colored bar, with no code in it.
|
|
|
|
|
hi first u write the code and in load form for line u disable radio button not first ok
your problem is sol ve
|
|
|
|
|
You might want to rethink that post. He wants the control disabled, but not showing the color scheme that comes with it. Setting the Enabled property to False at any time will change the colors to something he doesn't want.
|
|
|
|
|
Dave Kreskowiak wrote: You might want to rethink that post.
Boy, someone really missed the point of the original post
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Yeah, I was standing behind the guy when he fired, and still had to duck as the bullet wizzed by!
|
|
|
|
|
You are absolutely right. She doesn't want that.
|
|
|
|
|
|
OK, so? I gave him the quick and dirty method. From his original post, it didn't sound he had much knowledge, actually none, of the intricacies of creating his own controls to do this.
|
|
|
|
|
The Original post was from me. And yes, I don't have much knowledge with creating vb.net 1.1 controls, but it doesn't mean I can't figure it out by searching the web for information from nice people like you. I thought I would post a link to some more detailed info for others to use.
Have a great day!
ms-hytech
|
|
|
|
|
Hi all!
How can I catch the event whenever a user maximizes a form by clicking on the maximize button?
PS: I don't seem to have to worry about users resizing the form manually.
Thanks in advance!
Regards,
Jensen
|
|
|
|
|
There is no "maximize event". The form is just told to resize itself, which will fire the form's Resize events. You can then check the form's WindowState property.
|
|
|
|
|
I cant seem to be able to catch the resize event correctly.
Private Sub pnl_Chart_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles pnl_Chart.Resize
|
|
|
|
|
If you maximize a Form, its the Form that gets resized; the Controls on it may or may not
resize. Why do you use pnl_Chart_Resize??
Luc Pattyn [Forum Guidelines] [My Articles]
this weeks tips:
- make Visual display line numbers: Tools/Options/TextEditor/...
- show exceptions with ToString() to see all information
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
why do i!? my mistake!!! sryy
thanks for highlighting that!
Regards,
Jensen
|
|
|
|
|
Hi,
I'd like to know how to get the currently selected file in Windows. So if the user selects a file, my program copies/renames it etc..
--Zaegra--
|
|
|
|