Sign in to follow this  
Followers 0
dirty

XP wont show what W7 X64 does ?

7 posts in this topic

#1 ·  Posted (edited)

How come exact same code works different for XP and W7 ?

Simple input code:

$SearchByMFG = GUICtrlCreateInput("", 10, 160, 340, 30)
GUICtrlSendMsg(-1, $EM_SETCUEBANNER, True, "Manufacture Name by which project is identified")
$SearchByMFGButton = GUICtrlCreateButton(" By MFG", 350, 160, 140, 30, $BS_LEFT)
GUICtrlSetFont(-1, 12, 400)
GUICtrlSetImage(-1, @TempDir & "\search.ico", '', 1)

XP ran in a virtual machine produces following result:

post-55807-0-72235100-1319925634_thumb.j

W7 X64 on which the code was made produces the following:

post-55807-0-61292700-1319925646_thumb.j

See how not all text is Bold or even misplaced toward left in the Project Details area.

Also icons are not drawn on any of the buttons like they do in W7

Is it the virtual machine issue or the code being incapable with XP ?

Edited by dirty

Share this post


Link to post
Share on other sites



Oh never mind, i see. Its the way of how Windows API works with autoit. Seems to vary from one computer to another making it little to less reliable when trying to code something with hopes it would be the same on all machines.

Share this post


Link to post
Share on other sites

I doubt it's anything to do with AutoIt; my programss written in Delphi have similar problems.


Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

Share this post


Link to post
Share on other sites

i said Its the way of how Windows API works with autoit.

functions like WinAPI or dllcall i stay away from those because they vary from one computer to another.

Share this post


Link to post
Share on other sites

#5 ·  Posted (edited)

So after couple of days ago posting this issue, the question is:

How to make

GUICtrlSetImage(-1, @TempDir & "\search.ico", "", 1) ;assign icon to button

to work with XP ?

Edited by dirty

Share this post


Link to post
Share on other sites

GUICtrlSetImage cause a lot trouble if you want something to show up correctly in different windows versions.

try _GUICtrlButton_SetImage instead

Share this post


Link to post
Share on other sites

#7 ·  Posted (edited)

having

_GUICtrlButton_SetImage ($SearchByNameButton,@TempDir & "\search.ico")

instead of

GUICtrlSetImage($SearchByNameButton, @TempDir & "\search.ico", "", 1) shows no results in XP. Icon is still not drawn

i even tried

_WinAPI_DrawIcon ($SearchByNumberButton,0,0,@TempDir & "\search.ico")

but even that dont do anything on both W7 and XP

Edited by dirty

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0