Bun venit pe SkullBox!

Bine ai venit, Vizitator. Trebuie să te autentifici sau să îţi creezi un cont.
Ai pierdut sau nu ai primit emailul care conţine codul de activare al contului?

Autentifică-te cu numele de utilizator, parola şi precizează durata sesiunii.
  Pagini: [1]
  Imprimă  
[DBPro] MsgBox()  (Vizualizari 369)
Challenge
*

Deconectat Deconectat

Mesaje: 96

[DBPro] MsgBox(), Dec 09, 2007, 09:25

Un cod care face exact ce face si functia din VB "MsgBox()".Aveti si un exmplu cum trebuie folosit.

Cod:
#constant MsgOKOnly           = 0
#constant MsgOKCancel         = 1
#constant MsgAbortRetryIgnore = 2
#constant MsgYesNoCancel      = 3
#constant MsgYesNo            = 4
#constant MsgRetryCancel      = 5
#constant MsgCritical         = 16
#constant MsgQuestion         = 32
#constant MsgExclamation      = 48
#constant MsgInformation      = 64
#constant MsgDefaultButton1   = 0
#constant MsgDefaultButton2   = 256
#constant MsgDefaultButton3   = 512
#constant MsgApplicationModal = 0
#constant MsgSystemModal      = 4096
#constant MsgOK     = 1
#constant MsgCancel = 2
#constant MsgAbort  = 3
#constant MsgRetry  = 4
#constant MsgIgnore = 5
#constant MsgYes    = 6
#constant MsgNo     = 7

i as integer
repeat
i = msgbox("Do you want to Exit?",MsgYesNo+MsgCritical,"Quit")
if i = MsgNo then wait 500
until i = MsgYes

function MsgBox(msg as string,opts as integer,title as string)
local dll_num as integer : local hwnd as integer
local response as integer
dll_num = FreeDll()
if dll_num > 0
  load dll "user32.dll",dll_num
    hwnd = call dll (dll_num,"GetActiveWindow")
    response = call dll (dll_num,"MessageBoxA",hwnd,msg,title,opts)
  delete dll dll_num
else
  response = -1
endif
endfunction response

function FreeDll()
local i as integer : stop as integer
repeat
  inc i
  if i < 256 then if dll exist(i)=0 then stop = 1
until stop = 1 or i > 255
if i > 255 then i = 0
endfunction i
Codul nu este scris de mine bineinteles.Dar l-am postat pentru cei care au nevoie de el.
Memorat
SkullAds
Ecspert
ReclAmator
* * * * *
Google AdSense

Gen: Bărbat
Mesaje: Multe

Reclama AdSense,
 

 
   


Pagini: [1]
  Imprimă  
 
Schimbă forumul:  

Ethical hacking and programming community
Powered by SMF 1.1.7 | SMF © 2006-2008, Simple Machines LLC
Traducerea în limba română © 2006-2007 www.smf.ro