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 


Saving Settings of RadioButtons

 
Post new topic   This topic is locked: you cannot edit posts or make replies.    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 3:17 pm    Post subject: Saving Settings of RadioButtons Reply with quote

This is what I tried and guessed.

Code:
 Private Sub Form2_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
        My.Settings.RadioButton1 = Me.RadioButton1.Checked
        My.Settings.RadioButton2 = Me.RadioButton2.Checked
        My.Settings.RadioButton3 = Me.RadioButton3.Checked
        If Me.RadioButton1.Checked = True Then
            My.Settings.RadioButton1 = True
            My.Settings.RadioButton2 = False
            My.Settings.RadioButton3 = False
        End If
        If Me.RadioButton2.Checked = True Then
            My.Settings.RadioButton2 = True
            My.Settings.RadioButton3 = False
            My.Settings.RadioButton1 = False
        End If
If Me.RadioButton1.Checked = True Then
            My.Settings.RadioButton2 = False
            My.Settings.RadioButton3 = False
            My.Settings.RadioButton1 = True
End IF
    End Sub


Apparently it's not working. can someone help a bit?
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 3:25 pm    Post subject: Reply with quote

What exactly are you trying to do?
_________________
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 3:28 pm    Post subject: Reply with quote

Saving the choice the user made so it doesnt go back to the default I chose in designer properties.
Back to top
View user's profile Send private message
GordonBM
Expert Cheater
Reputation: 0

Joined: 06 Jul 2007
Posts: 205

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

Means it saves the options you set before you close the form.
_________________
maxuer wrote:

:p What is a memory scanner and where I found one?
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 3:38 pm    Post subject: Reply with quote

You could use a textfile or something. So when the form closes it rights the data to it. Then would read it when it loads up.

Something like this.

FORM CLOSE:

Code:
if radio2 is selected then
text2.txt.line2=2
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 3:39 pm    Post subject: Reply with quote

Nevermind, Got it to work. Request for lock.

If anyone whats to know its:

Code:
 Private Sub Form2_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
        My.Settings.RadioButton1 = RadioButton1.Checked
        My.Settings.RadioButton2 = RadioButton2.Checked
        My.Settings.RadioButton3 = RadioButton3.Checked
        My.Settings.Save()
    End Sub


Code:
 Private Sub Form2_Shown(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Shown
        RadioButton1.Checked = My.Settings.RadioButton1
        RadioButton2.Checked = My.Settings.RadioButton2
        RadioButton3.Checked = My.Settings.RadioButton3


    End Sub
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 3:40 pm    Post subject: Reply with quote

I never even knew you could do this with VB 2008. More codes for me to learn Very Happy
_________________
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 3:45 pm    Post subject: Reply with quote

AndrewMan wrote:
I never even knew you could do this with VB 2008. More codes for me to learn Very Happy


Well first you'll have to go to my project, settings tab, make your settings, change them to booleans if its radiobutton or checkbox stuff like that.
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 3:46 pm    Post subject: Reply with quote

All you did was that to save your seetings Shocked

Code:

        My.Settings.RadioButton1 = RadioButton1.Checked
        My.Settings.RadioButton2 = RadioButton2.Checked
        My.Settings.RadioButton3 = RadioButton3.Checked
        My.Settings.Save()
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 3:56 pm    Post subject: Reply with quote

mageknight wrote:
All you did was that to save your seetings Shocked

Code:

        My.Settings.RadioButton1 = RadioButton1.Checked
        My.Settings.RadioButton2 = RadioButton2.Checked
        My.Settings.RadioButton3 = RadioButton3.Checked
        My.Settings.Save()


And the one where you declare the settings are related to the checked property of radiobuttons.

I'm planning on having about 20 more. Oh boy.
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 3:57 pm    Post subject: Reply with quote

jason744 wrote:
mageknight wrote:
All you did was that to save your seetings Shocked

Code:

        My.Settings.RadioButton1 = RadioButton1.Checked
        My.Settings.RadioButton2 = RadioButton2.Checked
        My.Settings.RadioButton3 = RadioButton3.Checked
        My.Settings.Save()


And the one where you declare the settings are related to the checked property of radiobuttons.

I'm planning on having about 20 more. Oh boy.


What are the "20" for?! How are you going to have 20 items lol. Are you making like 20 applications that you open? Just make customizable buttons like I did.
Code:

Button1.Text = InputBox("Set name here")

_________________
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 4:01 pm    Post subject: Reply with quote

That doesn't look as good as radiobuttons. ^^
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 4:13 pm    Post subject: Reply with quote

jason744 wrote:
That doesn't look as good as radiobuttons. ^^


Checkmarks are sexier.

_________________
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 4:18 pm    Post subject: Reply with quote

AndrewMan wrote:
jason744 wrote:
That doesn't look as good as radiobuttons. ^^


Checkmarks are sexier.


I could change it to check marks anytime.
Request Lock.
Back to top
View user's profile Send private message
atom0s
Moderator
Reputation: 205

Joined: 25 Jan 2006
Posts: 8587
Location: 127.0.0.1

PostPosted: Mon Mar 10, 2008 4:52 pm    Post subject: Reply with quote

jason744 wrote:
I could change it to check marks anytime.
Request Lock.


Locked.

_________________
- Retired.
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   This topic is locked: you cannot edit posts or make replies.    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