This is a read-only archive of the old Scratch 1.x Forums.
Try searching the current Scratch discussion forums.

#1 2012-02-11 09:38:36

CheeseMunchy
Scratcher
Registered: 2008-10-13
Posts: 1000+

Visual Basic Official topic

I just started using Microsoft Visual Basic 2010 Express.
I made a simple calculator.

Discuss Visual Basic.

Last edited by CheeseMunchy (2012-02-11 09:38:50)


6418,

Offline

 

#2 2012-02-11 09:40:27

majormax
Scratcher
Registered: 2008-04-06
Posts: 1000+

Re: Visual Basic Official topic

I've made $10 off a browser I made  smile

Offline

 

#3 2012-02-11 09:41:10

CheeseMunchy
Scratcher
Registered: 2008-10-13
Posts: 1000+

Re: Visual Basic Official topic

majormax wrote:

I've made $10 off a browser I made  smile

How did u do that?  tongue

lollol i'm such a noob.

Last edited by CheeseMunchy (2012-02-11 09:44:52)


6418,

Offline

 

#4 2012-02-11 09:46:04

SeptimusHeap
Scratcher
Registered: 2010-02-01
Posts: 1000+

Re: Visual Basic Official topic

majormax wrote:

I've made $10 off a browser I made  smile

How did you make money off of it?

Anyway, I've made a browser, Optum, it's around here somewhere. Then I lost the source when my computer crashed.


http://i46.tinypic.com/dw7zft.png

Offline

 

#5 2012-02-11 09:48:31

peterkap
Scratcher
Registered: 2009-01-24
Posts: 1000+

Re: Visual Basic Official topic

Is it possible to make an autoclicker with an interval of like .0000000000001?
I heard someone say something about looping.

Offline

 

#6 2012-02-11 09:54:33

CheeseMunchy
Scratcher
Registered: 2008-10-13
Posts: 1000+

Re: Visual Basic Official topic

peterkap wrote:

Is it possible to make an autoclicker with an interval of like .0000000000001?
I heard someone say something about looping.

I know you can loop. I have no idea how.


6418,

Offline

 

#7 2012-02-11 10:02:40

CheeseMunchy
Scratcher
Registered: 2008-10-13
Posts: 1000+

Re: Visual Basic Official topic

I my gosh. I'm already make epic programs!
I made a program that changes the the value of a label by 1!
XP


6418,

Offline

 

#8 2012-02-11 10:06:10

CheeseMunchy
Scratcher
Registered: 2008-10-13
Posts: 1000+

Re: Visual Basic Official topic

Wow, this is easier then I thought.  tongue


6418,

Offline

 

#9 2012-02-11 10:11:01

CheeseMunchy
Scratcher
Registered: 2008-10-13
Posts: 1000+

Re: Visual Basic Official topic

Does anyone know how to make something wait
?


6418,

Offline

 

#10 2012-02-11 10:12:51

Daffy22
Scratcher
Registered: 2008-12-15
Posts: 500+

Re: Visual Basic Official topic

CheeseMunchy wrote:

Does anyone know how to make something wait
?

System.threading.thread.sleep(100) will pause for 1 second.
Btw, check my sig. Open Mind is made in VB  smile


http://img201.imageshack.us/img201/1784/logosmalle.png
"Spectacular - 5 Star" -  CNET.com Editor.

Offline

 

#11 2012-02-11 10:15:29

CheeseMunchy
Scratcher
Registered: 2008-10-13
Posts: 1000+

Re: Visual Basic Official topic

Daffy22 wrote:

CheeseMunchy wrote:

Does anyone know how to make something wait
?

System.threading.thread.sleep(100) will pause for 1 second.
Btw, check my sig. Open Mind is made in VB  smile

Ok, thanks!
I'll check it out. :>


6418,

Offline

 

#12 2012-02-11 22:14:06

what-the
Scratcher
Registered: 2009-10-04
Posts: 1000+

Re: Visual Basic Official topic

Any one know how to connect Visual Basic (.Net) to scratch so they can communicate?
I'm planing on using VB as an interface to control a real world object with inputs from scratch.


http://imageshack.us/m/64/9034/ddfss.pngMy site
Find someone post count. Click posts under username. Find number of pages. Times that by 40 for min and 60 for max and you have a rough estimate of post count.

Offline

 

#13 2012-02-11 22:23:22

Freakish
Scratcher
Registered: 2011-10-25
Posts: 1000+

Re: Visual Basic Official topic

I've never don't Visual Basic.


http://i.imgur.com/y3RBV.jpg

Offline

 

#14 2012-02-12 02:59:30

Daffy22
Scratcher
Registered: 2008-12-15
Posts: 500+

Re: Visual Basic Official topic

what-the wrote:

Any one know how to connect Visual Basic (.Net) to scratch so they can communicate?
I'm planing on using VB as an interface to control a real world object with inputs from scratch.

Not really sure thats possible. Could you use a mod to write to file and then use the .net filewatcher control to check for new files? Im not 100% sure I know what you mean.  hmm


http://img201.imageshack.us/img201/1784/logosmalle.png
"Spectacular - 5 Star" -  CNET.com Editor.

Offline

 

#15 2012-02-12 04:25:00

nathanprocks
Scratcher
Registered: 2011-04-14
Posts: 1000+

Re: Visual Basic Official topic

Daffy22 wrote:

what-the wrote:

Any one know how to connect Visual Basic (.Net) to scratch so they can communicate?
I'm planing on using VB as an interface to control a real world object with inputs from scratch.

Not really sure thats possible. Could you use a mod to write to file and then use the .net filewatcher control to check for new files? Im not 100% sure I know what you mean.  hmm

it would be cool if someone wrote a program that would probably use wminput to tell Scratch the sensor values of the Wiimote lol


http://carrot.cassiedragonandfriends.org/Scratch_Signature/randomsig.php
http://trinary.site40.net/images/scratchrank.php?username=nathanprocks&display=small

Offline

 

#16 2012-02-12 04:33:46

Daffy22
Scratcher
Registered: 2008-12-15
Posts: 500+

Re: Visual Basic Official topic

nathanprocks wrote:

Daffy22 wrote:

what-the wrote:

Any one know how to connect Visual Basic (.Net) to scratch so they can communicate?
I'm planing on using VB as an interface to control a real world object with inputs from scratch.

Not really sure thats possible. Could you use a mod to write to file and then use the .net filewatcher control to check for new files? Im not 100% sure I know what you mean.  hmm

it would be cool if someone wrote a program that would probably use wminput to tell Scratch the sensor values of the Wiimote lol

Yeah! Not gona happen in vb though  sad   hmm


http://img201.imageshack.us/img201/1784/logosmalle.png
"Spectacular - 5 Star" -  CNET.com Editor.

Offline

 

#17 2012-02-12 06:14:29

what-the
Scratcher
Registered: 2009-10-04
Posts: 1000+

Re: Visual Basic Official topic

Found some info on communicating with VB.net.

Imports System
Imports System.IO.Ports
Public Class Form1
    Dim WithEvents Port As SerialPort = _
                    New SerialPort("COM1", 9600, Parity.None, 8, StopBits.One)

This is great.
So scratch communicates on COM1, 42001.
So how many bits does scratch use, parity and stop bits?

And the format scratch communicates.

http://www.codeproject.com/Articles/17190/Communication-on-a-serial-port-in-NET-2-0
for more info.

Last edited by what-the (2012-02-12 06:22:26)


http://imageshack.us/m/64/9034/ddfss.pngMy site
Find someone post count. Click posts under username. Find number of pages. Times that by 40 for min and 60 for max and you have a rough estimate of post count.

Offline

 

#18 2012-02-12 08:07:26

SeptimusHeap
Scratcher
Registered: 2010-02-01
Posts: 1000+

Re: Visual Basic Official topic

Daffy22 wrote:

nathanprocks wrote:

Daffy22 wrote:

Not really sure thats possible. Could you use a mod to write to file and then use the .net filewatcher control to check for new files? Im not 100% sure I know what you mean.  hmm

it would be cool if someone wrote a program that would probably use wminput to tell Scratch the sensor values of the Wiimote lol

Yeah! Not gona happen in vb though  sad   hmm

Did you make Open Mind?

Ah! Here's Optum, my web browser!

Last edited by SeptimusHeap (2012-02-12 08:07:37)


http://i46.tinypic.com/dw7zft.png

Offline

 

#19 2012-02-12 08:25:49

SeptimusHeap
Scratcher
Registered: 2010-02-01
Posts: 1000+

Re: Visual Basic Official topic

Hey, could somebody look over this code, I don't know what's wrong. It can't send emails.

Code:

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        If TextBox2.Text = "" Then
            TextBox2.Text = "No Message"
        End If
        If TextBox1.Text = "" Then
            MsgBox("Please enter an adress.")
            Exit Sub
        End If
        Dim mTo As System.Net.Mail.MailAddress
        Try
            Dim AdressTo As New System.Net.Mail.MailAddress(TextBox1.Text)
            mTo = AdressTo
        Catch
            MsgBox("Invalid target adress")
            Exit Sub
        End Try
        Dim mFrom As System.Net.Mail.MailAddress
        Try
            Dim AdressFrom As New System.Net.Mail.MailAddress(My.Settings.EmailUsername)
            mFrom = AdressFrom
        Catch
            MsgBox("Invalid sender email")
            Exit Sub
        End Try
        Dim smtpServer As New SmtpClient()
        Dim mail As New MailMessage()
        smtpServer.Credentials = New Net.NetworkCredential(My.Settings.EmailUsername, My.Settings.EmailPass)
        If My.Settings.EmailSite = "Yahoo" Then
            smtpServer.Port = 465
            smtpServer.Host = "plus.smtp.mail.yahoo.com"
            smtpServer.EnableSsl = True
        End If
        mail = New MailMessage()
        mail.From = New MailAddress(My.Settings.EmailUsername)
        mail.To.Add(TextBox1.Text)
        mail.Subject = TextBox2.Text
        mail.Body = TextBox3.Text
        Try
            smtpServer.Send(mail)
        Catch
            MsgBox("Failed to send email. Please check username/password")
            Exit Sub
        End Try
        MsgBox("Mail Sent Succesfull!")
    End Sub
End Class

http://i46.tinypic.com/dw7zft.png

Offline

 

#20 2012-02-12 08:32:51

SeptimusHeap
Scratcher
Registered: 2010-02-01
Posts: 1000+

Re: Visual Basic Official topic

Also, I'm trying to add an image background to my application, is there any way to make the back of a tabstrip transparent?


http://i46.tinypic.com/dw7zft.png

Offline

 

#21 2012-02-12 09:09:40

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Visual Basic Official topic

SeptimusHeap wrote:

Also, I'm trying to add an image background to my application, is there any way to make the back of a tabstrip transparent?

I don't think so...

Offline

 

#22 2012-02-12 09:35:59

what-the
Scratcher
Registered: 2009-10-04
Posts: 1000+

Re: Visual Basic Official topic

SeptimusHeap wrote:

Hey, could somebody look over this code, I don't know what's wrong. It can't send emails.

Code:

    P...

Have you made sure that your ISP allows you to send emails? I setup my computer before as an email host and my ISP would not allow me to send emails (It's meant to reduce spam).


http://imageshack.us/m/64/9034/ddfss.pngMy site
Find someone post count. Click posts under username. Find number of pages. Times that by 40 for min and 60 for max and you have a rough estimate of post count.

Offline

 

#23 2012-02-12 09:52:31

LS97
Scratcher
Registered: 2009-06-14
Posts: 1000+

Re: Visual Basic Official topic

what-the wrote:

Found some info on communicating with VB.net.

Imports System
Imports System.IO.Ports
Public Class Form1
    Dim WithEvents Port As SerialPort = _
                    New SerialPort("COM1", 9600, Parity.None, 8, StopBits.One)

This is great.
So scratch communicates on COM1, 42001.
So how many bits does scratch use, parity and stop bits?

And the format scratch communicates.

http://www.codeproject.com/Articles/17190/Communication-on-a-serial-port-in-NET-2-0
for more info.

Are you sure Scratch has to communicate on COM1? It's a port that doesn't exist on many computers anymore... including mine  tongue

For the format, it's
byte byte byte byte message
the four bytes represent the size of the message string.

Offline

 

#24 2012-02-12 09:56:09

cocolover76
Scratcher
Registered: 2011-10-09
Posts: 500+

Re: Visual Basic Official topic

I'm making a WYSIWYG editor in VB.Net that uses RTF (NOT the kind WordPad or MS Word uses) called Coco Office. (it's actually gonna become a whole suite of programs someday)
So far it has save, open, bold, underline, italic, copy pictures into the text box, resize those pictures(I think), and about.
And all of that in only 70 lines of code.
And 4 resources.
Yes, I know. It's pretty powerful for VB.
And soon, I'm gonna use some module thingy I found online to make it look like MS Word 2007 when I figure out how to use it.


http://i.imgur.com/HfEPZ.gifhttp://i.imgur.com/pvKb6.png

Offline

 

#25 2012-02-12 10:00:05

cocolover76
Scratcher
Registered: 2011-10-09
Posts: 500+

Re: Visual Basic Official topic

cocolover76 wrote:

I'm making a WYSIWYG editor in VB.Net that uses RTF (NOT the kind WordPad or MS Word uses) called Coco Office. (it's actually gonna become a whole suite of programs someday)
So far it has save, open, bold, underline, italic, copy pictures into the text box, resize those pictures(I think), and about.
And all of that in only 70 lines of code.
And 4 resources.
Yes, I know. It's pretty powerful for VB.
And soon, I'm gonna use some module thingy I found online to make it look like MS Word 2007 when I figure out how to use it.

Got a screenshot!
http://imgur.com/s6cQq
For Antidote users:
http://i.imgur.com/s6cQq.png
EDIT: Also, you might wanna note it saves to .COF files. Coco OFfice.

Last edited by cocolover76 (2012-02-12 10:01:26)


http://i.imgur.com/HfEPZ.gifhttp://i.imgur.com/pvKb6.png

Offline

 

Board footer