|
It's only an example.
In a tape measure would be 3/4 of an inch.
And Yes, it would also be 6/8 but reduce it to the LCD would be 3/4.
That's the only problem that I am having, using the fractional portion to render an answer in fractions. There is a site called Break Tru, and they are selling a fraction and decimal program, but can't get the code for that program. For what I want it for is for several fraction programs.
Does your home have heat oil. Then you would know that the tank only reads in fractions. I created a program that will give you how much oil you have in your tank and the amount you need to refill it, and how much it will cost you, and the amount of tax and a grand total. I also added on the form a fraction to decimal converter, which is the only i can offer under that program because I don't know how to render the fraction resulting in fractions. If you know of anything or a book that I can purchase in algorithm please let me know. I am up to programing almost in calculus. LOL
Thanks Bro for your help.
|
|
|
|
|
|
If you go to Jesse Liberty's site
http://www.libertyassociates.com/pages/book_edit.htm[^]
and download the source code for Programming C# 3rd edition then you'll find a (simplified) Fraction class that you could perhaps adapt for your purposes. It's in the Ch 6 folder.
Kevin
|
|
|
|
|
Re: Jesse Liberty - Programming C# - he has a VB .NET version of the same book with source code so you could download the source for that one instead.
Kevin
|
|
|
|
|
I appreciate for your info. I'll try Jesse's book.
bravo659
|
|
|
|
|
This sounds more like an issue with Math than it is VB .NET
It's just a matter of making the right calculations to display the appropriate whole number.
|
|
|
|
|
Oh no, i know how to calculate fractions without a problem, is that how do you use the textboxes to display fractions. That's the problem.
I've seen it done through C#, but I tried to use it in VB.Net, and it doesn't work. So the solution is in progrmming in VB.Net. That's all.
I appreciate for your feedback.
|
|
|
|
|
Hi All,
How to send a mail using fax server (using fax machine). What are the prerequists to develop the application. This I need to develop using Visual Basic.Net.
Thanks in advance.
Regards
DBKREDDY
|
|
|
|
|
|
Here is a control on a winform.
I want to create an array of this control.
In vb 6.0 , we just copy and paste the control, the compiler will create array of control automautically.
However, we could not do so in vs.net.
Maybe friends will teach me.
Thanks!
|
|
|
|
|
<br />
' For array of text boxes<br />
Dim txtBoxArray as TextBox()<br />
Dim x as Integer<br />
For Each ctl As Control In Me.Controls<br />
If TypeOf ctl Is TextBox Then<br />
ReDim Preserve txtBoxArray(x)<br />
txtBoxArray(x) = ctl<br />
x += 1<br />
EndIf<br />
Next<br />
You can access them like txtBoxArray(0), txtBoxArray(1), ect...
|
|
|
|
|
Do array of controls in your code
Contols like any object in .net
so you can create control of TextBoxs for example
Dim textBoxs(5) As TextBox
and access each control via index
MCAD
|
|
|
|
|
Is it possible to activate a winform using its handle?
For example, if you know the handle (intptr) and the window is minimized or behind another window. Is it possible to Activate the winform using that handle?
|
|
|
|
|
you could use interop to use the user32 dll
example here http://www.codeproject.com/vb/net/ActivateSingleAppInstance.asp
|
|
|
|
|
Is there a way without doing it with using the WinHelper? I've seen that link before...but I'm trying to look for another solution without using the WinHelper.
Any suggestions?
|
|
|
|
|
You don't have to put that stuff in it's own class. You can just put the same code into your form code if you want. But, keeping all of your Win32 wrappers in a seperate class like that makes it very easy to reuse without having to copy and paste gobs of code everywhere.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi all,
I have 20 or so VB6.0 macros, including an AutoExec macro that I use in Word. Once in a while Users complain that as they type characters into a new, or existing doc, the characters are slow to appear on the screen. My macros only run at the opening of new documents, or the saving/closing of documents. All macros are called by Users via function keys. Only AutoExec is run when Word opens (if I understand the docs correctly). So I "think" none of my code is actually running while a User is in a new, or existing doc, and typing away.
What object do I test to see the current state of the char buffer that Word stores the characters as the User types them in ? I assume the chars are stored somewhere in an object in Word, question is what is it and can I access it and flush it to the screen if it's getting too big ?
Any ideas what is going on here ?
Ed
|
|
|
|
|
Ed Mansky wrote:
What object do I test to see the current state of the char buffer that Word stores the characters as the User types them in ?
There isn't one. The keystrokes are queued up in Word's window message queue waiting to be processed.
Since the message queue isn't being processed very quickly, the keystrokes aren't getting to the application code, so it looks like it's dragging. This can be caused by your macro code hanging up in a long running loop or some other code, even in Word itself, that is taking all this time to process.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Any way to query and/or flush the message queue of pending keystrokes ?
|
|
|
|
|
Nope.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Tell them to turn off background auto-save.
Absolute faith corrupts as absolutely as absolute power
Eric Hoffer
All that is necessary for the triumph of evil is that good men do nothing.
Edmund Burke
|
|
|
|
|
Thanks, I hadn't thought of that.
|
|
|
|
|
I have created a VB.Net application running on Win XP prof and when I run the program, all seems fine, but all of a sudden the program seems to shutdown. I have added Try-catch statements to all of my functions hoping to catch where it is failing, but no error message comes up. Can anyone help me with this?
Thanks
|
|
|
|
|
The only thing you can do is instrument your code and have it log what it's doing, like entering functions, function parameter values and return values. You'll get a better idea of where this sudden quit is occuring.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Having trouble deciphering the following code. Am I leaving something out or do I need to subtract something or am I way off in left field? Bold area is my main problem at this moment. Thanks
Private Sub Number_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Number.TextChanged
Number.MaxLength = 12
Dim Mystr As String
Dim ok As Boolean = (Number.IndexOf("-") = 3 And Number.LastIndexOf("-") = 7)
If Number.Text.Length = 3 OrElse Number.Text.Length = 7 Then
Number.Text = Number.Text & "-"
Number.Select(Number.Text.Length, 0)
End If
Mystr = Format(222 - 22 - 2222, "###-###-####")
If Number.Text.Length = 12 Then
Number.Visible = True
End If
End Sub
Believe me guys, I am totally confused.
|
|
|
|