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 Previous  1, 2
 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
killersamurai
Expert Cheater
Reputation: 0

Joined: 10 Sep 2007
Posts: 197
Location: Colorado

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

Naablet wrote:

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


One thing is the load event will never happen. You forgot to add the event.
Code:

frmMain.Load += new System.EventHandler(Me.frmMain_Load);


You can always put frmMain out side of Form1_Load. That way, you can access frmMain inside of frmMain_Load

Code:

 Private frmMain As New Form()
 Private Sub button1_Click(ByVal sender As Object, ByVal e As EventArgs)
   
     frmMain.Height = 400
     frmMain.Width = 600
     frmMain.Top = 0
     frmMain.Left = 0
     AddHandler frmMain.Load, AddressOf Me.frmMain_Load
   
     frmMain.Show()
 End Sub

 Private Sub frmMain_Load(ByVal sender As Object, ByVal e As EventArgs)
     Dim txtTest As New TextBox()
     txtTest.Name = "test"
     txtTest.Location = New Point(0, 0)
     txtTest.Size = New Size(50, 20)
     frmMain.Controls.Add(txtTest)
 End Sub
Back to top
View user's profile Send private message
XxOsirisxX
Grandmaster Cheater Supreme
Reputation: 0

Joined: 30 Oct 2006
Posts: 1597

PostPosted: Wed Feb 13, 2008 12:55 pm    Post subject: Reply with quote

Could i ask why you need to "remplace" the "Me" from the original form to a outside class?
_________________

Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8588
Location: 127.0.0.1

PostPosted: Wed Feb 13, 2008 4:34 pm    Post subject: Reply with quote

Naablet wrote:
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


Holding grudges based on your own fuck-ups is not going to help you much here. Learn how to respond when needed and leave topics alone at other times. I've banned you twice with the suggestion of others because you spam. You place comments in threads that don't need it and you go off-topic a lot as well. I'm not resetting your warn just because you are unbanned now. It will expire over time. It's there for a reason.

If you are worried about getting banned again, heres a pro-tip for you: Follow the rules.

_________________
- 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: Thu Feb 14, 2008 2:54 am    Post subject: Reply with quote

Wiccaan wrote:
.


sorry

_________________
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 Previous  1, 2
Page 2 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