1. Will not work in win32lib BUT does work in its OWN folder... Why ?

Hello ,

Selgor here.

The following programme works.

But, when I put the includes into winlib Include file, and run the prog in the eudir environment it gives all sorts of error messages.

Sure the code is old .

So.. how do I bring it into the "new world" of euphoria?

shellExecute will not work. Button will not work yet PushButton does.

So, can someone point out the start to recode ??

I am learning. But, this is all beyond me.

Old files will not work.

Surely there is a way around.

Or maybe I stick with the old ???

Please help a learner ...

Programme below.

Thank you for your help.

Selgor.

Here it is :- .....

 
 
 
include getsysms.ew 
include win32lib.ew 
include shellex.ew 
 
constant screenwidth = GetSystemMetrics(SM_CXSCREEN) 
 
constant slewidth = screenwidth - 102 
 
global constant MainWindow=create(Window, "RUNBAR", 0, 0, 520, screenwidth, 22, WS_POPUP) 
 
global constant RUN=create(PushButton,"RUN", MainWindow,990, 3, 30, 17, 0) 
  setFont(RUN, "Tahooma", 10, 21) 
global constant SLE=create(EditText, "", MainWindow, 710, 3, slewidth-650, 16, 0) --was slewidth only 
  setFont(SLE, "MS Sans Serif", 6, 0) 
global constant CLOSE=create(PushButton,"CLOSE", MainWindow, 655 , 3, 48, 17, 0) 
  setFont(CLOSE, "MS Sans Serif", 6, 0) 
global constant BUT=create(PushButton,"C: ", MainWindow, 0, 3, 48, 17, 0) 
  setFont(BUT, "MS Sans Serif", 6, 0) 
 
  setWindowBackColor(MainWindow, rgb(100,182,162)) -- was 192,192,192 
 
procedure onClick_CLOSE() 
  closeWindow(MainWindow) 
end procedure 
onClick[CLOSE] = routine_id("onClick_CLOSE") 
 
procedure onClick_RUN() 
integer result 
 result = ExecProgram(MainWindow, getText(SLE)) 
end procedure 
onClick[RUN] = routine_id("onClick_RUN") 
 
procedure onClick_BUT() 
  integer result1 
  result1 = ExecProgram(MainWindow, "c:\\")--getText(SLE)) 
  closeWindow(MainWindow) 
end procedure 
onClick[BUT] = routine_id("onClick_BUT") 
 
procedure KeyPress(integer keycode) 
  integer result 
  if keycode = 13 then 
    result = ExecProgram(MainWindow, getText(SLE)) 
  end if 
end procedure 
onKeyPress[SLE] = routine_id("KeyPress") 
 
WinMain(MainWindow) 
 
 
 
new topic     » topic index » view message » categorize

2. Re: Will not work in win32lib BUT does work in its OWN folder... Why ?

Selgor said...

The following programme works.

But, when I put the includes into winlib Include file, and run the prog in the eudir environment it gives all sorts of error messages.

Sure the code is old .

So.. how do I bring it into the "new world" of euphoria?

shellExecute will not work. Button will not work yet PushButton does.

So, can someone point out the start to recode ??

I am learning. But, this is all beyond me.

Old files will not work.

Surely there is a way around.

Or maybe I stick with the old ???

Please help a learner ...

I haven't got time to write a detailed response yet. The problem is that the program you gave is no longer supported using the current win32lib. It has nothing to do with Euphoria.

The onXXX[] interface was removed from win32lib many years ago. You need to replace those with the setHandler() interface.

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

Search



Quick Links

User menu

Not signed in.

Misc Menu