PDA

View Full Version : message and ask title = "Vizard"


TarkaDahl
06-10-2010, 02:15 PM
Hi all,

We are currently using the message and ask functions. However they always display the title "Vizard" and have the vizard logo. Is there any way to change it to display another title and have the icon i set in viz.setOption('viz.window.icon','icon.ico').

If not i will have to display these messages another way, it would just be easier if i didnt have to.

Thanks

farshizzo
06-10-2010, 02:32 PM
This is not possible in the current version of Vizard. Here is some sample code showing how to use the Windows MessageBox function to customize the title:import viz
viz.go()

import win32gui
import win32con

# Equivalent to viz.message
win32gui.MessageBox(viz.window.getHandle(),'My Message','My Title',win32con.MB_OK)

# Equivalent to viz.ask
print win32gui.MessageBox(viz.window.getHandle(),'My Question','My Title',win32con.MB_YESNO) == win32con.IDYES

TarkaDahl
06-11-2010, 02:19 AM
Hi farshizzo,

Thats exactly what i was looking for.

Thanks