Re: User control and resizes

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Rodrigo,

In your event handler for the resize event, you will have to call the
GetKeyState API function through the P/Invoke layer, in order to determine
the state of the VK_LCONTROL and VK_RCONTROL keys (which correspond to the
left and right control keys).

You can find the declaration for GetKeyState in winuser.h, or possibly
on http://www.pinvoke.net, as well as the values for the constants.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- mvp@xxxxxxxxxxxxxxxxxxxxxxxxxxx

"Rodrigo Ferreira" <rjrferreira@xxxxxxxxx> wrote in message
news:eo7icIdcFHA.2652@xxxxxxxxxxxxxxxxxxxxxxx
>
> I have an user control and inside him i have one label and 1 textbox!
>
> My problem is:
>
> When i'am in design mode (a new project with this user control), i want
> to:
>
> - If i resize the user control with the left ctrl key down the size of
> the label increses/decrease.
> - If i resize the control with the right ctrl key down the size og the
> textbox change!
>
> Any ideias to do that?
>
>


.



Relevant Pages

  • Re: User control and resizes
    ... > In your event handler for the resize event, you will have to call the ... >> When i'am in design mode (a new project with this user control), ... >> - If i resize the control with the right ctrl key down the size og the ...
    (microsoft.public.dotnet.languages.csharp)
  • Custom control creation problem, please....
    ... resize & repaint itself when the client form is resized. ... Private Sub GradientBackground_Resize(ByVal sender As Object, ... I have also added this for making the user control take the full size ... I DON'T KNOW how to make the user control resize when the client form ...
    (microsoft.public.dotnet.general)
  • Re: Picture Resize Event
    ... don't actually kick off resize code until a certain amount of time ... Then if the next resize event comes in sooner, ... >> The user control handles the picture resize event. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Picture Resize Event
    ... don't actually kick off resize code until a certain amount of time ... Then if the next resize event comes in sooner, ... >> The user control handles the picture resize event. ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: Picture Resize Event
    ... don't actually kick off resize code until a certain amount of time ... Then if the next resize event comes in sooner, ... >> The user control handles the picture resize event. ...
    (microsoft.public.dotnet.framework.windowsforms.controls)