Re: Trouble calculating point

From: Dirk Starke (dstarkeCUT_IT_at_starke-net.de)
Date: 03/07/05


Date: 7 Mar 2005 03:34:47 -0800

Hello Boudewijn,

> > void resetPositionComboTD()
> > {
> > Point loc = this.getLocationOnScreen();
> >
> > int newY = loc.y - sw.getHeight();
> > int newX = loc.x;
> >
> > sw.setLocation(newX, newY);
> > }
> [...]
> What is 'this' and what is 'sw'?

'this' is (at any time and any place) a "pointer" to the object whose
code is currently executed. In the above described case it is a
"pointer" to the instance of the class which contains method
resetPositionComboTD(). The code would also work if "this." was
omitted.

'sw' must be a member of the class.

Regards,
     Dirk



Relevant Pages

  • Re: Application Crash with Error 5 when calling DeviceIOControl,...
    ... in fact it does not (psTargetString is a Pointer to a CString Object ... HANDLE hStorageDevice = NULL; ... "Bytes per Sector: %ul\r\n" ... Best regards ...
    (microsoft.public.win32.programmer.kernel)
  • Re: Search Engines & Frames
    ... Many thanks for the pointer - it was something I had simply not previously ... menus on each page so you wouldnt necessarily *have* to see the graphic ... Ian Bull wrote: ... >Thank you & Regards ...
    (microsoft.public.frontpage.client)
  • RE: Screen capture
    ... To move the mouse pointer and simulate clicks you can use SendInput function ... > contains the main portion of the form. ... > Best regards ...
    (microsoft.public.dotnet.languages.csharp)
  • Convert loop with Match function to avoid nested loop???
    ... MATCH function? ... As always, any help is much appreciated, even if it's only a pointer in ... Regards, ... Adrian ...
    (microsoft.public.excel.programming)
  • Re: Tool Tips on the desktop
    ... > balloons pop up when ever I pass the mouse pointer over the application ... Yes I'm replying to my own post - bad form I agree but... ... Regards & sorry to waste bandwidth ...
    (linux.redhat)