Hack Forums
[.NET] Builder (Use Boolean in builder) - Printable Version

+- Hack Forums (https://hackforums.net)
+-- Forum: Tech (https://hackforums.net/forumdisplay.php?fid=444)
+--- Forum: Coding (https://hackforums.net/forumdisplay.php?fid=151)
+---- Forum: Software Development (https://hackforums.net/forumdisplay.php?fid=118)
+---- Thread: [.NET] Builder (Use Boolean in builder) (/showthread.php?tid=2864383)



Builder (Use Boolean in builder) - Drug ballad - Sep 15, 2012

So im gone show you today how to use boolean in builder,

im gone assum you got your project ready and fixed otherwise you can find a source, Or Build Ur own from start

boolean is very simple to make in a builder + stub

First Lets Go To Are Builder
So Go To Your From1 or as many rename it frmain.vb ((Press F7 or right click and press view code))

Now You Can Fix a boolean
Under Public Class From1 Type Something like this
Code
Dim ThisIsBoolean As Boolean
It shuld look something like this
[Image: y6ktG.png]

Okay now, now were gone explain for VB what ThisIsBoolean is gone be (Like Checkbox1.checked)

in the code of your build button right under button1_click
Type
Code
ThisIsBoolean = CheckboxWho.checked

Its Shuld Look Something like this
[Image: 3X7os.png]
Now im using a radiobutton but since its a boolean that works fine to use to
But ofc your gone change checkboxwho.checked to the checkbox you want it to copy / read

Now Scroll down this you see fileclose("Number")
Now Under that type
Code
If NewRadio1.Checked = True Then
          ThisIsBoolean = True
        Else :   ThisIsBoolean = False
        End If
Now ofc your gone use ur boolean button / Checkbox / Radiobutton or any other boolean used component

Now Scroll Down Even little more till you see
FilePut("Number,......................")

Now Here were gone add another thing
and it shuld look something like this if you already got a source
Code
FilePut(1, stub & FileSplit & text1 & FileSplit & text2 & FileSplit & text3 & FileSplit & armedos & FileSplit & udp & FileSplit & ssyn & FileSplit)
Now i took this from my source
But You wanna put
Code
FilePut(1, stub & FileSplit & thisisboolean & FileSplit)


Now To The Stub
Under public class form1 your gone put
Dim Something(), thisisboolean as string

Something also most people name it to options
anyway now thats fixed were gone scroll down in are source
Till you see form1_load or frmain_load or whatever
Under
fileopen(-------------------------)
Type

[code]thisisboolean = space(LOF(1))
Under that type
Code
fileget(1, thisisboolean)
Now Under fileclose and prob under Something = split(....., Filesplit)
Type
checkbox1.checked = something(1)
Now ofc you need to add a checkbox in the stub so do that and do this :)
Now Simply Under all that code type a function you want it to do if its checked like

Code
If (checkbox1.Checked = True) Then


            msgbox("Skiddles")
end if

This is my first tutorial kinda please dont hate im just trying to help ;(

And please dark_nodles or whatever dont comment here

This is only how to add a boolean to a builder its not how to fully build a builder


* - mapleanton - Sep 15, 2012

What I'm always doing is converting the boolean to an integer (0/1)
And giving the boolean back its value

Code
Dim mayboolean as boolean = True
Dim lol as string = Convert.ToInt16(mayboolean) 'lol = 1
Dim anotherboolean = lol 'anotherboolean = 1



* - Drug ballad - Sep 15, 2012

(Sep 15, 2012 01:00 AM)mapleanton Wrote:  What I'm always doing is converting the boolean to an integer (0/1)
And giving the boolean back its value

Code
Dim mayboolean as boolean = True
Dim lol as string = Convert.ToInt16(mayboolean) 'lol = 1
Dim anotherboolean = lol 'anotherboolean = 1

Im using this your using that,
as long as everything works its good


* - tweety - Sep 15, 2012

Why not just use codedom? This method shouldn't be used anymore.