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 


[VB2008]Adding buttons within program.

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
jason744
Grandmaster Cheater
Reputation: 0

Joined: 25 Nov 2007
Posts: 638

PostPosted: Mon Mar 10, 2008 1:20 pm    Post subject: [VB2008]Adding buttons within program. Reply with quote

First of all, don't tell me to use C++ or C# and stuff, since I'm working on that but not succeding Crying or Very sad

Right, so I'm asking how you would add a button on to the program, after compiling.

Also, how you would link it to a program path using a textbox.
Back to top
View user's profile Send private message
OSIRIS
Grandmaster Cheater
Reputation: 0

Joined: 27 Aug 2006
Posts: 654

PostPosted: Mon Mar 10, 2008 1:26 pm    Post subject: Reply with quote

1) Find where the button is located.
2) Drag it and Drop it onto and open space in the forum.


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

Joined: 01 Aug 2007
Posts: 1257

PostPosted: Mon Mar 10, 2008 1:27 pm    Post subject: Reply with quote

mageknight wrote:
1) Find where the button is located.
2) Drag it and Drop it onto and open space in the forum.




Everyone is stealing my idea lol...

I'm working on an email checker for my app too Rolling Eyes

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

Joined: 27 Aug 2006
Posts: 654

PostPosted: Mon Mar 10, 2008 1:29 pm    Post subject: Reply with quote

Im already done mine.

1. Make your own sub

Code:

Private Sub email(ByVal FirstString)

        Dim SecondString = "@"
        Dim position = InStr(1, FirstString, SecondString)

        If position = 0 Then

            MsgBox("Not a Valid email address: There was No @ Sign")

        End If
    End Sub


2. Make a button.
Code:

Dim FirstString = TextBox1.Text
        Call email(FirstString)
Back to top
View user's profile Send private message
jason744
Grandmaster Cheater
Reputation: 0

Joined: 25 Nov 2007
Posts: 638

PostPosted: Mon Mar 10, 2008 1:34 pm    Post subject: Reply with quote

You don't get it.

What I meant is adding a new button on to the Form After compilation.

So adding a button in the program it self. without VB.

And Andrewman I'm gonna try improving yours wether you like it or not. Yay?
Back to top
View user's profile Send private message
Symbol
I'm a spammer
Reputation: 0

Joined: 18 Apr 2007
Posts: 5094
Location: Israel.

PostPosted: Mon Mar 10, 2008 1:54 pm    Post subject: Reply with quote

He means dynamically, in run-time.
I don't know how to do that on VB though. Surprised

If its .NET, it should be probably something like
<ControlName> Lol = new <ControlName>(); //Declare and create
Lol.Text = "bla.."; //Change text
this.Controls.Add(bla); //Add control.
Back to top
View user's profile Send private message
jason744
Grandmaster Cheater
Reputation: 0

Joined: 25 Nov 2007
Posts: 638

PostPosted: Mon Mar 10, 2008 1:59 pm    Post subject: Reply with quote

I have one last question:
After I close a form, the checked radiobuttons always go back to default, so I'm wondering how the code would be like in an apply button.
Back to top
View user's profile Send private message
Symbol
I'm a spammer
Reputation: 0

Joined: 18 Apr 2007
Posts: 5094
Location: Israel.

PostPosted: Mon Mar 10, 2008 2:01 pm    Post subject: Reply with quote

Save the settings to the registry/file. (for settings I prefer using registry)
Back to top
View user's profile Send private message
jason744
Grandmaster Cheater
Reputation: 0

Joined: 25 Nov 2007
Posts: 638

PostPosted: Mon Mar 10, 2008 2:07 pm    Post subject: Reply with quote

Anyway without using external data?
Back to top
View user's profile Send private message
AndrewMan
Grandmaster Cheater Supreme
Reputation: 0

Joined: 01 Aug 2007
Posts: 1257

PostPosted: Mon Mar 10, 2008 2:23 pm    Post subject: Reply with quote

mageknight wrote:
Im already done mine.

1. Make your own sub

Code:

Private Sub email(ByVal FirstString)

        Dim SecondString = "@"
        Dim position = InStr(1, FirstString, SecondString)

        If position = 0 Then

            MsgBox("Not a Valid email address: There was No @ Sign")

        End If
    End Sub


2. Make a button.
Code:

Dim FirstString = TextBox1.Text
        Call email(FirstString)


That just tells you if you entered an @ sign or not. Doesn't open any URL.

_________________
Back to top
View user's profile Send private message
squrrilslayer
Master Cheater
Reputation: 0

Joined: 26 Dec 2006
Posts: 323

PostPosted: Tue Mar 11, 2008 6:34 am    Post subject: Re: [VB2008]Adding buttons within program. Reply with quote

jason744 wrote:
Right, so I'm asking how you would add a button on to the program, after compiling.

Code:

*code to trigger making of new button (eg, keydown events or logic events)*
Private NewButton As Button
NewButton = New NewButton
with Newbutton
.text = "Button"
.left = 50 '50 pixels along on X axis from LEFT of window
.top = 50 '50 pixels along on Y axis from Top of window
.height = 20 '20 pixels high
.width = 40 '40 pixels wide
end with


jason744 wrote:
Also, how you would link it to a program path using a textbox.

Code:

Private Sub NewButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles NewButton.Click
Dim AppPath as string
AppPath = txtTextbox.text 'takes text from textbox and stores it into AppPath
'from here on, im not to sure
Dim FileNum As Integer = FreeFile()
FileOpen(FileNum, AppPath, OpenMode.*?*) 'OpenMode i forgot what type...
'i dont know much more from here on...
End Sub


hope this helps a bit.

_________________
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
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