[Gambas-user] VB to Gambas

infobriefkasten at ...851... infobriefkasten at ...851...
Sun Feb 20 19:00:06 CET 2005


Charlie Reinl schrieb:

>>Hey there, 
>>
>>I want to convert my VisualBasic Project to Gambas. 
>>
>>I use in VB following code: 
>>
>>Public Type ProgType 
>>   Name As String 
>>   Pfad As String 
>>   Verzeichnis As String 
>>End Type  
>>Global Prog1 as ProgType 
>>Global Prog2 as ProgType 
>>
>>so i can use it like: 
>>
>>Prog1.Name = "Editor" 
>>Prog1.Pfad = "c:\windows\editor.exe" 
>>Prog1.Verzeichnis = "c:\windows\" 
>>... 
>>Prog2.Name = "notepad" 
>>Prog2.Pfad = "c:\windows\notepad.exe" 
>>Prog2.Verzeichnis = "c:\windows\" 
>>
>>....an so on. 
>>
>>How can i declare and handle it in gambas?? 
>>
>>Thanks a lot>    Name As String 
>>   Pfad As String 
>
> 
>Salut, 
> 
>to replace the VBusertype , create a Class  
>we call it ProgType ( the file will be ProgType.class) 
>and fill like that 
> 
>' Gambas class file 
>STATIC PUBLIC Name AS String 
>STATIC PUBLIC Pfad AS String 
>STATIC PUBLIC Verzeichnis AS String 
> 
>Now in you project decleare. 
> 
>Global doesn't exist in gambas. See about in the list. 
> 
>PUBLIC Prog1 AS NEW ProgType 
>PUBLIC Prog2 AS NEW ProgType 
> 
>Now you can use it like in your VB project. 
> 
>Prog1.Name = "Editor" 
>Prog1.Pfad = "c:\windows\editor.exe" 
>Prog1.Verzeichnis = "c:\windows\" 
>....an so on. 
> 
>Amicalment 
>Charlie 
>* Gesendet mit / Sent by: FEN-Webmail * http://www.fen-net.de *
>
>
>-------------------------------------------------------
>SF email is sponsored by - The IT Product Guide
>Read honest & candid reviews on hundreds of IT Products from real users.
>Discover which products truly live up to the hype. Start reading now.
>http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
>_______________________________________________
>Gambas-user mailing list
>Gambas-user at lists.sourceforge.net
>https://lists.sourceforge.net/lists/listinfo/gambas-user
>
>
Hey Charlie,
thanks for your quick answer!
It works. So I'm happy to converting my big Project ... :-D :-D :-D :-D :-D
Horst

-- 
DSL Komplett von GMX +++ Supergünstig und stressfrei einsteigen!
AKTION "Kein Einrichtungspreis" nutzen: http://www.gmx.net/de/go/dsl




More information about the User mailing list