[Gambas-user] My first work
    Fabien Bodard 
    Gambasfr at ...11...
       
    Sun Jan  4 19:40:02 CET 2004
    
    
  
Le Samedi 3 Janvier 2004 23:40, -=FoX=- a écrit :
> Hi all :)
> I have made a cursor changer for xfree 4.3 with Gambas
> If you want to take a look -->
> http://linuxgarage.interfree.it/Downloads.html
> it's only 8k :P
>
> bye
> Fox
>
>
> -------------------------------------------------------
> This SF.net email is sponsored by: IBM Linux Tutorials.
> Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
> Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
> Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
> _______________________________________________
> Gambas-user mailing list
> Gambas-user at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gambas-user
Hi 
good job !
But you can add this :
For resize the cursor...
 create an '.Xdefaults' file in your home directory and add the following 
lines:
 
 -------
 Xcursor.size: 32
 Xcursor.theme: tuxcursor
 -------
 
 Availiable Sizes: 32 (small), 48 (medium), 64 (big, but max. detail)
 
What is it ?   
**   myhome = CStr(Application.User)   ?
Replace all ' "/home/" & myhome' by Application.Home 
Application.Home give directly the User home directory
In gambas you have a magic thing :
Icon Directories is :
---> Application.Home &/ ".icons"
the &/ add if it not exist the directory separator.
In basic we can kill files
KILL Application.Home &/ ".icons/default/index.theme"
We can Make directoriy :
MKDIR "Directory name"
**Ex : MKDIR Application.Home &/ "Picture"
I think you don't use the basic capabilities....
PUBLIC SUB Form_Open()
  DIM sDir as String
  '================= 
  myhome = Application.Home   'Not CStr... i'ts already a string! and user to
  foto = NEW Picture
  CBoxThemes.Add ("Actual theme")
  CBoxThemes.text = "Actual theme"
  btnOK.Enabled = FALSE
  'Scrivo l'elenco delle directory
FOR EACH sDir in Dir(Application.Home &/ ".icons/Themes")
  CBoxThemes.Add (sDir)
NEXT
  CBoxThemes_Change()
END
All Basic File command can return an error... If it don't work
For exemple :
if i try to kill the root directory.
To Catch these events we have two soluce..:
First :
PUBLIC Button1_Click()
  MyDir = "/root"
  Try KILL MyDir
  IF error THEN
    Print "I can do that... Master     " & Error.Text 
  ELSE
    Print "File deleted... Master"
  ENDIF
END
Second :
PUBLIC Button1_Click()
  MyDir = "/root"
  KILL MyDir
  Print "File deleted... Master"
CATCH   'this run only when an error is raised
  Print "I can do that... Master     " & Error.Text 
END
You can Have more error in help broswer
Fabien Bodard
I think you must to take a  look at the how to.
Nevertheless... Your idea is good !
    
    
More information about the User
mailing list