Hi,
I'm way new to Visual Basic and I just done some simple things like MsgBox buttons and so on.
I know the code
Me.Location and ofc the If statement and other codes...
whatever, I'm using the 2008 express edition and I want a lable be moved each time you press the button "<-" 5 [or more/less] pixels to it's left. The same with the "->" button (ofc in the right direction then^^)
How does that works? I tried some codes but they moved all the time.
Please report errors in the Staredit.Network forum.
Ive never used 2008, cause VB6 is sexier than all but vb 6 it would be
Me.Left = Me.Left - 5
Dunno if 2008 uses Left and top still
Riney#6948 on Discord.
Riney on Steam (
Steam)
@RineyCat on Twitter
-- Updated as of December 2021 --
Make sure you substitue "Me" with "Label1" or whatever name you've given your label so it looks like:
Label1.left = label1.left -5
Label1.left = label1.left +5
None.
Yea that too, I think Me only worked with frm's anyway
But it would be lblWhatever.Left or vb6 would shit on your code ;o
Riney#6948 on Discord.
Riney on Steam (
Steam)
@RineyCat on Twitter
-- Updated as of December 2021 --
It worked fine. Thanks.
Well, one more question (google failed again)
Is it possible to run actions always? Without any condition.
I'm using Microsoft Visual Basic 2008 Express Version, a Forms application.
Please report errors in the Staredit.Network forum.
I suppose if you did a loop in a on_Load() you could
Riney#6948 on Discord.
Riney on Steam (
Steam)
@RineyCat on Twitter
-- Updated as of December 2021 --
Quote from name:Dark_Marine
I suppose if you did a loop in a on_Load() you could
I'm new to visual basic... whats the code for a loop, and where exactly should I place the loop? k thx.
Please report errors in the Staredit.Network forum.
Private Sub Form_Load()
Do while X <> Y
Code
Loop
Exit Sub
As long as you dont make Y possible, itll loop as long as the program is going. Now if you WANT it to stop, make X = Y
Remember this is VB6 code, however as stated it may work with VB2008 as well.
EDIT: Or to reduce lag (If there is any to begin with) You could always run a timer
Private Sub Status_Timer()
If ConnectToServer = True Then
If Not AllDataReceived Then
Call SendData("stuff" & END_CHAR)
Else
lblOnline.Caption = "Online"
lblOnline.ForeColor = vbGreen
End If
Else
picNews.Caption = "Could not connect. The server is offline."
lblOnline.Caption = "Offline"
lblOnline.ForeColor = vbRed
End If
End Sub
Heres some Code I stole from my RPG that uses a timer named Status, every time Status reaches 0, it resets its count to whatever you set, and runs the specified actions.
Riney#6948 on Discord.
Riney on Steam (
Steam)
@RineyCat on Twitter
-- Updated as of December 2021 --
That's why you should just do it in Visual C++, its better than VB.
None.
That's why you should just do it in Visual C++, its better than VB.
Then why not go all the way and just do it in C++.
None.
That's why you should just do it in Visual C++, its better than VB.
Then why not go all the way and just do it in C++.
Visual C++ and C++ are almost the same except Visual C++ gives you a GUI to work in. So it wouldn't matter.
None.
That's why you should just do it in Visual C++, its better than VB.
Then why not go all the way and just do it in C++.
Visual C++ and C++ are almost the same except Visual C++ gives you a GUI to work in. So it wouldn't matter.
The point is, he is using Visual Basic. So answer the question (which has been answered), or don't post worthless replies.
That's why you should just do it in Visual C++, its better than VB.
Then why not go all the way and just do it in C++.
Visual C++ and C++ are almost the same except Visual C++ gives you a GUI to work in. So it wouldn't matter.
The point is, he is using Visual Basic. So answer the question (which has been answered), or don't post worthless replies.
Giving some advice to switch over to a faster, compiled language is worthless? Damn, you guys are whack.
None.
That's why you should just do it in Visual C++, its better than VB.
Then why not go all the way and just do it in C++.
Visual C++ and C++ are almost the same except Visual C++ gives you a GUI to work in. So it wouldn't matter.
The point is, he is using Visual Basic. So answer the question (which has been answered), or don't post worthless replies.
Giving some advice to switch over to a faster, compiled language is worthless? Damn, you guys are whack.
VB has been KNOWN to be an easier language to write with, and it is up to the OP weither or not to use it.
Riney#6948 on Discord.
Riney on Steam (
Steam)
@RineyCat on Twitter
-- Updated as of December 2021 --
Quote from name:Dark_Marine
That's why you should just do it in Visual C++, its better than VB.
Then why not go all the way and just do it in C++.
Visual C++ and C++ are almost the same except Visual C++ gives you a GUI to work in. So it wouldn't matter.
The point is, he is using Visual Basic. So answer the question (which has been answered), or don't post worthless replies.
Giving some advice to switch over to a faster, compiled language is worthless? Damn, you guys are whack.
VB has been KNOWN to be an easier language to write with, and it is up to the OP weither or not to use it.
Easier doesn't mean better
And you're right. Just trying to give some advice on a better language though.
None.
Quote from name:Dark_Marine
That's why you should just do it in Visual C++, its better than VB.
Then why not go all the way and just do it in C++.
Visual C++ and C++ are almost the same except Visual C++ gives you a GUI to work in. So it wouldn't matter.
The point is, he is using Visual Basic. So answer the question (which has been answered), or don't post worthless replies.
Giving some advice to switch over to a faster, compiled language is worthless? Damn, you guys are whack.
VB has been KNOWN to be an easier language to write with, and it is up to the OP weither or not to use it.
Easier doesn't mean better
And you're right. Just trying to give some advice on a better language though.
Actually, this was my point. Visual C++ is easier to use than C++ because of the GUI, but it still isn't as fast or as good, so I was saying, 'Well, why not go all the way for good, or all the way for ease?'
None.
stop that mass quotes...
actually, if I start debugging NOTHING happens now!
Please report errors in the Staredit.Network forum.