#cs ---------------------------------------------------------------------------- AutoIt Version: 3.2.12.1 Author: A GreenCan Script Function: Create a window with my perforated image #ce ---------------------------------------------------------------------------- #include #include #include #include #include #include #include #include $H_GUI = GuiCreate("Sphere", 380, 380) $OKbtn = GUICtrlCreateButton("Ok", 160, 360, 60, 20, $BS_DEFPUSHBUTTON ) # ==> Start Local $_Left_pos, $_Top_pos, $_GUI_NAME $_Left_pos = 4 ; Replace with correct position $_Top_pos = _WinAPI_GetSystemMetrics(4) +5 ; Just below the title bar (Must #include if using this function!!!) $_GUI_NAME = $H_GUI _GuiImageHole($_GUI_NAME, $_Left_pos, $_Top_pos, 376, 358) # <== End GUISetState() $msg = 0 While $msg <> $GUI_EVENT_CLOSE $msg = GUIGetMsg() Select Case $msg = $OKbtn Exit Case $msg = -3 ; escape key pressed so quit Exit EndSelect WEnd GUIDelete ( $H_GUI ) Exit #comments-start The lines below will generate the perforated image (bewteen start and end) Move these lines into your GUI code, usually just before GUISetState() Don't forget to fill in the correct coordinates for $Left_pos, $Top_pos and enter the GUI Window Handle in the last line # ==> Start Local $_Left_pos, $_Top_pos, $_GUI_NAME $_Left_pos = 10 ; Replace with correct position $_Top_pos = _WinAPI_GetSystemMetrics(4) ; Just below the title bar (Must #include if using this function!!!) $_GUI_NAME = 'The name of your GUI window' _GuiImageHole($_GUI_NAME, $_Left_pos, $_Top_pos, 376, 358) # <== End #comments-end #FUNCTION# ============================================================== Func _GuiImageHole($window_handle, $pos_x, $pos_y,$Image_Width ,$Image_Height) Local $aClassList, $aM_Mask, $aMask #Region picture array Local $PictArray[530] $PictArray[0] = '171,45,202,45' $PictArray[1] = '171,46,171,46' $PictArray[2] = '202,46,202,46' $PictArray[3] = '161,47,170,47' $PictArray[4] = '203,47,212,47' $PictArray[5] = '161,48,161,48' $PictArray[6] = '212,48,212,48' $PictArray[7] = '153,49,160,49' $PictArray[8] = '213,49,220,49' $PictArray[9] = '153,50,153,50' $PictArray[10] = '220,50,220,50' $PictArray[11] = '147,51,152,51' $PictArray[12] = '221,51,224,51' $PictArray[13] = '147,52,147,52' $PictArray[14] = '224,52,224,52' $PictArray[15] = '141,53,146,53' $PictArray[16] = '225,53,230,53' $PictArray[17] = '141,54,141,54' $PictArray[18] = '230,54,230,54' $PictArray[19] = '137,55,140,55' $PictArray[20] = '231,55,234,55' $PictArray[21] = '137,56,137,56' $PictArray[22] = '234,56,234,56' $PictArray[23] = '131,57,136,57' $PictArray[24] = '235,57,240,57' $PictArray[25] = '131,58,131,58' $PictArray[26] = '240,58,240,58' $PictArray[27] = '129,59,130,59' $PictArray[28] = '241,59,242,59' $PictArray[29] = '129,60,129,60' $PictArray[30] = '242,60,242,60' $PictArray[31] = '125,61,128,61' $PictArray[32] = '243,61,246,61' $PictArray[33] = '125,62,125,62' $PictArray[34] = '246,62,246,62' $PictArray[35] = '121,63,124,63' $PictArray[36] = '247,63,250,63' $PictArray[37] = '121,64,121,64' $PictArray[38] = '250,64,250,64' $PictArray[39] = '117,65,120,65' $PictArray[40] = '251,65,254,65' $PictArray[41] = '117,66,117,66' $PictArray[42] = '254,66,254,66' $PictArray[43] = '115,67,116,67' $PictArray[44] = '255,67,256,67' $PictArray[45] = '115,68,115,68' $PictArray[46] = '256,68,256,68' $PictArray[47] = '111,69,114,69' $PictArray[48] = '257,69,260,69' $PictArray[49] = '111,70,111,70' $PictArray[50] = '260,70,260,70' $PictArray[51] = '109,71,110,71' $PictArray[52] = '261,71,262,71' $PictArray[53] = '109,72,109,72' $PictArray[54] = '262,72,262,72' $PictArray[55] = '107,73,108,73' $PictArray[56] = '263,73,264,73' $PictArray[57] = '107,74,107,74' $PictArray[58] = '264,74,264,74' $PictArray[59] = '105,75,106,75' $PictArray[60] = '265,75,268,75' $PictArray[61] = '105,76,105,76' $PictArray[62] = '268,76,268,76' $PictArray[63] = '101,77,104,77' $PictArray[64] = '269,77,270,77' $PictArray[65] = '101,78,101,78' $PictArray[66] = '270,78,270,78' $PictArray[67] = '99,79,100,79' $PictArray[68] = '271,79,272,79' $PictArray[69] = '99,80,99,80' $PictArray[70] = '272,80,272,80' $PictArray[71] = '97,81,98,81' $PictArray[72] = '273,81,274,81' $PictArray[73] = '97,82,97,82' $PictArray[74] = '274,82,274,82' $PictArray[75] = '95,83,96,83' $PictArray[76] = '275,83,276,83' $PictArray[77] = '95,84,95,84' $PictArray[78] = '276,84,276,84' $PictArray[79] = '93,85,94,85' $PictArray[80] = '277,85,278,85' $PictArray[81] = '93,86,93,86' $PictArray[82] = '278,86,278,86' $PictArray[83] = '91,87,92,87' $PictArray[84] = '279,87,280,87' $PictArray[85] = '91,88,91,88' $PictArray[86] = '280,88,280,88' $PictArray[87] = '89,89,90,89' $PictArray[88] = '281,89,282,89' $PictArray[89] = '89,90,89,90' $PictArray[90] = '282,90,282,90' $PictArray[91] = '87,91,88,91' $PictArray[92] = '283,91,284,91' $PictArray[93] = '87,92,87,92' $PictArray[94] = '284,92,284,92' $PictArray[95] = '85,93,86,93' $PictArray[96] = '285,93,286,93' $PictArray[97] = '85,94,85,94' $PictArray[98] = '286,94,286,94' $PictArray[99] = '85,95,85,95' $PictArray[100] = '286,95,286,95' $PictArray[101] = '85,96,85,96' $PictArray[102] = '286,96,286,96' $PictArray[103] = '83,97,84,97' $PictArray[104] = '287,97,288,97' $PictArray[105] = '83,98,83,98' $PictArray[106] = '288,98,288,98' $PictArray[107] = '81,99,82,99' $PictArray[108] = '289,99,290,99' $PictArray[109] = '81,100,81,100' $PictArray[110] = '290,100,290,100' $PictArray[111] = '79,101,80,101' $PictArray[112] = '291,101,292,101' $PictArray[113] = '79,102,79,102' $PictArray[114] = '292,102,292,102' $PictArray[115] = '79,103,79,103' $PictArray[116] = '293,103,294,103' $PictArray[117] = '79,104,79,104' $PictArray[118] = '294,104,294,104' $PictArray[119] = '77,105,78,105' $PictArray[120] = '294,105,294,105' $PictArray[121] = '77,106,77,106' $PictArray[122] = '294,106,294,106' $PictArray[123] = '75,107,76,107' $PictArray[124] = '295,107,296,107' $PictArray[125] = '75,108,75,108' $PictArray[126] = '296,108,296,108' $PictArray[127] = '75,109,75,109' $PictArray[128] = '297,109,298,109' $PictArray[129] = '75,110,75,110' $PictArray[130] = '298,110,298,110' $PictArray[131] = '73,111,74,111' $PictArray[132] = '298,111,298,111' $PictArray[133] = '73,112,73,112' $PictArray[134] = '298,112,298,112' $PictArray[135] = '71,113,72,113' $PictArray[136] = '299,113,300,113' $PictArray[137] = '71,114,71,114' $PictArray[138] = '300,114,300,114' $PictArray[139] = '71,115,71,115' $PictArray[140] = '300,115,300,115' $PictArray[141] = '71,116,71,116' $PictArray[142] = '300,116,300,116' $PictArray[143] = '69,117,70,117' $PictArray[144] = '301,117,302,117' $PictArray[145] = '69,118,69,118' $PictArray[146] = '302,118,302,118' $PictArray[147] = '69,119,69,119' $PictArray[148] = '302,119,302,119' $PictArray[149] = '69,120,69,120' $PictArray[150] = '302,120,302,120' $PictArray[151] = '67,121,68,121' $PictArray[152] = '303,121,304,121' $PictArray[153] = '67,122,67,122' $PictArray[154] = '304,122,304,122' $PictArray[155] = '67,123,67,123' $PictArray[156] = '305,123,306,123' $PictArray[157] = '67,124,67,124' $PictArray[158] = '306,124,306,124' $PictArray[159] = '65,125,66,125' $PictArray[160] = '306,125,306,125' $PictArray[161] = '65,126,65,126' $PictArray[162] = '306,126,306,126' $PictArray[163] = '65,127,65,127' $PictArray[164] = '307,127,308,127' $PictArray[165] = '65,128,65,128' $PictArray[166] = '308,128,308,128' $PictArray[167] = '63,129,64,129' $PictArray[168] = '308,129,308,129' $PictArray[169] = '63,130,63,130' $PictArray[170] = '308,130,308,130' $PictArray[171] = '63,131,63,131' $PictArray[172] = '308,131,308,131' $PictArray[173] = '63,132,63,132' $PictArray[174] = '308,132,308,132' $PictArray[175] = '61,133,62,133' $PictArray[176] = '309,133,310,133' $PictArray[177] = '61,134,61,134' $PictArray[178] = '310,134,310,134' $PictArray[179] = '61,135,61,135' $PictArray[180] = '310,135,310,135' $PictArray[181] = '61,136,61,136' $PictArray[182] = '310,136,310,136' $PictArray[183] = '61,137,61,137' $PictArray[184] = '311,137,312,137' $PictArray[185] = '61,138,61,138' $PictArray[186] = '312,138,312,138' $PictArray[187] = '59,139,60,139' $PictArray[188] = '312,139,312,139' $PictArray[189] = '59,140,59,140' $PictArray[190] = '312,140,312,140' $PictArray[191] = '59,141,59,141' $PictArray[192] = '312,141,312,141' $PictArray[193] = '59,142,59,142' $PictArray[194] = '312,142,312,142' $PictArray[195] = '59,143,59,143' $PictArray[196] = '313,143,314,143' $PictArray[197] = '59,144,59,144' $PictArray[198] = '314,144,314,144' $PictArray[199] = '57,145,58,145' $PictArray[200] = '314,145,314,145' $PictArray[201] = '57,146,57,146' $PictArray[202] = '314,146,314,146' $PictArray[203] = '57,147,57,147' $PictArray[204] = '314,147,314,147' $PictArray[205] = '57,148,57,148' $PictArray[206] = '314,148,314,148' $PictArray[207] = '57,149,57,149' $PictArray[208] = '314,149,314,149' $PictArray[209] = '57,150,57,150' $PictArray[210] = '314,150,314,150' $PictArray[211] = '57,151,57,151' $PictArray[212] = '315,151,316,151' $PictArray[213] = '57,152,57,152' $PictArray[214] = '316,152,316,152' $PictArray[215] = '55,153,56,153' $PictArray[216] = '316,153,316,153' $PictArray[217] = '55,154,55,154' $PictArray[218] = '316,154,316,154' $PictArray[219] = '55,155,55,155' $PictArray[220] = '316,155,316,155' $PictArray[221] = '55,156,55,156' $PictArray[222] = '316,156,316,156' $PictArray[223] = '55,157,55,157' $PictArray[224] = '316,157,316,157' $PictArray[225] = '55,158,55,158' $PictArray[226] = '316,158,316,158' $PictArray[227] = '55,159,55,159' $PictArray[228] = '316,159,316,159' $PictArray[229] = '55,160,55,160' $PictArray[230] = '316,160,316,160' $PictArray[231] = '55,161,55,161' $PictArray[232] = '317,161,318,161' $PictArray[233] = '55,162,55,162' $PictArray[234] = '318,162,318,162' $PictArray[235] = '55,163,55,163' $PictArray[236] = '318,163,318,163' $PictArray[237] = '55,164,55,164' $PictArray[238] = '318,164,318,164' $PictArray[239] = '53,165,54,165' $PictArray[240] = '318,165,318,165' $PictArray[241] = '53,166,53,166' $PictArray[242] = '318,166,318,166' $PictArray[243] = '53,167,53,167' $PictArray[244] = '318,167,318,167' $PictArray[245] = '53,168,53,168' $PictArray[246] = '318,168,318,168' $PictArray[247] = '53,169,53,169' $PictArray[248] = '318,169,318,169' $PictArray[249] = '53,170,53,170' $PictArray[250] = '318,170,318,170' $PictArray[251] = '53,171,53,171' $PictArray[252] = '318,171,318,171' $PictArray[253] = '53,172,53,172' $PictArray[254] = '318,172,318,172' $PictArray[255] = '53,173,53,173' $PictArray[256] = '318,173,318,173' $PictArray[257] = '53,174,53,174' $PictArray[258] = '318,174,318,174' $PictArray[259] = '53,175,53,175' $PictArray[260] = '318,175,318,175' $PictArray[261] = '53,176,53,176' $PictArray[262] = '318,176,318,176' $PictArray[263] = '53,177,53,177' $PictArray[264] = '318,177,318,177' $PictArray[265] = '53,178,53,178' $PictArray[266] = '318,178,318,178' $PictArray[267] = '53,179,53,179' $PictArray[268] = '318,179,318,179' $PictArray[269] = '53,180,53,180' $PictArray[270] = '318,180,318,180' $PictArray[271] = '53,181,53,181' $PictArray[272] = '318,181,318,181' $PictArray[273] = '53,182,53,182' $PictArray[274] = '318,182,318,182' $PictArray[275] = '53,183,53,183' $PictArray[276] = '318,183,318,183' $PictArray[277] = '53,184,53,184' $PictArray[278] = '318,184,318,184' $PictArray[279] = '53,185,53,185' $PictArray[280] = '318,185,318,185' $PictArray[281] = '53,186,53,186' $PictArray[282] = '318,186,318,186' $PictArray[283] = '53,187,53,187' $PictArray[284] = '318,187,318,187' $PictArray[285] = '53,188,53,188' $PictArray[286] = '318,188,318,188' $PictArray[287] = '53,189,53,189' $PictArray[288] = '318,189,318,189' $PictArray[289] = '53,190,54,190' $PictArray[290] = '318,190,318,190' $PictArray[291] = '55,191,55,191' $PictArray[292] = '318,191,318,191' $PictArray[293] = '55,192,55,192' $PictArray[294] = '318,192,318,192' $PictArray[295] = '55,193,55,193' $PictArray[296] = '318,193,318,193' $PictArray[297] = '55,194,55,194' $PictArray[298] = '317,194,318,194' $PictArray[299] = '55,195,55,195' $PictArray[300] = '316,195,316,195' $PictArray[301] = '55,196,55,196' $PictArray[302] = '316,196,316,196' $PictArray[303] = '55,197,55,197' $PictArray[304] = '316,197,316,197' $PictArray[305] = '55,198,55,198' $PictArray[306] = '316,198,316,198' $PictArray[307] = '55,199,55,199' $PictArray[308] = '316,199,316,199' $PictArray[309] = '55,200,55,200' $PictArray[310] = '316,200,316,200' $PictArray[311] = '55,201,55,201' $PictArray[312] = '316,201,316,201' $PictArray[313] = '55,202,56,202' $PictArray[314] = '316,202,316,202' $PictArray[315] = '57,203,57,203' $PictArray[316] = '316,203,316,203' $PictArray[317] = '57,204,57,204' $PictArray[318] = '315,204,316,204' $PictArray[319] = '57,205,57,205' $PictArray[320] = '314,205,314,205' $PictArray[321] = '57,206,57,206' $PictArray[322] = '314,206,314,206' $PictArray[323] = '57,207,57,207' $PictArray[324] = '314,207,314,207' $PictArray[325] = '57,208,57,208' $PictArray[326] = '314,208,314,208' $PictArray[327] = '57,209,57,209' $PictArray[328] = '314,209,314,209' $PictArray[329] = '57,210,58,210' $PictArray[330] = '314,210,314,210' $PictArray[331] = '59,211,59,211' $PictArray[332] = '314,211,314,211' $PictArray[333] = '59,212,59,212' $PictArray[334] = '313,212,314,212' $PictArray[335] = '59,213,59,213' $PictArray[336] = '312,213,312,213' $PictArray[337] = '59,214,59,214' $PictArray[338] = '312,214,312,214' $PictArray[339] = '59,215,59,215' $PictArray[340] = '312,215,312,215' $PictArray[341] = '59,216,60,216' $PictArray[342] = '312,216,312,216' $PictArray[343] = '61,217,61,217' $PictArray[344] = '312,217,312,217' $PictArray[345] = '61,218,61,218' $PictArray[346] = '311,218,312,218' $PictArray[347] = '61,219,61,219' $PictArray[348] = '310,219,310,219' $PictArray[349] = '61,220,61,220' $PictArray[350] = '310,220,310,220' $PictArray[351] = '61,221,61,221' $PictArray[352] = '310,221,310,221' $PictArray[353] = '61,222,62,222' $PictArray[354] = '309,222,310,222' $PictArray[355] = '63,223,63,223' $PictArray[356] = '308,223,308,223' $PictArray[357] = '63,224,63,224' $PictArray[358] = '308,224,308,224' $PictArray[359] = '63,225,63,225' $PictArray[360] = '308,225,308,225' $PictArray[361] = '63,226,64,226' $PictArray[362] = '308,226,308,226' $PictArray[363] = '65,227,65,227' $PictArray[364] = '308,227,308,227' $PictArray[365] = '65,228,65,228' $PictArray[366] = '307,228,308,228' $PictArray[367] = '65,229,65,229' $PictArray[368] = '306,229,306,229' $PictArray[369] = '65,230,66,230' $PictArray[370] = '306,230,306,230' $PictArray[371] = '67,231,67,231' $PictArray[372] = '306,231,306,231' $PictArray[373] = '67,232,67,232' $PictArray[374] = '305,232,306,232' $PictArray[375] = '67,233,67,233' $PictArray[376] = '304,233,304,233' $PictArray[377] = '67,234,68,234' $PictArray[378] = '303,234,304,234' $PictArray[379] = '69,235,69,235' $PictArray[380] = '302,235,302,235' $PictArray[381] = '69,236,69,236' $PictArray[382] = '302,236,302,236' $PictArray[383] = '69,237,69,237' $PictArray[384] = '302,237,302,237' $PictArray[385] = '69,238,70,238' $PictArray[386] = '301,238,302,238' $PictArray[387] = '71,239,71,239' $PictArray[388] = '300,239,300,239' $PictArray[389] = '71,240,71,240' $PictArray[390] = '300,240,300,240' $PictArray[391] = '71,241,71,241' $PictArray[392] = '300,241,300,241' $PictArray[393] = '71,242,72,242' $PictArray[394] = '299,242,300,242' $PictArray[395] = '73,243,73,243' $PictArray[396] = '298,243,298,243' $PictArray[397] = '73,244,74,244' $PictArray[398] = '298,244,298,244' $PictArray[399] = '75,245,75,245' $PictArray[400] = '298,245,298,245' $PictArray[401] = '75,246,75,246' $PictArray[402] = '297,246,298,246' $PictArray[403] = '75,247,75,247' $PictArray[404] = '296,247,296,247' $PictArray[405] = '75,248,76,248' $PictArray[406] = '295,248,296,248' $PictArray[407] = '77,249,77,249' $PictArray[408] = '294,249,294,249' $PictArray[409] = '77,250,78,250' $PictArray[410] = '293,250,294,250' $PictArray[411] = '79,251,79,251' $PictArray[412] = '292,251,292,251' $PictArray[413] = '79,252,79,252' $PictArray[414] = '292,252,292,252' $PictArray[415] = '79,253,79,253' $PictArray[416] = '292,253,292,253' $PictArray[417] = '79,254,80,254' $PictArray[418] = '291,254,292,254' $PictArray[419] = '81,255,81,255' $PictArray[420] = '290,255,290,255' $PictArray[421] = '81,256,82,256' $PictArray[422] = '289,256,290,256' $PictArray[423] = '83,257,83,257' $PictArray[424] = '288,257,288,257' $PictArray[425] = '83,258,83,258' $PictArray[426] = '287,258,288,258' $PictArray[427] = '83,259,83,259' $PictArray[428] = '286,259,286,259' $PictArray[429] = '83,260,84,260' $PictArray[430] = '286,260,286,260' $PictArray[431] = '85,261,85,261' $PictArray[432] = '286,261,286,261' $PictArray[433] = '85,262,85,262' $PictArray[434] = '285,262,286,262' $PictArray[435] = '85,263,85,263' $PictArray[436] = '284,263,284,263' $PictArray[437] = '85,264,86,264' $PictArray[438] = '283,264,284,264' $PictArray[439] = '87,265,87,265' $PictArray[440] = '282,265,282,265' $PictArray[441] = '87,266,88,266' $PictArray[442] = '281,266,282,266' $PictArray[443] = '89,267,89,267' $PictArray[444] = '280,267,280,267' $PictArray[445] = '89,268,90,268' $PictArray[446] = '280,268,280,268' $PictArray[447] = '91,269,91,269' $PictArray[448] = '280,269,280,269' $PictArray[449] = '91,270,92,270' $PictArray[450] = '279,270,280,270' $PictArray[451] = '93,271,93,271' $PictArray[452] = '278,271,278,271' $PictArray[453] = '93,272,94,272' $PictArray[454] = '277,272,278,272' $PictArray[455] = '95,273,95,273' $PictArray[456] = '276,273,276,273' $PictArray[457] = '95,274,98,274' $PictArray[458] = '275,274,276,274' $PictArray[459] = '99,275,99,275' $PictArray[460] = '274,275,274,275' $PictArray[461] = '99,276,100,276' $PictArray[462] = '271,276,274,276' $PictArray[463] = '101,277,101,277' $PictArray[464] = '270,277,270,277' $PictArray[465] = '101,278,102,278' $PictArray[466] = '269,278,270,278' $PictArray[467] = '103,279,103,279' $PictArray[468] = '268,279,268,279' $PictArray[469] = '103,280,104,280' $PictArray[470] = '267,280,268,280' $PictArray[471] = '105,281,105,281' $PictArray[472] = '266,281,266,281' $PictArray[473] = '105,282,106,282' $PictArray[474] = '265,282,266,282' $PictArray[475] = '107,283,107,283' $PictArray[476] = '264,283,264,283' $PictArray[477] = '107,284,110,284' $PictArray[478] = '261,284,264,284' $PictArray[479] = '111,285,111,285' $PictArray[480] = '260,285,260,285' $PictArray[481] = '111,286,112,286' $PictArray[482] = '259,286,260,286' $PictArray[483] = '113,287,113,287' $PictArray[484] = '258,287,258,287' $PictArray[485] = '113,288,116,288' $PictArray[486] = '257,288,258,288' $PictArray[487] = '117,289,117,289' $PictArray[488] = '256,289,256,289' $PictArray[489] = '117,290,120,290' $PictArray[490] = '253,290,256,290' $PictArray[491] = '121,291,121,291' $PictArray[492] = '252,291,252,291' $PictArray[493] = '121,292,124,292' $PictArray[494] = '249,292,252,292' $PictArray[495] = '125,293,125,293' $PictArray[496] = '248,293,248,293' $PictArray[497] = '125,294,128,294' $PictArray[498] = '245,294,248,294' $PictArray[499] = '129,295,129,295' $PictArray[500] = '244,295,244,295' $PictArray[501] = '129,296,132,296' $PictArray[502] = '239,296,244,296' $PictArray[503] = '133,297,133,297' $PictArray[504] = '238,297,238,297' $PictArray[505] = '133,298,136,298' $PictArray[506] = '235,298,238,298' $PictArray[507] = '137,299,137,299' $PictArray[508] = '234,299,234,299' $PictArray[509] = '137,300,140,300' $PictArray[510] = '231,300,234,300' $PictArray[511] = '141,301,141,301' $PictArray[512] = '230,301,230,301' $PictArray[513] = '141,302,146,302' $PictArray[514] = '225,302,230,302' $PictArray[515] = '147,303,147,303' $PictArray[516] = '224,303,224,303' $PictArray[517] = '147,304,152,304' $PictArray[518] = '219,304,224,304' $PictArray[519] = '153,305,153,305' $PictArray[520] = '218,305,218,305' $PictArray[521] = '153,306,160,306' $PictArray[522] = '211,306,218,306' $PictArray[523] = '161,307,161,307' $PictArray[524] = '210,307,210,307' $PictArray[525] = '161,308,170,308' $PictArray[526] = '201,308,210,308' $PictArray[527] = '171,309,171,309' $PictArray[528] = '200,309,200,309' $PictArray[529] = '171,310,200,310' #EndRegion picture array ; get the size of the active window $size = WinGetClientSize($window_handle) $Window_width = $size[0] $Window_height = $size[1] + 40 ; include height of title bar up to 30 dots ; First hide the window $aClassList = StringSplit(_WinGetClassListEx($window_handle), @LF) $aM_Mask = DllCall('gdi32.dll', 'long', 'CreateRectRgn', 'long', 0, 'long', 0, 'long', 0, 'long', 0) ; rectangle A - left side $aMask = DllCall('gdi32.dll', 'long', 'CreateRectRgn', 'long', 0, 'long', 0, 'long', $pos_x, 'long', $Window_height) DllCall('gdi32.dll', 'long', 'CombineRgn', 'long', $aM_Mask[0], 'long', $aMask[0], 'long', $aM_Mask[0], 'int', 2) ; rectangle B - Top $aMask = DllCall('gdi32.dll', 'long', 'CreateRectRgn', 'long', 0, 'long', 0, 'long', $Window_width, 'long', $pos_y) DllCall('gdi32.dll', 'long', 'CombineRgn', 'long', $aM_Mask[0], 'long', $aMask[0], 'long', $aM_Mask[0], 'int', 2) ; rectangle C - Right side $aMask = DllCall('gdi32.dll', 'long', 'CreateRectRgn', 'long', $pos_x + $Image_Width , 'long', 0 , 'long', $Window_width + 30, 'long', $Window_height) DllCall('gdi32.dll', 'long', 'CombineRgn', 'long', $aM_Mask[0], 'long', $aMask[0], 'long', $aM_Mask[0], 'int', 2) ; rectangle D - Bottom $aMask = DllCall('gdi32.dll', 'long', 'CreateRectRgn', 'long', 0 , 'long', $pos_y + $Image_Height, 'long', $Window_width, 'long', $Window_height) DllCall('gdi32.dll', 'long', 'CombineRgn', 'long', $aM_Mask[0], 'long', $aMask[0], 'long', $aM_Mask[0], 'int', 2) ; now unhide all regions as defined in array $PictArray For $i = 0 To (UBound($PictArray) - 1) $Block_value = StringSplit($PictArray[$i],',') $aMask = DllCall('gdi32.dll', 'long', 'CreateRectRgn', 'long', $pos_x + $Block_value[1] - 1 , 'long', $pos_y + $Block_value[2], 'long', $pos_x + $Block_value[3], 'long', $pos_y + $Block_value[4] -1) DllCall('gdi32.dll', 'long', 'CombineRgn', 'long', $aM_Mask[0], 'long', $aMask[0], 'long', $aM_Mask[0], 'int', 2) Next DllCall('user32.dll', 'long', 'SetWindowRgn', 'hwnd', $window_handle, 'long', $aM_Mask[0], 'int', 1) $PictArray='' ; empty array EndFunc ;==>_GuiImageHole #FUNCTION# ============================================================== Func _WinGetClassListEx($sTitle) Local $sClassList = WinGetClassList($sTitle) Local $aClassList = StringSplit($sClassList, @LF) Local $sRetClassList = '', $sHold_List = '|' Local $aiInHold, $iInHold For $i = 1 To UBound($aClassList) - 1 If $aClassList[$i] = '' Then ContinueLoop If StringRegExp($sHold_List, '\|' & $aClassList[$i] & '~(\d+)\|') Then $aiInHold = StringRegExp($sHold_List, '.*\|' & $aClassList[$i] & '~(\d+)\|.*', 1) $iInHold = Number($aiInHold[UBound($aiInHold)-1]) If $iInHold = 0 Then $iInHold += 1 $aClassList[$i] &= '~' & $iInHold + 1 $sHold_List &= $aClassList[$i] & '|' $sRetClassList &= $aClassList[$i] & @LF Else $aClassList[$i] &= '~1' $sHold_List &= $aClassList[$i] & '|' $sRetClassList &= $aClassList[$i] & @LF EndIf Next Return StringReplace(StringStripWS($sRetClassList, 3), '~', '') EndFunc ;==>_WinGetClassListEx #FUNCTION# ==============================================================