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 


How can I change the statusbar text with mouse over?
Goto page 1, 2  Next
 
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 1:41 am    Post subject: How can I change the statusbar text with mouse over? Reply with quote

I wanna create a mouse over status bar change.
When I move the mouse over a button, or some other objects, I want the text in the statusbar displayed. Different text for each object.

How can I do this?

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


Joined: 06 Nov 2002
Posts: 790
Location: Knoxville, Tn

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

Code:


  TITLE MouseOver

  option decimalsep,"."
 
  dialog create,MouseOver,-1,0,200,100
  dialog add,BUTTON,Hello,5,5,65,25,Hello
  dialog add,Status,Stat
  dialog show

:Evloop
  wait 0.1,event
  goto @event()

:Timer
  %%wintext = @wintext(@winatpoint(@mousepos(x),@mousepos(y)))
  if @equal(%%wintext,Hello)
    dialog set,Stat,Cursor over HelloBUTTON
  else
    dialog set,Stat,
  end
  goto Evloop

:HelloBUTTON
  goto Evloop

:CLOSE
  exit



Maybe this'll help give ya some basic ideas. Smile

_________________
Bill Weckel
ShinobiSoft Software

"The way is known to all, but not all know it."
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1754
Location: Space and Time

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

How's about this:

Code:

  DIALOG CREATE,Status Mouseover,-1,0,254,300
REM *** Modified by Dialog Designer on 2/23/2003 - 21:52 ***
  DIALOG ADD,BUTTON,BUTTON1,24,32,64,24,BUTTON1
  DIALOG ADD,BUTTON,BUTTON2,24,122,64,24,BUTTON2
  DIALOG ADD,LIST,LIST1,74,30,180,132
  DIALOG ADD,STATUS,STATUS1
  DIALOG SHOW

   rem Place here all the dialog elements which you want to check for
   rem Mouseover events like this:
   rem             BUTTON1|EDIT1
   %%mouseover = button1|button2|list1
   Rem Set this variable to 1 if there is a title on your dialog.
   rem If there is a Mouseover event, the name will be elementnameMOUSEOVER there will be
   rem an elementnameMOUSEOUT when the cursor is moved off.
   gosub Mouseover Start


:EVLOOP
   wait event,0
   %e = @event()
   goto %e

:TIMER
   gosub Mouseover Check
   goto %%event

:Button1Mouseover
   dialog set,status1,Over Button1
   goto evloop
   
:Button1mouseout
   dialog set,status1
   goto evloop
   
:Button2Mouseover
   dialog set,status1,Over Button2
   goto evloop
   
:Button2mouseout
   dialog set,status1
   goto evloop

:list1Mouseover
   dialog set,status1,Over List1
   goto evloop
   
:list1mouseout
   dialog set,status1
   goto evloop

:CLOSE
   stop

   
:mouseover start
   if @null(%%mouseovercreate)
      dialog add,list,mouseover,0,0,0,0
      list add,mouseover,
      %%mouseovercreate = true
   end
   repeat
      parse "%a;%b",%%mouseover
      %%remainder = @substr(%%mouseover,@sum(@len(%a),2),@len(%%mouseover))
      if %a
         list add,mouseover,%a
         %%mouseover = %%remainder
      end
   until @null(%a)
   exit

:Mouseover Check
   if @greater(@count(mouseover),0)
      %%xyz = 0
      %%event =
      repeat
         %%item = @item(mouseover,%%xyz)
         if @equal(%%DlgTitle,NOTITLE)
            %y = @mousepos(y)
            %x = @mousepos(x)
         else
            %y = @diff(@mousepos(y),22)
            %x = @diff(@mousepos(x),3)
         end
         if @equal(1111,@greater(%x,@sum(@dlgpos(%%item,l),@dlgpos(,l)))@greater(@sum(@sum(@dlgpos(%%item,l),@dlgpos(%%item,w)),@dlgpos(,l)),%x)@greater(%y,@sum(@dlgpos(%%item,t),@dlgpos(,t)))@greater(@sum(@sum(@dlgpos(%%item,t),@dlgpos(%%item,h)),@dlgpos(,t)),%y))
            if @both(@not(@equal(%%item,%%lastmouseover)),%%lastmouseover)
            else
               %%event = %%item"MOUSEOVER"
               %%lastmouseover = %%item
            end
         end
         %%xyz = @succ(%%xyz)
      until @equal(%%xyz,@count(mouseover))
      if @null(%%event)
         if %%Lastmouseover
            %%event = %%Lastmouseover"MOUSEOUT"
            %%lastmouseover =
         else
            %%event = EVLOOP
         end
      end
   end
   exit


Hope this helps! Smile

_________________
Chris
Http://theblindhouse.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
LiquidCode
Moderator Team


Joined: 05 Dec 2000
Posts: 1754
Location: Space and Time

PostPosted: Mon Feb 24, 2003 2:59 am    Post subject: Reply with quote

Sorry Bill, you got to it before me! Wink
_________________
Chris
Http://theblindhouse.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
ShinobiSoft
Professional Member
Professional Member


Joined: 06 Nov 2002
Posts: 790
Location: Knoxville, Tn

PostPosted: Mon Feb 24, 2003 3:01 am    Post subject: Reply with quote

I was hoping someone else hadn't beat me to it. Smile
_________________
Bill Weckel
ShinobiSoft Software

"The way is known to all, but not all know it."
Back to top
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
GeoTrail
Valued Contributor
Valued Contributor


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

PostPosted: Mon Feb 24, 2003 6:14 am    Post subject: Reply with quote

Thanks alot guys Smile
_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
Skit3000
Admin Team


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

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

Here are some link to topics about MouseOver events:

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

Hope you can use them...
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 8:52 am    Post subject: Reply with quote

Thanks guys.
I was actually hoping for an easier way to do this.
Maybe something like a style thing or something.
Maybe this could be a request on the new version of VDS? Wink

_________________
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:22 am    Post subject: Reply with quote

@wintext() doesn't work for all controls, but it's simple and
works for buttons.

This gets control text from any program the mouse is over,
so you'd hafta add code to limit it to your program window. Wink
__________________________________________________________________________________________________________________________
Code:

OPTION SCALE, 96
OPTION DECIMALSEP, "."
TITLE By Mac
DIALOG CREATE,"Test Program",-1,0,200,50
  DIALOG ADD,BUTTON,B1,5,5,60,22,"Button 1"
  DIALOG ADD,BUTTON,B2,5,70,60,22,"Button 2"
  DIALOG ADD,BUTTON,B3,5,135,60,22,"Button 3"
  DIALOG ADD,STATUS,Stat
DIALOG SHOW

:B1BUTTON
:B2BUTTON
:B3BUTTON
:EVLOOP
  REPEAT
    WAIT ".01"
    DIALOG SET, Stat, @wintext(@winatpoint(@mousepos(X),@mousepos(Y)))
    %e = @event()
  UNTIL %e
  goto %e

: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
GeoTrail
Valued Contributor
Valued Contributor


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

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

When I move the mouse out of the window I can see the code in the statusbar. Weird Laughing

Nice to see that you always remember the decimalsep option Wink

_________________
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:41 am    Post subject: Reply with quote

LOL, yeah - it's reading from the EDIT box in the VDS IDE.

@wintext() reads text from most controls, but not from TEXT
elements and a few others. 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:47 am    Post subject: Reply with quote

Hmmm just got an idea.
Could that be used to retrieve the program source?
I mean, if I lost the original code, and I added a hidden code which would popup a dialog or something and I entered a secret text, could I then use the BIN command to write to entire code in a text file?

He he he probably a weird question Laughing

But hey, I got lots of those Shocked

_________________
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:54 am    Post subject: Reply with quote

Well... ya could add a var containing the source code and retrieve
it that way, but the script that's in the EXE is seriously encrypted. 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
Skit3000
Admin Team


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

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

I don't know if I may tell this, but... [EDITED By Mac]
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 11:00 am    Post subject: Reply with quote

We prolly shouldn't go there Skit... Wink
_________________
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
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
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