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 


Why isn't this working and how to...

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
GeoTrail
Valued Contributor
Valued Contributor


Joined: 18 Feb 2003
Posts: 572
Location: Bergen, Norway

PostPosted: Mon Feb 24, 2003 9:35 am    Post subject: Why isn't this working and how to... Reply with quote

OK, first question, when I open the about window and then click the close button, why does the program exit? I just want to close the about window, not the whole program.

And, secondly, how can I by clicking a button go to a specific tag in the tag object? Say I wanna go to the History tag in the about window.

Code:
DIALOG CREATE,New Dialog,-1,0,240,160
REM *** Modified by Dialog Designer on 24.02.2003 - 09:55 ***
  DIALOG ADD,BUTTON,About,95,76,,,About
  DIALOG SHOW

:Evloop
  wait event
  goto @event()
 
:AboutBUTTON
  DIALOG CREATE,About,-1,0,356,310,NOSYS
REM *** Modified by Dialog Designer on 24.02.2003 - 10:24 ***
  DIALOG ADD,TEXT,TEXT1,292,4,,,%%Copyright
  DIALOG ADD,BUTTON,CloseAbout,280,286,64,24,Close
  DIALOG ADD,SHAPE,SHAPE1,0,0,356,65,WHITE,BLACK,,RECTANGLE
  DIALOG ADD,BITMAP,BITMAP1,1,244,112,64,E:\image.bmp
  DIALOG ADD,TAB,TAB1,68,2,354,208,About|History|Thanks to|Beta testers
  DIALOG SHOWMODAL
:CloseAboutBUTTON
DIALOG CLOSE
goto Evloop
 
:Close
exit

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Dr. Dread
Professional Member
Professional Member


Joined: 03 Aug 2001
Posts: 1065
Location: Copenhagen, Denmark

PostPosted: Mon Feb 24, 2003 9:58 am    Post subject: Reply with quote

You are using a modal window. In the help file:

Quote:
When a button is pressed, the <button_name>BUTTON event is generated, but the dialog behaves as if it has been closed.


So don't use your DIALOG CLOSE statement in :CloseAboutBUTTON - it will close your main window.

Greetz
Dr. Dread

_________________
~~ Alcohol and calculus don't mix... Don't drink and derive! ~~

String.DLL * advanced string processing
Back to top
View user's profile Send private message
GeoTrail
Valued Contributor
Valued Contributor


Joined: 18 Feb 2003
Posts: 572
Location: Bergen, Norway

PostPosted: Mon Feb 24, 2003 10:19 am    Post subject: Reply with quote

This didn't work either Crying or Very sad
Code:
DIALOG CREATE,New Dialog,-1,0,240,160
REM *** Modified by Dialog Designer on 24.02.2003 - 09:55 ***
  DIALOG ADD,BUTTON,About,95,76,,,About
  DIALOG SHOW

:Evloop
  wait event
  goto @event()
 
:AboutBUTTON
  DIALOG CREATE,About,-1,0,356,310
REM *** Modified by Dialog Designer on 24.02.2003 - 10:24 ***
  DIALOG ADD,TEXT,TEXT1,292,4,,,%%Copyright
  DIALOG ADD,BUTTON,CloseAbout,280,286,64,24,Close
  DIALOG ADD,SHAPE,SHAPE1,0,0,356,65,WHITE,BLACK,,RECTANGLE
  DIALOG ADD,BITMAP,BITMAP1,1,244,112,64,E:\image.bmp
  DIALOG ADD,TAB,TAB1,68,2,354,208,About|History|Thanks to|Beta testers
  DIALOG SHOW
  goto Evloop
 
:CloseAboutBUTTON
DIALOG SELECT,1
DIALOG CLOSE
DIALOG SELECT,0
goto Evloop
 
:Close
exit


Any tips?
I want the about window to stay ontop.

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Mon Feb 24, 2003 10:29 am    Post subject: Reply with quote

Here's a simple example for handling child windows.

BTW, use the ONTOP style on the child DIALOG CREATE
to make it stay on top... Wink

http://www.vdsworld.com/forum/viewtopic.php?t=98

Cheers, Mac Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
Dr. Dread
Professional Member
Professional Member


Joined: 03 Aug 2001
Posts: 1065
Location: Copenhagen, Denmark

PostPosted: Mon Feb 24, 2003 10:30 am    Post subject: Reply with quote

Try this (from your first example):

Code:

DIALOG CREATE,New Dialog,-1,0,240,160
REM *** Modified by Dialog Designer on 24.02.2003 - 09:55 ***
  DIALOG ADD,BUTTON,About,95,76,,,About
  DIALOG SHOW

:Evloop
  wait event
  goto @event()

:AboutBUTTON
  DIALOG CREATE,About,-1,0,356,310,NOSYS
REM *** Modified by Dialog Designer on 24.02.2003 - 10:24 ***
  DIALOG ADD,TEXT,TEXT1,292,4,,,%%Copyright
  DIALOG ADD,BUTTON,CloseAbout,280,286,64,24,Close
  DIALOG ADD,SHAPE,SHAPE1,0,0,356,65,WHITE,BLACK,,RECTANGLE
  DIALOG ADD,BITMAP,BITMAP1,1,244,112,64,E:\image.bmp
  DIALOG ADD,TAB,TAB1,68,2,354,208,About|History|Thanks to|Beta testers
  DIALOG SHOWMODAL
  dialog select,1
  dialog close

:CloseAboutBUTTON
goto Evloop

:Close
exit


Greetz
Dread

_________________
~~ Alcohol and calculus don't mix... Don't drink and derive! ~~

String.DLL * advanced string processing


Last edited by Dr. Dread on Mon Feb 24, 2003 10:49 am; edited 1 time in total
Back to top
View user's profile Send private message
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Mon Feb 24, 2003 10:31 am    Post subject: Reply with quote

One other thing - any time ya close a child window, it
leaves a live "CLOSE" event.

Ya hafta kill it with %e = @event() or something. Wink

Cheers, Mac Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
GeoTrail
Valued Contributor
Valued Contributor


Joined: 18 Feb 2003
Posts: 572
Location: Bergen, Norway

PostPosted: Mon Feb 24, 2003 10:37 am    Post subject: Reply with quote

Thanks alot guys Wink
Now, about the tab object. See the first post.
I've tried tabs in VB but this doesn't work the same way.
Everything I add to the tab object shows up in everytime on runtime.
How do I show and hide the things when changing tabs?
And how to I use a button to open the about window in a certain tab?

Hope I'm not flooding you guys with questions Razz

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Mon Feb 24, 2003 10:47 am    Post subject: Reply with quote

Ya might wanna browse thru the source code sections, or maybe
do a search... Wink

Here's a TABS and GROUP example - GROUP elements may need
an extra comma added for VDS4 tooltips...

http://www.vdsworld.com/forum/viewtopic.php?p=1512#1512

Cheers, Mac Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
GeoTrail
Valued Contributor
Valued Contributor


Joined: 18 Feb 2003
Posts: 572
Location: Bergen, Norway

PostPosted: Mon Feb 24, 2003 11:15 am    Post subject: Reply with quote

Wow, looks alittle complicated Laughing

Isn't there a way I can just go to simple action labels when clicking a tab?

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Mon Feb 24, 2003 11:18 am    Post subject: Reply with quote

Here's one I modified for someone - not sure who... Embarassed
Code:

OPTION SCALE, 96
OPTION DECIMALSEP, "."
Title WP
DIALOG CREATE,Wp,-1,0,396,296
  DIALOG ADD,TAB,TAB1,10,2,393,212,Windows Wallpaper|Wallpaper 2
  DIALOG ADD,BUTTON,BUTTON1,225,2,392,44,Exit
  DIALOG ADD,COMBO,List2,55,120,180,21,,,LIST,SORTED,CLICK
  DIALOG ADD,STATUS,Stat,"Tab and Combo test"
DIALOG SHOW
goto Windows WallpaperCLICK

:EVLOOP
  WAIT EVENT
  goto @event()

:Windows WallpaperCLICK
  DIALOG REMOVE, List2
  DIALOG ADD,COMBO,List1,55,10,180,21,,,LIST,SORTED,CLICK
  LIST FILELIST, List1, @windir()\*.bmp
  goto EVLOOP

:Wallpaper 2CLICK
  DIALOG REMOVE, List1
  DIALOG ADD,COMBO,List2,55,120,180,21,,,LIST,SORTED,CLICK
  LIST FILELIST, List2, @windir()\*.bmp
  goto EVLOOP

:List1CLICK
  goto EVLOOP

:List2CLICK
  goto EVLOOP

:BUTTON1BUTTON
:CLOSE
  EXIT

Cheers, Mac Smile

_________________
VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
Back to top
View user's profile Send private message Send e-mail
Skit3000
Admin Team


Joined: 11 May 2002
Posts: 2166
Location: The Netherlands

PostPosted: Mon Feb 24, 2003 11:20 am    Post subject: Reply with quote

If you click a TAB, there will be a Tab 1CLICK event. But you have to hide/unhide things to let it change from the one to another...
Back to top
View user's profile Send private message
GeoTrail
Valued Contributor
Valued Contributor


Joined: 18 Feb 2003
Posts: 572
Location: Bergen, Norway

PostPosted: Mon Feb 24, 2003 11:27 am    Post subject: Reply with quote

That was much easier to understand. Thanks Mac and Skit Wink
_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help 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