|
VB8 is called "VB.NET". You start with a good entry-level book, or with the tutorials on the Microsoft[^] site.
Bastard Programmer from Hell
if you can't read my code, try converting it here[^]
|
|
|
|
|
Or there are plenty of tutorials on this little place we call CodeProject.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
The program draws a line like the line tool in paint over a picture box sets the line from point a to point b. But in paint for instance the line in visible as you are drawing it from point a to b. In this case the line is only visable after you let the mouse go at point B.
So you can't see the line until after you have it in place.
I would like to see the line being made instead of just after i click a to b.
|
|
|
|
|
And this means exactly what to me?
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
|
0
In a visual basic 2008 console application, I need to split up some an extrmely large method into lgocial groups based upon the new logic I need to add. Thus I have the following questions:
1. If i keep the code the way it basically exists in a large method, how can I make the code go to the end of the method? Basically from my if statment certain code would happen and then I want to go to the end of the method.
2. From the place where I would do the if statement, I would break the large method into two methods. From this if statement, i would do the new code or setups the rest of the code into this new method using most of the existing logic. However when I setup this new method, how would I know what objects I need to pass to the new method?
|
|
|
|
|
This problem is not language dependent and it is something we have all had to face at one time or another.
- Bad idea, it means adding more if statements or even using a (shudder)
goto . - Look at your design and break it into logical sections, each of which is self contained. You will easily see which objects are used within each section. That gives you your new methods.
One of these days I'm going to think of a really clever signature.
|
|
|
|
|
is there code in vb.net 2008 to say to break out of a loop and go to the end of the method? if so waht is it?
I am a C# programmer and I need to make this change to a VB 2008 application.
|
|
|
|
|
|
dcof wrote: If i keep the code the way it basically exists in a large method, how can I make the code go to the end of the method?
Methods should really not be very large. You need to think about maintainability and readability. If you are lumping everything into one large method, you could start running the risk of having a difficult time debugging the method if something were to go wrong. It does not hurt to look into refactoring the code
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
Hello,
I've been thinking about this one for a long time. The following code always gives me an OverflowException when I run it:
Dim x As Byte = 200
Dim y As Byte = 100
Dim z As Byte = (x + y) Mod 256
I know the problem is the fact that I'm adding two byte values together, which is exceeding the limits of the data type in the intermediate step (x + y) before the modulo 256 is performed and the result assigned to z. I can fix it if I do this:
Dim x As Byte = 200
Dim y As Byte = 100
Dim z As Byte = (CInt(x) + CInt(y)) Mod 256
But that just seems like a lot of bother to achieve something that should be simple. One of my latest projects involved a lot of arithmetic like this and I can't help but wonder whether or not there's a better way of performing pure byte arithmetic with modulo operations without resorting to declaring larger integers all over the place or casting to and from them in code.
SixOfTheClock
A programming language is to a programmer what a fine hat is to one who is fond of fancy garden parties. Just don't try wearing any .NET language on your head. Some of them are sharp.
modified 17-Sep-12 5:21am.
|
|
|
|
|
Nope. That's the simplest and fastest way to do it. Well, it'll be a tiny bit faster if you just used integers to begin with.
|
|
|
|
|
Well, couldn't have asked for it any clearer than that! Thank you.
A programming language is to a programmer what a fine hat is to one who is fond of fancy garden parties. Just don't try wearing any .NET language on your head. Some of them are sharp.
|
|
|
|
|
I have created an updater, but I want a way to hide the exe being downloaded, is this possible?
Thanks,
Bryan
modified 16-Sep-12 22:49pm.
|
|
|
|
|
Hi Bryan, just to let you know that nobody here is going to write the code and paste it here for you for two reasons:
1. We're here because we want to help people with specific questions about programming, not take on programming tasks on your behalf. You'll need to hire someone for that.
2. That kind of vagueness makes it impossible for anybody reading your question to know what you're talking about, let alone start to help you out. Do you mean hide the downloaded executable file on-disk? There's no way we can know for sure to give a useful answer unless you're more specific. Then and only then can we help you out.
I direct you to the "How to get an answer to your question" message posted by Chris Maunder. It's up at the top of the message board there. Good luck with your project.
A programming language is to a programmer what a fine hat is to one who is fond of fancy garden parties. Just don't try wearing any .NET language on your head. Some of them are sharp.
|
|
|
|
|
Fixed it, Sorry about that.
|
|
|
|
|
Bryan Muschter wrote: I want a way to hide the exe being downloaded
Why? That sounds rather shady and malicious...
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
Im making a program to check emails and I want it to download updates.
|
|
|
|
|
Hi,
I have two forms. In form1 I use the code
frm2.PrintPreviewControl1.InvalidatePreview() But it won't update the control
Why?
I use now, as a work around, a timer
in that timer I use
PrintPreviewControl1.InvalidatePreview()
timer1.enable = false
and in the calling control I use
timer1.enable = false
And that work fine but thats not the correct way I think
Jan
|
|
|
|
|
i want to know what is the code in visual basic 8 that will examine the shape of a number FROM DIGIT TO DIGIT
example
i have the number 1733
1-7 is an anscendig distance i name "U"
7-3 is descending distance i name "D"
3-3 is equal distance i name "Q"
so the shape of the number is "UDQ"
thank you
george
|
|
|
|
|
memas63 wrote: what is the code
So you have not actually tried anything or read the "How to ask a question" message?
Sounds to me like you just need to write a couple of if statements. How is this a problem?
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
i dont know how to start i am 63 years old
thank you
|
|
|
|
|
Reading the documentation helps. This[^] will tell you how to use an if statement.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|
|
i read the example but i want to know how i use the if and then if is a number from one digit to the other
make me the start from the first digit to the second and i will try the rest
thank you
|
|
|
|
|
You cannot iterate over a number. You will have to convert the number to a string and then iterate over the string converting each character to a number and then comparing them
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
Sometimes it takes a lot of work to be lazy
Please stand in front of my pistol, smile and wait for the flash - JSOP 2012
|
|
|
|