我始终在Win2000/XP中开发程序,但发现编译后的程序在Vista中运行时,无边框窗口和一些控件的大小及位置都发生了变化。通常表现为尺寸变大,位置向右下方移位。最近发现不仅是自己的程序如此,好多软件都有此类情况发生,就连瑞星的一些界面也是如此,不知何故?应该如何解决呢?我想不会是VB的问题吧,难道瑞星也用VB?

解决方案 »

  1.   

    我的英文比较差, 不是很懂,看一下下面这段英语是否有帮助.Application   Changes   
    1. Remove   SendKeys   calls   and   replace   them   with   API   code. 
    2. Use   the   HKEY_CURRENT_USER   in   the   registry   for   the   settings   of   your   application.   Do   not   write   to   HKEY_LOCAL_MACHINE. 
    3. If   you   are   using   ADO   use   2.8   and   above   in   your   application. 
    4. If   you   are   using   XML   use   XML   version   3.0   and   above   in   your   application 
    5. If   you   are   using   the   PlaySound   API,   if   your   wave   files   are   not   PCM   but   mpeg   layer-3   make   sure   your   mpeg   wave   files   are   Stereo   and   not   Mono. 
    6. If   you   need   the   Printer   Setup   dialog   either   using   the   Common   Dialog   Control,   or   by   using   the   API   functions,   the   dialog   will   not   return   the   correct   number   of   copies.   The   dialog   will   always   return   1   on   Vista.   The   way   around   this   bug   is   to   create   your   own   Printer   Setup   dialog   box   and   when   you   get   the   correct   number   of   copies   you   will   have   to   send   to   the   printer   multiple   times   to   print   out   multiple   copies.   Here   is   a   link   that   discusses   this   issue   in   details. 
    7. Relocate   settings   files,   data   files   etc   into   "Common   Files"   (C:\Users\Public)   instead   of   "Program   Files".   You   should   use   the   API   calls   to   locate   these   folders   because   the   folders   are   in   different   paths   for   different   machines   and   OSs.   Here   is   a   link   that   discusses   this   issue   in   details.
      

  2.   

    有显示正常的程序,这表明遵循windows基本界面元素的兼容性高。