function makeFormTransparent(form)

  form.Color = 0xFFFFFF

  if cheatEngineIs64Bit() then

    handle = readQwordLocal(userDataToInteger(form)+0x538)

    script = [[
    alloc(thread,128)
    createthread(thread)
    thread:
    lea rsp,[rsp-40]
    mov rcx,handle
    mov edx,FFFFFFEC
    call user32.GetWindowLongA
    mov r8d,eax
    or r8d,00080000
    mov rcx,handle
    mov edx,FFFFFFEC
    call user32.SetWindowLongA
    mov rcx,handle
    mov edx,00FFFFFF  //color white
    mov r8d,000000FF
    mov r9d,00000001
    call user32.SetLayeredWindowAttributes
    lea rsp,[rsp+40]
    ret
    ]]

    script=script:gsub('handle', string.format('%X',handle))

    autoAssemble(script,true)
  else

    handle = bAnd( readQwordLocal(userDataToInteger(form)+0x330) , 0xFFFFFFFF)

    script = [[
    alloc(thread,128)
    createthread(thread)
    thread:

    push -14
    push handle
    call user32.GetWindowLongA
    or eax,80000
    push eax
    push -14
    push handle
    call user32.SetWindowLongA
    push 01
    push 000000FF
    push 00FFFFFF
    push handle
    call user32.SetLayeredWindowAttributes

    ret
    ]]

    script=script:gsub('handle', string.format('%X',handle))

    autoAssemble(script,true)
  end
end