1. Win32 help

I'm using win32lib and having a problem setting focus to an SLE when returning from another program. Here's the code.

        retCode = system_exec("exw.exe " & "cse010a.exw " & "cse010 " 
						         & dbName & " " & str(WarehouseNbr) & " "  
						         & str(currentTicket) & " " 
						         & str(currentTicketLinkNbr) & " " 
						         & getText(sle[1]), 0) 
	csnaKey = sprintf("%2d%6d%3d%3d", {WarehouseNbr, currentTicket, currentTicketLinkNbr,0}) 
	csnaRec = readDb(csAssy, csnaKey) 
 
	if not EOF[csAssy] then 
        setText(sle[14], sprintf("%12.4f",csnaRec[csnaItemPrice])) -- price 
    	if equal(iccoRec[iccoDisplayCostFl],"Y") then 
    		setText(sle[15],sprintf("%12.4f", csnaRec[csnaItemCost])) 
    	else 
	    	setText(sle[15],"") 
	    end if 
	    setFocus(sle[11]) 
	else 
		tmp = message_box("Non-Stock Assembly has no items.","",0) 
		errCode = 1 
		csnaRec = csnaInit 
		setFocus(sle[10]) 
		return        			 
        end if 
 

The program "cse010a" has a return button. If I click the return button, focus is set to sle[11]. The return button is also the default button and if I just hit the "return/enter" on the keyboard it returns to the cse010 program but there is no focus anywhere.

Anyone know how to fix this?

new topic     » topic index » view message » categorize

2. Re: Win32 help

Another observation is that if there are no other apps on the task bar the both will focus properly to sle[11].

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu