Blend 2 trial September Preview version 이 Release 됐습니다.

점점더 막강해지는 기능으로 Flash 를 압박해 가는 군요.

Flash 1.0 을 사용하던 때가 생각나네요.

그때부터 잘 했으면 엄청난 고수가 되어있었을 텐데 말이죠..

전에도 이런 생각을 하며 씁쓸해 했었는데...

Blend 를 보고 있자니 예전의 그때가...

뭐든 열심히 해야할텐데 말이죠...


아래 링크를 따라가시면 블랜드 따운 받으실수 있습니다. ^^

Microsoft Expression Blend 2 Free Trial



September Preview


We are pleased to present our next preview of Microsoft® Expression Blend 2. The Expression Blend 2 September Preview lets you create Microsoft® Silverlight-based applications. Additionally, you can export content from Microsoft® Expression® Design in a format that you can use in Silverlight-based applications created in the Expression Blend 2 September Preview.

You may also find Microsoft® Expression® Encoder to be helpful when you are working with video, Silverlight, and the Expression Blend 2 September Preview. Learn more about Silverlight and its community today.





What’s new in this preview?


Visual Studio 2008 support 

Making Controls from Existing Objects

Split View and XAML Editor Improvements

Storyboard Picker

Storyboard and Keyframe Properties

Vertex Animation

Breadcrumb Bar

Font Embedding

Build Options 

Object Manipulation



부디 행복한 고수되십시요...


woojja ))*
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
반응형
예전 본 책을 들추다가 흔하게 만들어 보는 폼을 만드는 소스를 보았다.
그리고 
한번 쳐본다.

2D 에 관한 NameSpace 를 추가해주고 
Imports System.Drawing.Drawing2D


먼저 폼을 Load 하면서 폼의 사각형 구역을 구하고 그 사각형 내에 동그란 Ellipse 를 추가한다.
그리고 그려질 구역을 다시 설정한다.


    Sub SetEllipseRegion()

        Dim rect As Rectangle = Me.ClientRectangle

        Using path As GraphicsPath = New GraphicsPath
            path.AddEllipse(rect)

            Me.Region = New Region(path)
        End Using
    End Sub

그리고 Form Load Event 에서 위 Method를 실행시킨다.


    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        SetEllipseRegion()
    End Sub


F5 를 눌러 실행을 시킨다.

 
 
위와 같이 Title 과 폼의 테두리가 그대로 보이는 동그란 폼이 그려졌으며 타이틀바를 클릭하여 드래깅을 하면 폼을 이동시킬수도있다.

이것은 폼 전체를 ClientRectangle로 구역을 설정했기 때문이며

이를 제거하려면
폼의 설정에서 


 

FromBorderStyle 을 None 으로 선택하고 실행시켜보면


이런 식으로 깨끗한 Ellipse Form 이 완성된다.

이 폼을 마우스를 이용하여 움직이고자 하는데..
모두들 알고 있다 시피

Mouse Down, Move, Up Event 를 이용하여 폼을 이동시킬것이다.

그 내용은 아래와 같다.




    Private Sub Form1_MouseDown(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseDown
        If e.Button <> Windows.Forms.MouseButtons.Left Then
            Return
        End If
        DownPoint = New Point(e.X, e.Y)
    End Sub

    Private Sub Form1_MouseMove(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs)
        If DownPoint = Point.Empty Then Return
        Dim location As Point = New Point(Me.Left + e.X - DownPoint.X, Me.Top + e.Y - DownPoint.Y)
        Me.Location = location
    End Sub

    Private Sub Form1_MouseUp(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs)
        If e.Button <> Windows.Forms.MouseButtons.Left Then Return

        DownPoint = Point.Empty
    End Sub

위 코드를 입력하고

F5번 을 눌러 실행을 시키고 마우스로 클릭하여 폼을 움직여 보자...

^^

짝짝짝...



간단한 따라하기였다.

나 자신도 따라하기를 하면서 그 때 정리하지 못했던 것들을 정리 할 수 있어서 좋았다.
계속해서 짤막짤막한 따라하기 예제를 하나씩 만들어 보겠다.
언제나 처럼 작심삼일이 될지 모르나....

지금 현재는 재미있다. ^^



행복한 고수되셔요...


woojja ))*
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
반응형

'.NET > VB.NET' 카테고리의 다른 글

[VB.NET] 생산성을 높여라...  (0) 2009.04.30
[VB.NET] 보색 간단하게 구하기  (0) 2009.04.30
[VB.NET] Enter 로 Sort 되는 TextBox  (0) 2009.04.30
[VB.NET]Refactor! for Visual Basic 2008  (0) 2009.04.30
[VB.NET] XML 접근하기 ...  (0) 2009.04.30
Devpia 의 어느분께서 질문을 올리셨습니다.

질문은...

텍스트 박스에 텍스트를 세로 정렬하고 싶은데...
텍스트 박스나 라벨의 경우 세로 정렬이 가능한가요? 가로 말고 세로로 쓰고 싶은데....

라고요...

블로그에서 확인하라고 했는데 오래 기다리셨습니다. ^^'


잠시 생각을 했죠... 잔머리를 굴려서... ㅋㅋ

그리고 걍 테스트 해 봤습니다.
원하는 기능인지는 모르겠으나 비스므리하게는 한 것 같습니다.

수정을 원하시면 아래 코드를 보고 다시 수정할 수 있겠죠... ^^


요는 이렇습니다.

폼에 텍스트 박스하나를 올려놓습니다.
그리고 아래와 같이 KeyUp 이벤트를 등록, 구현해 줍니다.

    Private Sub TextBox1_KeyUp(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles TextBox1.KeyUp

        If e.KeyCode = Keys.Enter Then
            Dim strText() As String
            Dim str As String = Me.TextBox1.Text.Replace(ControlChars.Lf, "")

            strText = str.Split(ControlChars.CrLf)
            'Array.Sort(strText)
            TextBox1.Text = ""

            Dim strList As List(Of String) = New List(Of String)

            For i As Integer = 0 To strText.Length - 2
                If LTrim(strText(i).Length) = 1 Then
                    If Asc(LTrim(strText(i))) = 10 Then
                        Continue For
                    End If
                End If
                Dim strTemp As String = strText(i).Replace(ControlChars.Lf, "")
                strList.Add(strText(i))
            Next
            strList.Sort()

            For Each s As String In strList
                TextBox1.Text &= s & ControlChars.CrLf
            Next

        End If
    End Sub
End Class


아 그리고 이걸 User Control로 만들어 보셔요... ^^
그건 나중에 해보도록 하죠... ^^'

행복한 고수되셔요...

woojja ))*
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
반응형

+ Recent posts