Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: prasanna kunder
  Where is prasanna kunder?
 mumbai
 India
 prasanna kunder
 To: Jun Tangunan
  Where is Jun Tangunan?
 Cabanatuan
 Philippines
 Jun Tangunan
 Tags
Subject: RE: ssDropCalc release 2
Thread ID: 309947 Message ID: 310909 # Views: 32 # Ratings: 0
Version: Visual FoxPro 9 Category: Classes and Objects
Date: Monday, June 27, 2011 8:00:12 AM         
   


> >
> > Hi!
> >
> > This may be unnecessary, but is it possible that when I press the key like '1' for example, the button number 1 will change color or looks pressed? Your class don't have the codes in them so I just added my own method inside the calculator form.
> >
> > It looks something like this in the keypress event:
> >
> >
> > Lparameters nKeyCode, nShiftAltCtrl
> > 
> > Local oldColor As Integer
> > 
> > For Each loObject In This.Objects
> > 	If Upper(loObject.BaseClass) = 'COMMANDBUTTON'
> > 		If loObject.Caption = Chr(Lastkey())
> > 			oldColor = loObject.BackColor
> > 			loObject.BackColor = Rgb(125,125,125)
> > 		Endif
> > 	Endif
> > Endfor
> > 
> > WAIT ''timeout .1 
> > 
> > For Each loObject In This.Objects
> > 	If Upper(loObject.BaseClass) = 'COMMANDBUTTON'
> > 		If Isdigit(loObject.Caption)
> > 			loObject.BackColor = m.oldColor
> > 		Endif
> > 	Endif
> > Endfor
> > 

> >
> > Which of course, won't work in your class due to the absence of some ss_support or something. :-U
> >
> > Perhaps you could do a classier job other than what I lazily created above. :)
> >
> > (coffee)
> > I must create a system or be enslaved by another man's; I will not reason and compare: my business is to create. - William Blake
> > My New Website:  Glen Villar

> >  ICM Surveillance, Security Camera & Systems Development
>
>
> It isn't necessary but that is a cool added effect. I added the codes now and on the subclassed button with these effects when clicked:
>
>
> this.FontBold = .T.
> this.ForeColor = RGB(0,0,255)
> this.FontSize = 14
> WAIT ''timeout .1 
> this.FontBold = .F.
> this.ForeColor = RGB(0,0,0)
> this.FontSize = 10 
> 

>
> I love it. I may try later sleep() winapi to avoid the cursor pointer appearing. I will include that on the next release should any more enhancements can be made on this class. Thanks Glen! :-)
>
> -- added --
>
> I tried Sleep() but it seems to be less elegant in this case. Also, there is one major bug I just recently discovered, i.e., I forgot to return the value of calcbox. :-U
>
> So in the meantime, you can get the value like this:
>
>
Messagebox(thisform.ssdropcalc1.calcbox.value)
> 

>
> In the next release, it would be just like an ordinary textbox:
>
>
Messagebox(thisform.ssdropcalc1.value)
> 

>
>
>
> http://sandstorm36.blogspot.com/
> http://weblogs.foxite.com/sandstorm36/default.aspx
> http://www.coderisland.com/forum/viewforum.php?f=10



hi jun
i try you class, it's very nice
i have question
how to put value in controlsource

this._decimal = 3
this._color = RGB(255,255,255)
this._displayvalue = .T.
tp=530.25
this.calcbox.ControlSource=tp
DODEFAULT()

it's not working
prasanna

ENTIRE THREAD

ssDropCalc release 2 Posted by Jun Tangunan @ 6/16/2011 5:00:05 AM
RE: ssDropCalc release 2 Posted by Tom Saddul @ 6/16/2011 5:05:21 AM
RE: ssDropCalc release 2 Posted by Jun Tangunan @ 6/16/2011 5:12:24 AM
RE: ssDropCalc release 2 Posted by andrew kabz @ 6/16/2011 11:57:37 AM
RE: ssDropCalc release 2 Posted by Jun Tangunan @ 6/17/2011 12:19:04 AM
RE: ssDropCalc release 2 Posted by andrew kabz @ 6/17/2011 7:22:25 AM
RE: ssDropCalc release 2 Posted by onytoo @ 6/16/2011 12:18:12 PM
RE: ssDropCalc release 2 Posted by Glen Villar @ 6/17/2011 1:59:21 AM
RE: ssDropCalc release 2 Posted by Jun Tangunan @ 6/17/2011 2:23:31 AM
RE: ssDropCalc release 2 Posted by prasanna kunder @ 6/27/2011 8:00:12 AM
RE: ssDropCalc release 2 Posted by Jun Tangunan @ 6/28/2011 1:41:29 AM
RE: ssDropCalc release 2 Posted by Glenn Gevero @ 6/18/2011 8:38:16 AM
RE: ssDropCalc release 2 Posted by Jun Tangunan @ 6/28/2011 1:42:35 AM
RE: ssDropCalc release 2 Posted by Ugur YILMAZ @ 6/24/2011 10:15:42 AM
RE: ssDropCalc release 2 Posted by Jun Tangunan @ 6/27/2011 3:39:39 AM