How does pb adapt to the screen resolution?
1。 Create a new window. \x0d\ \x0d\ Write a function f_resize () for the window, and most of the work is here. \x0d\ No input parameter \x0d\ The return value is plastic: \ x0d \ x0d \ env \ x0d \ Integer II _ screenwidth, II _ screenheight \ x0d \ Double Radio, radio \ x0d \ Integer II _ winbold width, ii _ winboldheight \ x0d \ getenvironment (env) \ x0d \ ii _ winboldwidth = this. width-this. Workspace width ()//Get the format of the border width \ x0d \ ii _ winboldheight = this. this. Workspace height () \ x0d \ ii _ screenwidth = env.screenwidth \ x0d \ ii _ screenheight = env.screenheight \ x0d \//Calculate the radio to be resized \ Wrap io = ii _ screen width/800// The standard considers that the screen resolution is 800 * 600 \ x0d \ h radio = ii _ screenheight/600//Calculate the change of the screen relative to the resolution of 800 * 600 \ x0d \ radio = min (wrap, h Radio)\ Dragobjecttemp// is used to obtain various controls \ x0d \ x0d \ for I = 1 to the upper bound (this.control) \ x0d \ temp = this.control [I]//resize, location \ x0d \ temp . width = temp . width * Radio \ x0d \ temp . x = temp . x * Radio \ x0d \ temp . y = temp . y * Radio \ x0d \ temp。 Height = temperature. height * Radio \ x0d \ choose case type of(temp)\ x0d \ case tab! \ x0d \ tabmtab \ x0d \ mtab = temp \ x0d \ mtab . text size = mtab . text size * radio//Set font \ x0d \ case command button! \ x0d \ command button CB \ x0d \ CB = temp \ x0d \ CB . text size = CB . text size * Radio \ x0d \ \ x0d \ case single line edit! \ x0d \ single line edit SLE \ x0d \ SLE = temp \ x0d \ SLE . text size = SLE . text size * Radio \ x0d \ case edit mask! \ x0d \ edit mask em \ x0d \ em = temp \ x0d \ em . textsize = em . text size * Radio \ x0d \ \ x0d \ case static text! \ x0d \ static text ST \ x0d \ ST = temp \ x0d \ ST . textsize = ST . text size * Radio \ x0d \ \ x0d \ case data window! //data window get zoom \ x0d \ datawindow dw \ x0d \ dw = temp \ x0d \ dw.object.datawindow.zoom = string (int (radio *100))//Pay attention to the difference between datawindow and other controls \ x0d \ x0d \ casepicture. \ x0d \ picturebuttonpb \ x0d \ pb = temp \ x0d \ pb.textsize = pb.textsize * radio \ x0d \ x0d \ case check box! \ x0d \ checkbox cbx \ x0d \ cbx = temp \ x0d \ cbx . text size = cbx . text size * Radio \ x0d \ \ x0d \ case dropdownlistbox! \ x0d \ dropdownlistbox ddlb \ x0d \ ddlb = temp \ x0d \ ddlb . text size = ddlb . text size * Radio \ x0d \ \ x0d \ case group box! \ x0d \ group box GB \ x0d \ GB = temp \ x0d \ GB . textsize = GB . text size * Radio \ x0d \ \ x0d \ case listbox! \ x0d \ listbox lb \ x0d \ lb = temp \ x0d \ lb . text size = lb . text size * Radio \ x0d \ \ x0d \ case multilineedit! \ x0d \ multilineedit mle \ x0d \ mle = temp \ x0d \ mle . text size = mle . text size * Radio \ x0d \ \ x0d \ case Radio button! \ x0d \ Radio button Rb \ x0d \ Rb = temp \ x0d \ Rb . textsize = Rb . text size * Radio \ x0d \ \ x0d \ end choose \ x0d \ next \ x0d \ this . show()\ x0d \ return 0