Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


{help plx} how do i add a textfield?
Goto page 1, 2  Next
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
NINTENDO
Grandmaster Cheater Supreme
Reputation: 0

Joined: 02 Nov 2007
Posts: 1371

PostPosted: Tue Feb 12, 2008 10:30 am    Post subject: {help plx} how do i add a textfield? Reply with quote

Code:
Dim frmMain as form
frmMain.height=400
frmMain.width=600
frmMain.top=0
frmMain.left=0

dim txtuser as textbox
'How do i add this textbox to frmMain?

I really need help on this one ;-)

_________________
Intel over amd yes.
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger
AtheistCrusader
Grandmaster Cheater
Reputation: 6

Joined: 23 Sep 2006
Posts: 681

PostPosted: Tue Feb 12, 2008 11:00 am    Post subject: Reply with quote

txtuser.visible = true
txtuser.load(i think)
txtuser.move(X,Y)
Back to top
View user's profile Send private message
NINTENDO
Grandmaster Cheater Supreme
Reputation: 0

Joined: 02 Nov 2007
Posts: 1371

PostPosted: Tue Feb 12, 2008 11:21 am    Post subject: Reply with quote

masterkert3 wrote:
txtuser.visible = true
txtuser.load(i think)
txtuser.move(X,Y)


I'm using vb 08.
Load does not exist.

_________________
Intel over amd yes.
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger
killersamurai
Expert Cheater
Reputation: 0

Joined: 10 Sep 2007
Posts: 197
Location: Colorado

PostPosted: Tue Feb 12, 2008 11:35 am    Post subject: Reply with quote

This is how you would want to create a new textbox.
Code:

 Dim tx As New TextBox()
 // Do other things here
 Me.Controls.Add(tx)

You can set its properties. Then, you use this(me in vb).Controls.Add(<control>)
Back to top
View user's profile Send private message
NINTENDO
Grandmaster Cheater Supreme
Reputation: 0

Joined: 02 Nov 2007
Posts: 1371

PostPosted: Tue Feb 12, 2008 11:44 am    Post subject: Reply with quote

killersamurai wrote:
This is how you would want to create a new textbox.
Code:

 Dim tx As New TextBox()
 // Do other things here
 Me.Controls.Add(tx)

You can set its properties. Then, you use this(me in vb).Controls.Add(<control>)


thx, It's working very good! However i still can't figure out how to refer to frmMain from itside itself.

Code:
Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        Dim frmMain As New Form
        frmMain.Height = 400
        frmMain.Width = 600
        frmMain.Show()



    End Sub

    Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim txtuser As New TextBox
        Me.Controls.Add(txtuser)
    End Sub

   
End Class

_________________
Intel over amd yes.
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger
XxOsirisxX
Grandmaster Cheater Supreme
Reputation: 0

Joined: 30 Oct 2006
Posts: 1597

PostPosted: Tue Feb 12, 2008 11:24 pm    Post subject: Reply with quote

Sorry, but i don't get what you're asking for about "itside itselft".

So i may be giving a wrong information, but as far i "understand' what you said. I guess is about locate it. So, in that case it may be:

Code:
Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        Dim frmMain As New Form
        frmMain.Height = 400
        frmMain.Width = 600
        frmMain.Show()



    End Sub

    Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim txtuser As New TextBox
        Me.Controls.Add(txtuser)
        txtuser.Location = New System.Drawing.Point(50, 20)
    End Sub


End Class

_________________

Back to top
View user's profile Send private message
NINTENDO
Grandmaster Cheater Supreme
Reputation: 0

Joined: 02 Nov 2007
Posts: 1371

PostPosted: Wed Feb 13, 2008 3:03 am    Post subject: Reply with quote

XxOsirisxX wrote:
Sorry, but i don't get what you're asking for about "itside itselft".

So i may be giving a wrong information, but as far i "understand' what you said. I guess is about locate it. So, in that case it may be:

Code:
Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        Dim frmMain As New Form
        frmMain.Height = 400
        frmMain.Width = 600
        frmMain.Show()



    End Sub

    Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim txtuser As New TextBox
        Me.Controls.Add(txtuser)
        txtuser.Location = New System.Drawing.Point(50, 20)
    End Sub


End Class


When i use me then it will pick form1 instead of frmMain.

_________________
Intel over amd yes.
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger
AtheistCrusader
Grandmaster Cheater
Reputation: 6

Joined: 23 Sep 2006
Posts: 681

PostPosted: Wed Feb 13, 2008 3:49 am    Post subject: Reply with quote

then use frmMain.controls.add(txtuser)
Back to top
View user's profile Send private message
NINTENDO
Grandmaster Cheater Supreme
Reputation: 0

Joined: 02 Nov 2007
Posts: 1371

PostPosted: Wed Feb 13, 2008 4:37 am    Post subject: Reply with quote

masterkert3 wrote:
then use frmMain.controls.add(txtuser)

Nevermind, you wouldn't understand..

_________________
Intel over amd yes.
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger
AtheistCrusader
Grandmaster Cheater
Reputation: 6

Joined: 23 Sep 2006
Posts: 681

PostPosted: Wed Feb 13, 2008 5:02 am    Post subject: Reply with quote

Naablet wrote:
masterkert3 wrote:
then use frmMain.controls.add(txtuser)

Nevermind, you wouldn't understand..

ofcourse lol, i dont know anything about VB 2008
Back to top
View user's profile Send private message
NINTENDO
Grandmaster Cheater Supreme
Reputation: 0

Joined: 02 Nov 2007
Posts: 1371

PostPosted: Wed Feb 13, 2008 5:11 am    Post subject: Reply with quote

masterkert3 wrote:
Naablet wrote:
masterkert3 wrote:
then use frmMain.controls.add(txtuser)

Nevermind, you wouldn't understand..

ofcourse lol, i dont know anything about VB 2008

I wasn't just speaking with you but to all of YOU.

_________________
Intel over amd yes.
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Wed Feb 13, 2008 5:12 am    Post subject: Reply with quote

Naablet wrote:
XxOsirisxX wrote:
Sorry, but i don't get what you're asking for about "itside itselft".

So i may be giving a wrong information, but as far i "understand' what you said. I guess is about locate it. So, in that case it may be:

Code:
Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

        Dim frmMain As New Form
        frmMain.Height = 400
        frmMain.Width = 600
        frmMain.Show()



    End Sub

    Private Sub frmMain_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim txtuser As New TextBox
        Me.Controls.Add(txtuser)
        txtuser.Location = New System.Drawing.Point(50, 20)
    End Sub


End Class


When i use me then it will pick form1 instead of frmMain.


Me obtains the pointer of the current object you are resided in. In this case with the code you showed here, you are inside the Class of Form1. Me will always be equal to Form1 while you are inside that class. You will have to use the real name of the other forms if you want to call things inside them.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
NINTENDO
Grandmaster Cheater Supreme
Reputation: 0

Joined: 02 Nov 2007
Posts: 1371

PostPosted: Wed Feb 13, 2008 5:13 am    Post subject: Reply with quote

I know..
that's kind of the problem? How early are you? but i cannot assign a new class during run now can I. No..

_________________
Intel over amd yes.
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Wed Feb 13, 2008 5:16 am    Post subject: Reply with quote

Naablet wrote:
I know..
that's kind of the problem? How early are you? but i cannot assign a new class during run now can I. No..


Any reason you are getting "snotty" with me? I answered your question. You can't just reset 'Me' to what ever you want. It is a language based variable that is set and handled by the IDE/compiler. No reason to get an attitude because you can't get what you want.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
NINTENDO
Grandmaster Cheater Supreme
Reputation: 0

Joined: 02 Nov 2007
Posts: 1371

PostPosted: Wed Feb 13, 2008 8:10 am    Post subject: Reply with quote

Wiccaan wrote:
Naablet wrote:
I know..
that's kind of the problem? How early are you? but i cannot assign a new class during run now can I. No..


Any reason you are getting "snotty" with me? I answered your question. You can't just reset 'Me' to what ever you want. It is a language based variable that is set and handled by the IDE/compiler. No reason to get an attitude because you can't get what you want.

Yes there is a particual reason.. You dont reset my warnings so i get banned over and over! I dont like that Wink
and thx Smile

_________________
Intel over amd yes.
Back to top
View user's profile Send private message Send e-mail AIM Address Yahoo Messenger MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites