forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


MDI Application Example

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 5 Source Code
View previous topic :: View next topic  
Author Message
cnodnarb
Professional Member
Professional Member


Joined: 11 Sep 2002
Posts: 762
Location: Rockeledge, GA

PostPosted: Fri Apr 15, 2011 6:52 am    Post subject: MDI Application Example Reply with quote

Not a true MDI Application....but a good mock up.

Code:
external @path(%0)vdsbrw50.dll
#define function,browser
#define command,browser
  DIALOG CREATE,Google MDI,-1,0,1039,570,,class toolparent,,resizable
REM *** Modified by Dialog Designer on 4/15/2011 - 00:36 ***
  DIALOG ADD,MENU,&File,&New|CTRL+N
  dialog add,menu,&Window,Minimi&ze All,Ma&ximize All,&Cascade All
  DIALOG ADD,TEXT,TEXT1,35,5,,,Browser windows may not invade above here for future toolbars, buttons etc
  DIALOG SHOW
 
  DIALOG CREATE,parent,50,0,1039,550,NOTITLE,,class parent
  %%parent = @winexists(#parent)
REM *** Modified by Dialog Designer on 4/15/2011 - 00:33 ***
LOADLIB user32.dll
  if @ok()
  %%dummy = @lib(user32.dll,SetParent,NIL,@strdel(%%parent,1,1),@strdel(@winexists(#toolparent),1,1))
  end
  FREELIB user32.dll
  dialog show

 
  %%dialog = 0
  %%google = 1
  %%count = 1

  :timer
  if @equal(%%count,%%google)
  %%count = 1
  else
  %%count = @succ(%%count)
  dialog select,%%count
  if @browser(@dlgtext(text2),NAME)
dialog title,@browser(@dlgtext(text2),NAME)
end
  end
 
  :evloop
wait event,1
parse "%%event;%%dialog",@event(d)
dialog select,%%dialog
goto %%event

:newmenu
  %%w = @dlgpos(,w)
  %%h = @dlgpos(,h)
  DIALOG CREATE,Google,0,0,%%w,%%h,,CLASS child,,resizable
  %%google = @succ(%%google)
  %%bgoogle = @succ(%%bgoogle)
REM *** Modified by Dialog Designer on 4/14/2011 - 18:15 ***
dialog add,text,text1,0,0,0,0,@winexists(#child)
dialog add,text,text2,0,0,0,0,browser%%bgoogle
LOADLIB user32.dll
  if @ok()
  %%dummy = @lib(user32.dll,SetParent,NIL,@strdel(@winexists(#child),1,1),@strdel(%%parent,1,1))
  end
  FREELIB user32.dll
option errortrap,""
  DIALOG ADD,browser,browser%%bgoogle,2,1,%%w,%%h,http://www.google.com
  wait .1
  DIALOG SHOW
   loadlib "psapi.dll"
  %t = @lib("psapi.dll","EmptyWorkingSet",INT:,-1)
  freelib "psapi.dll"
  goto evloop
 
  :close
  if @equal(%%dialog,0)
exit
  else
  dialog close
  %%x = @event()
  dialog close
  %x = @event()
  %%google = @diff(%%google,1)
  %%count = 1
  goto evloop
 
  :resize
    if @equal(%%dialog,0)
    %%w = @dlgpos(,w)
    %%h = @dlgpos(,h)
    dialog select,1
    window position,%%parent,50,0,%%w,@diff(%%h,50)
    goto evloop
end
if @browser(@dlgtext(text2),NAME)
dialog title,@browser(@dlgtext(text2),NAME)
end
  dialog setpos,@dlgtext(text2),0,0,@dlgpos(,w),@dlgpos(,h)
  goto evloop

:minimize allmenu
%%count = 1
:minimize
if @equal(%%count,%%google)
  %%count = 1
    goto evloop
  else
  %%count = @succ(%%count)
  dialog select,%%count
  window iconize,@dlgtext(text1)
  gosub resize2
  end
  goto minimize
 
  :maximize allmenu
  %%count = 1
:maximize
if @equal(%%count,%%google)
  %%count = 1
    goto evloop
  else
  %%count = @succ(%%count)
  dialog select,%%count
  window maximize,@dlgtext(text1)
    gosub resize2
  end
  goto maximize
 
    :cascade allmenu
    :Cascadeall
    %%count = 1
    %%tl = 0
:cascade
if @equal(%%count,%%google)
  %%count = 1
    goto evloop
  else
  %%count = @succ(%%count)
  dialog select,1
  %%w = @dlgpos(,w)
  %%h = @dlgpos(,h)
  dialog select,%%count
  window normal,@dlgtext(text1)
  window activate,@dlgtext(text1)
  window position,@dlgtext(text1),%%tl,%%tl,@diff(%%w,%%tl),@diff(%%h,%%tl)
  %%tl = @sum(%%tl,40)
    gosub resize2
  end
  goto cascade
 
  :resize2
if @browser(@dlgtext(text2),NAME)
dialog title,@browser(@dlgtext(text2),NAME)
end
dialog setpos,@dlgtext(text2),0,0,@dlgpos(,w),@dlgpos(,h)
  exit
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 5 Source Code All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group