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 Applications possible - ancient source code

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


Joined: 11 Sep 2002
Posts: 640
Location: Evansville, IN

PostPosted: Thu Apr 14, 2011 5:00 am    Post subject: MDI Applications possible - ancient source code Reply with quote

This source code is pretty ancient, and requires vdswnd.dll

I'm posting this because odd behavior of child window referencing top left of screen seems to be gone in the Windows OS, now references top corner of dialog window as it should.

For most the code you can remove the reference to vdsconv.dll, it'll run as long as you don't select a JPG for the background probably. Been awhile.

Sorry if I've posted this code in the past, I don't think I have.

Code:
inifile open,@path(%0)container.ini
title Window Container
external @path(%0)vdsconv.dll
rem external @path(%0)vdswnd.dll
external
  DIALOG CREATE,Window Container,0,0,320,240,class parent,resizable,savepos
dialog add,bitmap,bitmap1,0,0,320,240,,stretch
  dialog add,list,list1,0,0,0,0
  dialog add,list,list2,0,0,0,0
dialog add,menu,&Start,&Run,&Program Files,&Document Files,-,&Quick Launch,-,&Capture Window
dialog add,menu,&Container,&New Container,&Save Container,&Load Container,-,Set Container &Title,Set Container &Background
dialog add,menu,&Options,Set &Programs Folder,-,Set &Documents Folder,-,Set &Quick Launch Folder
dialog add,menu,&ScreenSavers,&Windows Folder,&System Folder
dialog add,menu,&Emulate Desk Size,640x480,800x600,1024x768,&Other
dialog add,menu,&Help,&Help Topics,-,&About Window Container
  DIALOG SHOW

window activate,#parent
%%parent = @winactive(i)
  if %1
  %%filedlg = %1
  goto loadcontainer1
  else
  end

%%background = @iniread(Options,Background)
if %%background
dialog set,bitmap1,%%background
else
end
 
:evloop
wait event
goto @event()

:runmenu
%%filedlg = @input(Run)
if @null(%%filedlg)
goto evloop
else
end
run %%filedlg
list add,list2,launch=%%filedlg
%%wait = 0
:waitloop
wait
%%wait = @succ(%%wait)
if @equal(%%wait,5)
info Unable to capture window.  Please capture the window by using Start","Capture Window.
goto evloop
else
end
%%winactive = @winactive(i)
if @equal(%%winactive,%%parent)
goto waitloop
else
end
%%winactiven = @winactive(c)
if @equal(%%winactiven,parent)
gosub inicheck
else
end
if @equal(%%contained,1)
goto evloop
else
end
list add,list1,%%winactive
wnd parent,%%winactive,%%parent
goto evloop


:new containermenu
shell open,%0
goto evloop

:close
REM List Seek Header by NodNarb
if @null(@text(list1))
exit
else
end
%%index = 0
%%count = @count(list1)
:listloop
list seek,list1,%%index
window activate,@item(list1)
window send,@item(list1),@alt(@key(f4))
%%wait = 0
:closeloop
if @not(@winexists(@item(list1)))
goto nextclose
else
end
wait
%%wait = @succ(%%wait)
if @equal(%%wait,10)
info This container was unable to close some windows"," and is unable to exit.  Please close any active windows within the container before exiting again.
goto evloop
else
end
goto closeloop
:nextclose
%%index = @succ(%%index)
if @equal(%%index,%%count)
exit
else
goto listloop
end

:resize
REM Resize Dialog to Fill Window VDH by NodNarb
parse "%a;%b;%c;%d",@winpos(%%parent,LTWH)
dialog setpos,bitmap1,0,0,@diff(%c,8),@diff(%d,45)
goto evloop

:quick launchmenu
%%quickdir = @iniread(Directories,Quick)
if @null(%%quickdir)
%%quickdir = @dirdlg(Select Quick Launch Directory,@windir()\Application Data\Microsoft\Internet Explorer\Quick Launch)
else
end
if %%quickdir
inifile write,Directories,Quick,%%quickdir
directory change,%%quickdir
else
end
%%filedlg = @filedlg(*.*)
if @null(%%filedlg)
goto evloop
else
list add,list2,launch=%%filedlg
shell open,%%filedlg
%%wait = 0
:waitloop
wait
%%wait = @succ(%%wait)
if @equal(%%wait,5)
info Unable to capture window.  Please capture the window by using Start","Capture Window.
goto evloop
else
end
%%winactive = @winactive(i)
if @equal(%%winactive,%%parent)
goto waitloop
else
end
%%winactiven = @winactive(c)
if @equal(%%winactiven,parent)
gosub inicheck
else
end
if @equal(%%contained,1)
goto evloop
else
end
list add,list1,%%winactive
wnd parent,%%winactive,%%parent
goto evloop

:Program Filesmenu
%%programdir = @iniread(Directories,Programs)
if @null(%%programdir)
%%programdir = @dirdlg(Select Programs Directory,@windir()\start menu\programs)
else
end
if %%programdir
inifile write,Directories,Programs,%%programdir
directory change,%%programdir
else
end
%%filedlg = @filedlg(*.*)
if @null(%%filedlg)
goto evloop
else
list add,list2,launch=%%filedlg
shell open,%%filedlg
%%wait = 0
:waitloop
wait
%%wait = @succ(%%wait)
if @equal(%%wait,5)
info Unable to capture window.  Please capture the window by using Start","Capture Window.
goto evloop
else
end
%%winactive = @winactive(i)
if @equal(%%winactive,%%parent)
goto waitloop
else
end
%%winactiven = @winactive(c)
if @equal(%%winactiven,parent)
gosub inicheck
else
end
if @equal(%%contained,1)
goto evloop
else
end
list add,list1,%%winactive
wnd parent,%%winactive,%%parent
goto evloop

:Document Filesmenu
%%docsdir = @iniread(Directories,Docs)
if @null(%%docsdir)
%%docsdir = @dirdlg(Select Document Directory,C:\My Documents)
else
end
if %%docsdir
inifile write,Directories,Docs,%%docsdir
directory change,%%docsdir
else
end
directory change,%%docsdir
%%filedlg = @filedlg(*.*)
if @null(%%filedlg)
goto evloop
else
list add,list2,launch=%%filedlg
shell open,%%filedlg
%%wait = 0
:waitloop
wait
%%wait = @succ(%%wait)
if @equal(%%wait,5)
info Unable to capture window.  Please capture the window by using Start","Capture Window.
goto evloop
else
end
%%winactive = @winactive(i)
if @equal(%%winactive,%%parent)
goto waitloop
else
end
%%winactiven = @winactive(c)
if @equal(%%winactiven,parent)
gosub inicheck
else
end
if @equal(%%contained,1)
goto evloop
else
end
list add,list1,%%winactive
wnd parent,%%winactive,%%parent
goto evloop


:set container backgroundmenu
%%filedlg = @filedlg(*.bmp;*.gif;*.jpg)
if @equal(@ext(%%filedlg),gif)
gosub convertgif
else
end
if @equal(@ext(%%filedlg),jpg)
gosub convertjpg
else
end
if %%filedlg
list add,list2,background=%%filedlg
dialog set,bitmap1,%%filedlg
inifile write,Options,Background,%%filedlg
else
end
goto evloop

:convertgif
%%ask = @ask(In order to use this file it requires to be copied into bitmap format.  Is it ok to copy this file to @path(%0)graphics?)
if @null(%%ask)
%%filedlg =
exit
else
end
directory create,@path(%0)graphics
convert gif2bmp,%%filedlg,@path(%0)graphics\@name(%%filedlg).bmp
%%filedlg = @path(%0)graphics\@name(%%filedlg).bmp
exit

:convertjpg
%%ask = @ask(In order to use this file it requires to be copied into bitmap format.  Is it ok to copy this file to @path(%0)graphics?)
if @null(%%ask)
%%filedlg =
exit
else
end
directory create,@path(%0)graphics
convert jpg2bmp,%%filedlg,@path(%0)graphics\@name(%%filedlg).bmp
%%filedlg = @path(%0)graphics\@name(%%filedlg).bmp
exit

:capture windowmenu
repeat
wait
until @not(@equal(@winactive(i),%%parent))
%%winactive = @winactive(i)
if @equal(%%parentwinq,%%parent)
goto evloop
else
end
%%winactiven = @winactive(c)
if @equal(%%winactiven,parent)
gosub inicheck
else
end
if @equal(%%contained,1)
goto evloop
else
end
list add,list1,%%winactive
wnd parent,%%winactive,%%parent
goto evloop

:set container titlemenu
%%input = @input(Please insert a title for this container.)
if @null(%%input)
goto evloop
else
end
list add,list2,title=%%input
window settext,#parent,%%input
goto evloop

:save containermenu
directory create,@path(%0)Containers
directory change,@path(%0)Containers
%%filedlg = @filedlg(Contaner Files|*.ctn,,,Save)
if @null(%%filedlg)
goto evloop
else
end
if @null(@ext(%%filedlg))
%%filedlg = %%filedlg.ctn
else
end
list savefile,list2,%%filedlg
goto evloop

:load containermenu
directory create,@path(%0)Containers
directory change,@path(%0)Containers
%%filedlg = @filedlg(Container Files|*.ctn)
if @null(%%filedlg)
goto evloop
else
end
shell open,@chr(34)%0@chr(34),@chr(34)%%filedlg@chr(34)
goto evloop
:loadcontainer1
list loadfile,list2,%%filedlg
REM List Seek Header by NodNarb
%%index = 0
%%count = @count(list2)
:loadloop
list seek,list2,%%index
option fieldsep,=
parse "%%oper;%%arg",@item(list2)
if @null(%%arg)
info Corrupted container save.  Cannot continue to load.
%%index = %%count
goto nextload
else
end
if @equal(%%oper,title)
dialog title,%%arg
else
end
if @equal(%%oper,launch)
shell open,%%arg
gosub launchit
else
end
if @equal(%%oper,background)
dialog set,bitmap1,%%arg
else
end
%%index = @succ(%%index)
:nextload
if @equal(%%index,%%count)
goto evloop
else
goto loadloop
end

:launchit
%%wait = 0
:waitloop2
wait
%%wait = @succ(%%wait)
if @equal(%%wait,5)
info Unable to capture window.  Please capture the window by using Start","Capture Window.
exit
else
end
%%winactive = @winactive(i)
if @equal(%%winactive,%%parent)
goto waitloop2
else
end
%%winactiven = @winactive(c)
if @equal(%%winactiven,parent)
gosub inicheck
else
end
if @equal(%%contained,1)
goto evloop
else
end
list add,list1,%%winactive
wnd parent,%%winactive,%%parent
exit

:set programs foldermenu
%%programs = @iniread(directories,programs)
if @null(%%programs)
%%programs = @dirdlg(Select Programs Directory,@windir()\Start Menu\Programs\)
else
%%programs = @dirdlg(Select Programs Directory,%%programs)
end
if %%programs
inifile write,Directories,Programs,%%programs
else
end
goto evloop

:set Documents foldermenu
%%docs = @iniread(directories,docs)
if @null(%%docs)
%%docs = @dirdlg(Select Documents Folder,c:\my documents)
else
%%docs = @dirdlg(Select Documents Folder,%%docs)
end
if %%docs
inifile write,Directories,Docs,%%docs
else
end
goto evloop

:set quick launch foldermenu
%%quickdir = @iniread(Directories,Quick)
if @null(%%quickdir)
%%quickdir = @dirdlg(Select Quick Launch Folder,@windir()\Application Data\Microsoft\Internet Explorer\Quick Launch)
else
%%quickdir = @dirdlg(Select Quick Launch Folder,%%quickdir)
end
if %%quickdir
inifile write,Directories,Quick,%%quickdir
else
end
goto evloop

:about window containermenu
REM AboutDialog Visual DialogHeader by NodNarb (About Dialog)
title About
window hide,about
%w = Window Container
DIALOG CREATE,About %w,-1,,361,267,NOMIN,ontop
DIALOG ADD,BITMAP,BITMAP1,6,10,32,32,%0
DIALOG ADD,TEXT,TEXTa1,18,70,,,%w@cr()@cr()for Windows 95/98/ME/NT/2000/XP@cr()@cr()Copyright @chr(169)Brandon Cunningham@cr()@cr()@cr()Freeware!@cr()@cr()Software provided @chr(34)As Is@chr(34)
DIALOG ADD,BUTTON,BUTTON31,230,264,74,,OK,DEFAULT
DIALOG ADD,RADIO,RADIO1,166,14,330,2
DIALOG ADD,TEXT,TEXTa2,182,70,,,CNodNarb"@"aol.com
DIALOG SHOWmodal
dialog select,0
wait event
%%event = @event()
goto evloop

:help topicsmenu
info Help not yet implemented
goto evloop

:othermenu
%%input = @input(Insert Screen Size,640x480)
option fieldsep,x
parse "%%six;%%four",%%input
window position,%%parent,,,%%six,%%four
goto evloop

:640x480menu
window position,%%parent,,,640,480
goto evloop

:800x600menu
window position,%%parent,,,800,600
goto evloop

:1024x768menu
window position,%%parent,,,1024,768
goto evloop

:windows foldermenu
directory change,@windir()
%%filedlg = @filedlg(*.scr)
if @null(%%filedlg)
goto evloop
else
shell open,%%filedlg
%%wait = 0
:waitloop
wait
%%wait = @succ(%%wait)
if @equal(%%wait,5)
info Unable to capture window.  Please capture the window by using Start","Capture Window.
goto evloop
else
end
%%winactive = @winactive(i)
if @equal(%%winactive,%%parent)
goto waitloop
else
end
%%winactiven = @winactive(c)
if @equal(%%winactiven,parent)
gosub inicheck
else
end
if @equal(%%contained,1)
goto evloop
else
end
list add,list1,%%winactive
wnd parent,%%winactive,%%parent
goto evloop

:system foldermenu
directory change,@windir()\system\
%%filedlg = @filedlg(*.scr)
if @null(%%filedlg)
goto evloop
else
shell open,%%filedlg
%%wait = 0
:waitloop
wait
%%wait = @succ(%%wait)
if @equal(%%wait,5)
info Unable to capture window.  Please capture the window by using Start","Capture Window.
goto evloop
else
end
%%winactive = @winactive(i)
if @equal(%%winactive,%%parent)
goto waitloop
else
end
%%winactiven = @winactive(c)
if @equal(%%winactiven,parent)
gosub inicheck
else
end
if @equal(%%contained,1)
goto evloop
else
end
list add,list1,%%winactive
wnd parent,%%winactive,%%parent
goto evloop

:inicheck
%%iniread = @iniread(contained,%%parent)
if @null(%%iniread)
%%contained = 0
inifile write,contained,%%winactive,%%parent
exit
else
end
if @equal(%%iniread,%%winactive)
%%contained = 1
exit
else
end
:iniloop
%%iniread = @iniread(contained,%%iniread)
if @equal(%%iniread,%%winactive)
%%contained = 1
exit
else
end
if @null(%%iniread)
%%contained = 0
inifile write,contained,%%winactive,%%parent
exit
else
end
goto iniloop
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 3 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