locked
Messages On Startup RRS feed

  • Question

  • Hello, I need some help here, I'd like to make something simple yet I still don't have a clue how to do it.

    I want to make a text box, with a different messages every time windows starts, just a button to close it and the message display.  that's it.

    I don't know how to make that happen. I want a different message randomly choose every singles time windows XP or 7 starts. how can I?

    Monday, May 28, 2012 5:52 AM

Answers

  • Hmm...

    Try this

    Num = Math.GetRandomNumber(5)
    Note[1] = "Hello"
    Note[2] = "HEHE"
    Note[3] = "Whatsup"
    Note[4] = "This may work"
    Note[5] = "Will this work Clustering?"
    TextWindow.WriteLine(Note[Num])

    It seems pretty simple.

    Tuesday, May 29, 2012 2:33 AM
    Answerer

All replies

  • Hello Clustering,

    You can try using this code and tweaking it for your own use,

    http://smallbasic.com/program/?FPS806

    after you programmed it compile it and then set a shortcut in your Startup Folder 

    Start > All Programs > Startup

    Now your program will run every time the computer starts.

    Kind Regards, Sander Kastelein.

    Please dont mind any spelling/gramatical - errorz

    Monday, May 28, 2012 10:17 AM
  • show this GPK002

    Best Regards Martin

    Monday, May 28, 2012 10:26 AM
  • Hi, I don't really understand it at all, how can I use it? could you give me an example?  and don't worry about spelling,
    Monday, May 28, 2012 3:49 PM
  • so you paste this on visual studio 2010? after you made a windows form window and then paste this and put your text??

    MyTitle = "My Message"
    GraphicsWindow.Show()
    GraphicsWindow.Top = 0
    GraphicsWindow.Left = 0
    GraphicsWindow.Height = 300
    GraphicsWindow.Width = 400
    N = Text.GetCharacter(13)
    Note[1] = "You are the best program language of the world."+ N + "My english is not good but this sampe are exelent." + N + "This text is a sample for more then 1 line."
    Note[2] = "Message 2"
    Note[3] = "Message 3"
    Note[4] = "Message 4"
    Note[5] = "Message 5"
    Note[6] = "Message 6"
    Note[7] = "Message 7"
    Note[8] = "Message 8"
    Note[9] = "Message 9"
    IndexNote = Math.GetRandomNumber(Array.GetItemCount(Note))
    MultiTextzContr = Controls.AddMultiLineTextBox(0,0)
    Controls.SetSize(MultiTextzContr,400,200)
    Controls.SetTextBoxText(MultiTextzContr,Note[IndexNote])
    ok = Controls.AddButton(" O K ",180,250)
    While 1 = 1
      if Controls.LastClickedButton = ok Then
        Program.End()
      EndIf
      Program.Delay(30)
    EndWhile

    Monday, May 28, 2012 3:52 PM
  • This forum is for the SmallBasic Programming language,

    look at http://smallbasic.com for more information.

    Monday, May 28, 2012 4:18 PM
  • Hmm...

    Try this

    Num = Math.GetRandomNumber(5)
    Note[1] = "Hello"
    Note[2] = "HEHE"
    Note[3] = "Whatsup"
    Note[4] = "This may work"
    Note[5] = "Will this work Clustering?"
    TextWindow.WriteLine(Note[Num])

    It seems pretty simple.

    Tuesday, May 29, 2012 2:33 AM
    Answerer
  • I'll give it a try on that one.. yes but I'm learning myself and I believe that doing things like that would help, right?  Thank you and I'll keep trying.
    Tuesday, May 29, 2012 4:07 PM