none
I makeing a paint program with small basic RRS feed

  • Question

  • Hi all i am makeing a program called paint (Name will change) but i need help 

    I was wondering is there a way to put in a save as in it and font change and stuff like that if so could you tell me how i could if not i have too wait or use a other program. 

     

    Any help would be appreciated 

     

     

    thanks klimyriad 

    • Edited by klimyriad Sunday, May 30, 2010 4:57 PM forgot to put in a few things
    Sunday, May 30, 2010 4:49 PM

Answers

  • Hi klimyriad,

     

    See my reply about not being able to save images here... http://social.msdn.microsoft.com/forums/en-us/smallbasic/thread/B1597D09-0866-4C60-99D9-7E33C1BBA5C7

     

    Also, there is an extension created by Fremy which provides a Drawings.SaveGraphicsToFile function, but I think this only stores a shape to file, not the actual GraphicsWindow area.  He mentions it here... http://social.msdn.microsoft.com/Forums/en-US/smallbasic/thread/09e894d3-db72-4da3-824b-89d55374aaa5

     

     

    As for the fonts, no there is no font selection tool available that I know of.  You can change the font used, using graphicsWindow.FontName, but you need to tell it the name of the font to use. For your drawing program, you could display a list of fonts somewhere and ask the user to click on the one to use, but you will have to build the tool to do it. One example shown below...

     

     

    ' Davey~Wavey's quick and dirty font selection example
    fonts="1=Arial;2=Times New Roman;3=Georgia;4=Comic Sans MS"
    
    For lwp = 1 To Array.GetItemCount(fonts)
     GraphicsWindow.FontSize=20
     GraphicsWindow.FontName = fonts[lwp]
     GraphicsWindow.DrawText(10, lwp*20, fonts[lwp])
    EndFor
    
    ' now wait until a font is clicked, then display it's name
    While Mouse.IsLeftButtonDown = "False"
     Program.Delay(100)
    EndWhile
    
    GraphicsWindow.ShowMessage("You clicked font: " + fonts[math.Floor(GraphicsWindow.MouseY/20)], "Fonts Selector")

     

    Sunday, May 30, 2010 9:30 PM

All replies

  • Hi klimyriad,

     

    See my reply about not being able to save images here... http://social.msdn.microsoft.com/forums/en-us/smallbasic/thread/B1597D09-0866-4C60-99D9-7E33C1BBA5C7

     

    Also, there is an extension created by Fremy which provides a Drawings.SaveGraphicsToFile function, but I think this only stores a shape to file, not the actual GraphicsWindow area.  He mentions it here... http://social.msdn.microsoft.com/Forums/en-US/smallbasic/thread/09e894d3-db72-4da3-824b-89d55374aaa5

     

     

    As for the fonts, no there is no font selection tool available that I know of.  You can change the font used, using graphicsWindow.FontName, but you need to tell it the name of the font to use. For your drawing program, you could display a list of fonts somewhere and ask the user to click on the one to use, but you will have to build the tool to do it. One example shown below...

     

     

    ' Davey~Wavey's quick and dirty font selection example
    fonts="1=Arial;2=Times New Roman;3=Georgia;4=Comic Sans MS"
    
    For lwp = 1 To Array.GetItemCount(fonts)
     GraphicsWindow.FontSize=20
     GraphicsWindow.FontName = fonts[lwp]
     GraphicsWindow.DrawText(10, lwp*20, fonts[lwp])
    EndFor
    
    ' now wait until a font is clicked, then display it's name
    While Mouse.IsLeftButtonDown = "False"
     Program.Delay(100)
    EndWhile
    
    GraphicsWindow.ShowMessage("You clicked font: " + fonts[math.Floor(GraphicsWindow.MouseY/20)], "Fonts Selector")

     

    Sunday, May 30, 2010 9:30 PM
  • Thanks for your reply 
    Monday, May 31, 2010 5:30 PM