Re: Problem with module and form load slow
>>> add periods to names <<<
Did you read the line above????????????????
Form2TextboxText becomes Form2.Textbox.Text
Form2TrackBar2Value becomes (you can figure it out, can't you?)
If you change this code using the hints above it will get you started.
Code:
Private Sub setTrackBar()
If Not IsNumeric(Form2TextboxText) Then
'textbox is not number
Debug.WriteLine("NOT A NUMBER")
Exit Sub
End If
Dim asDecimal As Decimal = Decimal.Parse(Form2TextboxText)
Dim asInteger As Integer = Convert.ToInt32(Math.Ceiling(asDecimal))
Select Case Form2TextboxText 'textbox is string
Case "1.0" 'this is string
Form2TrackBar2Value = 1000
Case Else
If asInteger > 0 AndAlso asInteger <= 999 Then
Form2TrackBar2Value = asInteger
Else
Debug.WriteLine("number not between 1 and 999 inclusive")
End If
End Select
End Sub
and for the record, we don't 'need' or 'have' to do anything. The problem isn't us.
Re: Problem with module and form load slow
@Oblio: Your post was the same when I HAVE already tried out using with your code so DO NOT repost with the old same crap again. Your code shows nothing from my code. So now I am going to stick with my code. I am trying to find any situations to get the code successful but I have no luck so far...
I think its best for you guys to read it again what's going on....
When I type the value numbers on textbox and if I type higher than 1.0 which it greater than 1000 for trakbar value, I received the textbox.showdialog which it works great BUT when I try to move the trackbar value to the lower value, I received the textbox.showdialog immediately everytime. I am not over the limit of the strings. And when I type the lowest strings numbers like 9, the textbox.showdialog also display. See the trouble I has....
You guys need to reread on my 55th post carefully as there is NO need to repeat it again, I don't want to say it again, again, again, again and again as it getting on my nervous and I'm getting boring of sayin this again.
Code
Code:
If Val(Form2.Textbox.Text) <= 999 Then
Form2.TrackBar2.Value = Val(Form2.Textbox.Text)
End If
If Form2.Textbox.Text = "1.0" Then
Form2.TrackBar2.Value = 1000
End If
If Form2.Textbox.Text > 1.0 Then
Form2.TrackBar2.Value = 1000
Textbox.ShowDialog()
End If
End If
However, I don't want to write the longest code to make my form slowing down like this.....
Code:
If Form2.Textbox.Text = 1.0 Then
Form2.TrackBar2.Value = 1000
Textbox.ShowDialog()
End If
End If
If Form2.Textbox.Text = 2.0 Then
Form2.TrackBar2.Value = 1000
Textbox.ShowDialog()
End If
End If
If Form2.Textbox.Text = 3.0 Then
Form2.TrackBar2.Value = 1000
Textbox.ShowDialog()
End If
End If
If Form2.Textbox.Text = 4.0 Then
Form2.TrackBar2.Value = 1000
Textbox.ShowDialog()
End If
End If
ETC.....
This is why I am HERE to require for some help, because the strings is greater than or equal to the following number but I CANNOT move the trackbar value or type any of the less numbers.
I don't want to write from 1.0 to 10 which is the crazy job to write the longest numbers. To write If Form2.Textbox.Text > 1.0 Then is much quicker than the longest job to write but I am having trouble with the loops.
I need this to get fix asap.
Thanks,
Mark
Re: Problem with module and form load slow
where would 1.25 go? just for argument's sake
Re: Problem with module and form load slow
What 1.25 are you talking about???????????
Re: Problem with module and form load slow
All you had to do was change the names of the variables. I even gave an example of how. I think it was a grand total of 10 "."'s you needed to add.
My 'cr*p' works, how about yours?
You are correct, I didn't do it like you did, but why would I? Stick with your code, no one cares.
In all of your posts, in several forums, you have demonstrated that
1. you need a class in simple programming concepts
2. you are rude
3. you use obscene language which I believe has gotten you banned from several forums (i.e. MSDN, VBForums)
So, good luck finding someone to help you.
Re: Problem with module and form load slow
Quote:
Originally Posted by mark103
@Oblio: Your post was the same when I HAVE already tried out using with your code so DO NOT repost with the old same crap again. Your code shows nothing from my code. So now I am going to stick with my code. I am trying to find any situations to get the code successful but I have no luck so far...
I think its best for you guys to read it again what's going on....
When I type the value numbers on textbox and if I type higher than 1.0 which it greater than 1000 for trakbar value, I received the textbox.showdialog which it works great BUT when I try to move the trackbar value to the lower value, I received the textbox.showdialog immediately everytime. I am not over the limit of the strings. And when I type the lowest strings numbers like 9, the textbox.showdialog also display. See the trouble I has....
You guys need to reread on my 55th post carefully as there is NO need to repeat it again, I don't want to say it again, again, again, again and again as it getting on my nervous and I'm getting boring of sayin this again.
Code
Code:
If Val(Form2.Textbox.Text) <= 999 Then
Form2.TrackBar2.Value = Val(Form2.Textbox.Text)
End If
If Form2.Textbox.Text = "1.0" Then
Form2.TrackBar2.Value = 1000
End If
If Form2.Textbox.Text > 1.0 Then
Form2.TrackBar2.Value = 1000
Textbox.ShowDialog()
End If
End If
However, I don't want to write the longest code to make my form slowing down like this.....
Code:
If Form2.Textbox.Text = 1.0 Then
Form2.TrackBar2.Value = 1000
Textbox.ShowDialog()
End If
End If
If Form2.Textbox.Text = 2.0 Then
Form2.TrackBar2.Value = 1000
Textbox.ShowDialog()
End If
End If
If Form2.Textbox.Text = 3.0 Then
Form2.TrackBar2.Value = 1000
Textbox.ShowDialog()
End If
End If
If Form2.Textbox.Text = 4.0 Then
Form2.TrackBar2.Value = 1000
Textbox.ShowDialog()
End If
End If
ETC.....
This is why I am HERE to require for some help, because the strings is greater than or equal to the following number but I CANNOT move the trackbar value or type any of the less numbers.
I don't want to write from 1.0 to 10 which is the crazy job to write the longest numbers. To write
If Form2.Textbox.Text > 1.0 Then is much quicker than the longest job to write but I am having trouble with the loops.
I need this to get fix asap.
Thanks,
Mark
I don't like to get personal here, but you are telling us to "read your posts". Yet, you are not reading any of the replies to your posts. I understand that you need help but you need to understand but in order for us to help you, you need to help yourself.
You have been told no less than 6 times what the problem is. You have been old more than ten times that you cannot compare a string to a number i.e If Textbox1.Text > 1.0 and you have completely ignored us.
So if you have indeed read more than the first two words in this post please answer the following questions:
- Why can you not use oblio's code?
- Which part of use Float.Parse or Integer.Parse instead of String > 1.0 do you not understand?
- Are you just waiting for some sucker to come along and post the code for you so all you have to do is copy and paste it?
- What is the code modelling? What real world situation is it mimicking; if any? We may be able to suggest an even faster algorithm than the one you are already using.
If you cannot answer these questions, I see little point sticking around and helping you. I have not reported you for the language you used in your previous posts, so I suggest you remove it before a moderator stumbles upon it and you get ousted from this forum too.
If you work with us you will solve the problem. If you work against us you will get nowhere.
P.s: I think it strange that the quality of English in your posts has reduced significantly since your first post. May I suggest that you cease pretending to be a non-English speaker. :wave:
Re: Problem with module and form load slow
I'm with visualAd here: either learn to help yourself by actually reading and trying what members has posted, or you can just get banned.
I think this is the same question before that got you banned, and yet you are acting the same as before. Either Mark here needs to take a hint, or us (the ones who are trying to help him, even a small amount) should take a hint and just leave this thread to die.
Sure, it's nice and all trying to help someone, but when it's getting this far and there are no results at all, and bad language is being used by the person starting the thread, it's best just to ignore the OP in this case.
Anyone with me for boycotting this thread?
Re: Problem with module and form load slow
I think the only way for Mark to get the idea of whats going on with String vs Integer.. is for him to turn on Implicit convertion Error's in the Debug tab of The project window...
Mark.... click on 'My project under the project/Solution explorer on the right ...
Click on the 'Debug' tab ...
and adjust the Condition Notifications as follows..
http://i141.photobucket.com/albums/r...convertion.jpg
Once you resolve the Implicit conversion errors.. you should understand what over half of the posts on this thread are trying to explain to you....
That's about all i'm prepared to add to this thread...
Gremmy...
Re: Problem with module and form load slow
Quote:
Originally Posted by mark103
What 1.25 are you talking about???????????
If someone can enter 1-999, and 1.0 is special, as is 1.1 (from your example) and your code worked perfectly.
What happens if I enter 1.25 into your textbox? What SHOULD your app do?
Re: Problem with module and form load slow
My app would popup the message box in order you are typing over the limit. It same for 1.1, I tried to fix it as it works perfectly but the main problem is when I try to move the trackbar value or type the value numbers on textbox, I will receive the textbox.showdialog.
@Gremmy: You didn't come on this thread when I post and required for some help. Did you read on my 62nd post?? I need your help to find the way how we can work together to get my code solve.
I find it hard to fix the problem. That's why I am here to require for some help.
Thanks,
Mark
Quote:
Originally Posted by dglienna
If someone can enter 1-999, and 1.0 is special, as is 1.1 (from your example) and your code worked perfectly.
What happens if I enter 1.25 into your textbox? What SHOULD your app do?
Re: Problem with module and form load slow
what does moving the trackbar have to do with the textbox? :eek: :sick:
Re: Problem with module and form load slow
I know I'll regret this but mark103, why does 1.0 = 1000?
However, try this code.
Code:
If Form2.Textbox.Text.Contains(".") Then
Form2.TrackBar2.Value = 1000
Textbox.ShowDialog()
Else
Try
Me.TrackBar2.Value = Cint(Form2.Textbox.Text)
Catch ex As Exception
MsgBox("Invalid value.")
End Try
End If
Re: Problem with module and form load slow
Quote:
Originally Posted by mark103
@Gremmy: You didn't come on this thread when I post and required for some help. Did you read on my 62nd post?? I need your help to find the way how we can work together to get my code solve.
Errrmmmm... CHECK POST #2 AND #8 ..... I think i was the first to offer assistance to you on this thread ..........
Quote:
Originally Posted by mark103
POST #62
Code:
If Val(Form2.Textbox.Text) <= 999 Then ' Integer to Integer Comparison Correct
Form2.TrackBar2.Value = Val(Form2.Textbox.Text)
End If
If Form2.Textbox.Text = "1.0" Then ' String to String Comparison Correct
Form2.TrackBar2.Value = 1000
End If
If Form2.Textbox.Text > 1.0 Then ' String to Decimal Comparison WRONG
Form2.TrackBar2.Value = 1000
Textbox.ShowDialog()
End If
End If
Code:
If Form2.Textbox.Text = 1.0 Then ' String to Decimal Comparison WRONG
Form2.TrackBar2.Value = 1000
Textbox.ShowDialog()
End If
End If
If Form2.Textbox.Text = 2.0 Then ' String to Decimal Comparison WRONG
Form2.TrackBar2.Value = 1000
Textbox.ShowDialog()
End If
End If
'...............
So do you see what i'm trying to expain ???????
P.S. You are managing to insult almost all of the senior members who post in the VB6 forum... Some of us have been coding from before you were born, and know what we talking about... Just think about that before you make your next post..
Re: Problem with module and form load slow
Or, someone might suggest that this thread be locked for wasting our time.
Re: Problem with module and form load slow
Yes please lock this thread
and shoot the op
jeez, 3 years in VB and you work like that? OMFG!!!!!!!!!!!!
I wonder how you do simple database transactions. They must be horrid.