30th Jan 2008
VensterCE: Hello World
In keeping with tradition, lets start off with a simple “hello world”
from venster.ce import *
msg = MessageBox(None,u"Hello World",u"Venster Says",MB_OK);
First line:
from venster.ce import *
This merely includes the basic functions and classes from the venster library. We will use this in every program.
msg = MessageBox(None,u"Hello World",u"Venster Says",MB_OK);
Here create a simple messagebox and store the return value in the variable “msg”. The function definition for MessageBox is MessageBox(window,message,title,buttons). Here the parent window is None, as we haven’t created one (It’s ok, windows can handle that). Next are the Message and Title strings, but make sure you keep them unicode (bad things can happen if you dont). The “buttons” variable is combination of flags. A few popular ones are MB_OK, MB_OKCANCEL, and MB_HELP for buttons, and MB_ICONWARNING and MB_ICONINFORMATION for the icon. For a full reference of the different flags, go Here.
In keeping with tradition, lets start off with a simple “hello world”
from venster.ce import * msg = MessageBox(None,u"Hello World",u"Venster Says",MB_OK);
First line:
from venster.ce import *
This merely includes the basic functions and classes from the venster library. We will use this in every program.
msg = MessageBox(None,u"Hello World",u"Venster Says",MB_OK);
Here create a simple messagebox and store the return value in the variable “msg”. The function definition for MessageBox is MessageBox(window,message,title,buttons). Here the parent window is None, as we haven’t created one (It’s ok, windows can handle that). Next are the Message and Title strings, but make sure you keep them unicode (bad things can happen if you dont). The “buttons” variable is combination of flags. A few popular ones are MB_OK, MB_OKCANCEL, and MB_HELP for buttons, and MB_ICONWARNING and MB_ICONINFORMATION for the icon. For a full reference of the different flags, go Here.
Posted in axim, c, how-to, pocketpc, ubuntu, windows mobile | No Comments »