Click here to Skip to main content
Click here to Skip to main content

Popup UserControl - KarubButton

, 1 Aug 2007
Rate this:
Please Sign up or sign in to vote.
Secure password input screen.
Screenshot - Image.png

Introduction

-Drop Shadow Supported.(İf your show shadow properties is enabled on your System,it will be showed.)

-Safe password input screen.(at below...)

Screenshot - Image7.png

Lock button for Popup UserControl...Screenshot - Image5.png

-This is our Popup UserControl property.It is supporting a few special feature.In this screen,

Screenshot - Image1.png

Background

This application is written by C#.2005.We use this project in our safe password/key attempt application.I thinked this project for Keylogger application.Perhaps,this project can be useful us for keyloger.

Screenshot - Image3.png

We can exchange button style in this popup control.Because,it is KarubButton.Also,we can change our border color at this user control.

Screenshot

Screenshot - Image6.png

Default popup UserControl picture:

Screenshot - Image2.png

and now,the support of system shadow:

Screenshot - Image4.png

Using the code

For example some sample codes in this project...

private void Showing(object sender, EventArgs e)

{

mProgress = ((TimeSpan)(DateTime.Now.Subtract(mTimerStarted))).TotalMilliseconds / mPopup.mAnimationSpeed;

if (mProgress >= 1)

{

mTimer.Stop();

mTimer.Tick -= new EventHandler(Showing);

AnimateForm(1);

}

else

AnimateForm(mProgress);//görünüme devam et

}

 

private void AnimateForm(double progress)//açlr animasyon methodu

{

//x ve y poziyon daha sonra formun width ve hight deerleri

double[] dizi ={ 0, 0, 0, 0 };//x,y,w,h

if (progress <= 0.1) progress = 0.1;



if (animasyon_Tip == AnimationType.PopupMenu)

{

switch (mPlacement)//y pozisyon ve hight deerleri

{

case ePlacement.Top:

dizi[1] = 1 - progress;

dizi[3] = progress;

break;

case ePlacement.TopLeft:

dizi[1] = 1 - progress;

dizi[3] = progress;

break;

case ePlacement.TopRight:

dizi[1] = 1 - progress;

dizi[3] = progress;

break;

case ePlacement.Bottom:

dizi[1] = 0;

dizi[3] = progress;

break;

case ePlacement.BottomLeft:

dizi[1] = 0;

dizi[3] = progress;

break;

case ePlacement.BottomRight:

dizi[1] = 0;

dizi[3] = progress;

break;

case ePlacement.Left:

dizi[1] = 0;

dizi[3] = 1;

break;

case ePlacement.Right:

dizi[1] = 0;

dizi[3] = 1;

break;

}

switch (mPlacement)//x poziyon ve width deerleri

{

case ePlacement.TopLeft:

dizi[0] = 1 - progress;

dizi[2] = progress;

break;

case ePlacement.BottomLeft:

dizi[0] = 1 - progress;

dizi[2] = progress;

break;

case ePlacement.Left:

dizi[0] = 1 - progress;

dizi[2] = progress;

break;

case ePlacement.TopRight:

dizi[0] = 0;

dizi[2] = progress;

break;

case ePlacement.BottomRight:

dizi[0] = 0;

dizi[2] = progress;

break;

case ePlacement.Right:

dizi[0] = 0;

dizi[2] = progress;

break;

case ePlacement.Top:

dizi[0] = 0;

dizi[2] = 1;

break;

case ePlacement.Bottom:

dizi[0] = 0;

dizi[2] = 1;

break;

}

mCurrentBounds.X = mNormalPos.X + (int)(dizi[0] * mControlSize.Width);

mCurrentBounds.Y = mNormalPos.Y + (int)(dizi[1] * mControlSize.Height);

mCurrentBounds.Width = (int)(dizi[2] * mControlSize.Width) + 2 * BORDER_MARGIN;

mCurrentBounds.Height = (int)(dizi[3] * mControlSize.Height) + 2 * BORDER_MARGIN;

}

else

{

if (this.Opacity < (double)mPopup.OpacityValue / 100)

{

this.Opacity += (progress - 0.09);

}

else

{

this.Opacity = (double)mPopup.OpacityValue / 100;

}

mCurrentBounds.X = mNormalPos.X;//formun x mesafesi

mCurrentBounds.Y = mNormalPos.Y;//formun y mesafesi

mCurrentBounds.Width = mControlSize.Width + (2 * BORDER_MARGIN);//genilii

mCurrentBounds.Height = mControlSize.Height + (2 * BORDER_MARGIN);//yükseklii

}

this.Bounds = mCurrentBounds;

}

 

 

#region Public Properties and Event

public event bir DropDown;

public event iki DropDownClosed;

[Browsable(false)]//do not visible

public Control UserControl

{

get { return mUserControl; }

set { mUserControl = value; }

}

[Description("Formun opak veya transparent gözükme seçeneklerini ayarlar."),

Browsable(true),

DefaultValue(100)]

public byte OpacityValue

{

get { return opacity_deger; }//deer okunacak

set //gönderilen deer yazlacak

{

try

{

if (value < 0 || value > 100)

throw new Exception("Lütfen 0 ile 100 arasnda bir deer giriniz.");

}

catch (Exception hata_Olustu)

{

MessageBox.Show(hata_Olustu.Message);

value = 100;

}

finally//hata olsada olmasada buraya urar

{

opacity_deger = value;

}

}

}

[Browsable(false)]

public Control Parent

{

get { return mParent; }

set { mParent = value; }

}

[Description("Shadow Visibility"),

DefaultValue(false)]

public bool ShowShadow

{

get { return mShowShadow; }

set { mShowShadow = value; }

}

[Description("Animasyonun hzn ayarlar."),

DefaultValue(100)]

public int AnimationSpeed

{

get { return mAnimationSpeed; }

set { mAnimationSpeed = value; }

}

 

[Description("Popup formun açl kordinatlarn ayarlar."),

DefaultValue(typeof(SifreKontrol.Popup.ePlacement),"BottomRight")]

public ePlacement Placement

{

get { return mPlacement; }

set { mPlacement = value; }

}

[Description("Border Color"),

DefaultValue(typeof(Color),"DarkGray")]

public Color BorderColor

{

get { return mBorderColor; }

set { mBorderColor = value; }

}

[Description("Animasyon tipini ayarlamanz salar."),

Browsable(true),

DefaultValue(typeof(Popup.AnimationType), "PopupMenu")]

public AnimationType Animasyon_Tip

{

get { return animasyon_Tip; }

set { animasyon_Tip = value; }

}

#endregion//done

Points of Interest

-Database application (SQL SERVER 2000 - 2005) and a little bit Oracle Database.

-Win32 application,use with c and c# programming language.

-Windows custom controls.

-Developing base of Intranet and Internet applications.

History - Burak Özdiken

I am .Net programmer.I have been developing software application and project since 1998.My first programming language is Visual Basic 4.0 - 5.0.At now,My programming language is c# and vb.net.Also,I am developing enterprise application for company.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Burak Ozdiken
Software Developer (Senior) Litera Grup
Turkey Turkey
Since 1998...
 
MCPD - Enterprise Application Developer
 
“Hesaplı hareket ettiğini zanneden ve onunla iftihar eyliyen dar kafalar; kurtulmağa, yükselmeğe elverişli hiç bir eser vücüda getirmezler. Kurtuluş ve yükselişi, ancak varlığına dayanan ve mülkü milletin gizli kapalı hazinelerini verimli hale getirmesini bilen, şahsi menfaatini millet menfaati uğruna feda eden, ruhu idealist, dimağı realist şahsiyetlerde aramalıdır.”
 
Nuri Demirağ, 1947

Comments and Discussions

 
GeneralMy vote of 1 PinmemberWilliam Winner12-Feb-10 6:16 
Questioneasy to see? Pinmemberjoemerchant1-Aug-07 4:15 
AnswerRe: easy to see? Pinmemberburak2991-Aug-07 6:33 
That's reason:
 
I use the control's Text property.In this respect,if you want to use your string property who make to correct it.
This is only my idea.You can do much better it.For example;string OnButtonText() property.
 
I only use control's text property.Anything spy programme don't see our text at button control.

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web02 | 2.8.140827.1 | Last Updated 1 Aug 2007
Article Copyright 2007 by Burak Ozdiken
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid