28.12.12

Kill the Window Process




Hi Everybody,
I would like to explain one of faq within this essay , how we kill the window process .
If any question, please feel free to contact me yenerturkeli@v-basic.net.

A Process component provides access to a process that is running on a computer. A process, in the simplest terms, is a running application. A thread is the basic unit to which the operating system allocates processor time. A thread can execute any part of the code of the process, including parts currently being executed by another thread.

The Process component is a useful tool for starting, stopping, controlling, and monitoring applications. Using the Process component, you can obtain a list of the processes that are running, or you can start a new process. A Process component is used to access system processes. After a Process component has been initialized, it can be used to obtain information about the running process. Such information includes the set of threads, the loaded modules (.dll and .exe files), and performance information such as the amount of memory the process is using.

You can use the code as below

Imports System.Diagnostics
dim my_process_name as string
Dim all_process As System.Diagnostics.Process
        For Each all_process In System.Diagnostics.Process.GetProcesses()
           Dim selected_process As String = my_process.Split("-").Trim()
         
            If all_process.ProcessName = selected_process Then
                all_process.Kill()
            End If
        Next

Have a nice day,
Yener Turkeli



18.12.12

Build your apps fast with great tools


Build your apps fast with great tools
Windows Phone SDK provides Visual Studio Express 2012 for Windows Phone and the assets to build epic apps faster using what you know. Use .NET to build your apps or take full advantage of the platform for your games with DirectX/C++. .NET apps and games can reuse their business logic across Windows 8, the web (ASP.NET), and Windows Azure so developers can move faster.
Windows Phone apps
The Visual Studio 2012 integrated development environment (IDE) simplifies the development of phone apps so you can focus on delighting your users.
Windows Phone Emulator
Once you’ve built your app, test it using the Windows Phone Emulator. You’ll see it the way users will see it in a simulated, real-world environment.
Blend for Windows Phone
Seamless integration with Blend for Windows Phone means you can create unique and compelling apps that will shine in the Windows Phone Marketplace.
Use with your existing Visual Studio
With the Visual Studio Add-in you can create end-to-end solutions. Create continuous services to power your apps with cloud-based services. Or share business logic across Windows Phone, Windows 8, or ASP.NET.
System Requirements
Supported operating systems
Windows 8 (x64)
Supported architectures
64-bit (x64)
Hardware requirements
1.6 GHz or faster processor
4 GB of RAM
4 GB of available hard disk space
Windows Phone 8 Emulator
Windows 8 Pro edition or greater
Requires a processor that supports Second Level Address Translation (SLAT)
If your computer meets the hardware and operating system requirements, but does meet the requirements for the Windows Phone 8 Emulator, the Windows Phone SDK 8.0 will install and run. However, the Windows Phone 8 Emulator will not function and you will not be able to deploy or test apps on the Windows Phone 8 Emulator.
Notes
To start Visual Studio Express for Windows Phone, click the application in the Apps list. If you have Visual Studio Professional, Premium or Ultimate installed on the computer, the Visual Studio Express for Windows Phone shortcut won't appear. Instead, start your Visual Studio instance as usual and then create Windows Phone SDK 8.0 projects using the installed Windows Phone templates.
If you try to run a project in Windows Phone Emulator and Hyper-V is not enabled, you will be prompted to turn on Hyper-V. Turning on Hyper-V requires you to restart your computer.

Download address:

http://www.microsoft.com/visualstudio/eng/downloads#d-express-windows-phone




2.12.12

VB.NET Working with Webcam

Hi Everybody,
I would like to explain one of faq within this essay using webcam.

If any question, please feel free to contact me yenerturkeli@v-basic.net.

We need to  Framework 4.0 and WPFEncode. in order to use the Webcam please add webcamcontrol and Imports statement . 

Imports Microsoft.Expression.Encoder.Devices
Imports WebcamControl

You can easily takesnapshot and record.

The WPFEncode application demonstrates how to encode a file from a user interface (UI) application when displaying the progress of the encoding process. To use the application, click the Browse button to point to a file that you want to encode, and then click the Encode button to encode it. When the file is being encoded, a bar displays the encoding progress.

When you press the Encode button, the application creates a thread to perform the encoding to make sure that the UI thread is not blocked. The progress events are called from a non-UI thread. Consequently, Microsoft Expression Encoder uses the Windows Presentation Foundation (WPF) Dispatcher to marshal the updates to the UI thread.

If you try to close the application when the encoding is still occurring, the application prompts you to confirm that you want to stop the process. If you confirm, the application stops the encoding thread but delays closing the application until the thread actually stops.

Have a nice day,
Yener Turkeli



22.11.12

Programming in the .NET Environment


Hi Everybody,
I would like to provide one of the amazing books' sample chapter.

If any question, please feel free to contact me yenerturkeli@v-basic.net.

Programming in the .NET Environment

By Damien Watkins, Mark Hammond, Brad Abrams
Published Nov 6, 2002 by Addison-Wesley Professional. Part of the Microsoft Windows Development Series series.


18.11.12

Working with Screenshot Class






Hi Everybody,
I would like to explain one of faq within this essay , how we work with Screenshot and how we can save screenshot as an image.

If any question, please feel free to contact me yenerturkeli@v-basic.net.
Screenshot is an image which shows the content of a computer's screen .

You can use the code as below



Dim my_sc As New ScreenShot.ScreenCapture


Dim My_image As Image = SC.CaptureWindow(Me.Handle)
        
Dim My_pc As Image = SC.CaptureScreen
        

my_sc.CaptureScreenToFile(my_file_path, Imaging.ImageFormat.Jpeg)


Have a nice day,
Yener Turkeli

8.11.12

Ping Test via VB.NET



Hi Everybody,
I would like to explain one of faq within this essay , how we put ping to another computer.
If any question, please feel free to contact me yenerturkeli@v-basic.net.
Ping is a computer network tool used to special host is reachable via IP address.

You can use the code as below

Dim response As Boolean = False
response = My.Computer.Network.Ping("128.09.20.01")
console.writeline(response) 
Have a nice day
Yener Turkeli

5.10.12

Free ebook: Moving to Microsoft Visual Studio 2010


Developers, we’re pleased to announce another free offering: Moving to Microsoft Visual Studio 2010 (Microsoft Press, 2011; 336 pages), written by Patrice Pelland, Pascal Paré, and Ken Haines.
Here’s a little bit about the authors: Ken Haines is a software development engineer at Microsoft, working in the Consumer and Online Division. He has a passion for distributed applications in the cloud and strives to help customers and partners find the right solution for their needs. Pascal Paré has worked at Microsoft since 2006, where he has held positions as a software engineer on both development and testing teams. Patrice Pelland is a principal development manager at Microsoft, working in the Consumer and Online Division. He leads a development team that is focused on innovation and incubation across all Microsoft consumer products.
Moving to Microsoft Visual Studio 2010 was written with three audiences in mind:
Part I is for developers moving from Visual Studio 2003 to Visual Studio 2010.
Part II is for developers moving from Visual Studio 2005.
And Part III is for developers moving from Visual Studio 2008.
Please see this post for an extensive description of the book’s content, including “Who Is This Book for?,” “What Is the Book About?,” and “How Will This Book Help Me Move to Visual Studio 2010?” (Note that the links in that post are to a draft preview version of the book. Links to the final and complete book appear immediately below in this post.)
You can download a PDF of the book here.
And you can download the book’s sample code here.

12.9.12

Visual Studio 2012 and .NET 4.5 Launch

Visual Studio 2012 and .NET 4.5 Launch

 Today is the formal launch event for Visual Studio 2012 and .NET 4.5, a state-of-the-art development solution for building modern applications that span connected devices and continuous services, from the client to the cloud. This morning’s launch keynote covers how Visual Studio 2012 takes you into the next era of software development. I opened the discussion with a look at trends in modern app development, followed by Jason Zander diving deeper into building apps, and Brian Harry touring through managing app lifecycle, all using Visual Studio 2012. This content is available live and for subsequent on-demand viewing from http://visualstudiolaunch.com. In addition, the Visual Studio development team has put together over 60 videos to help you learn about the new Visual Studio 2012 capabilities in more detail, and all of these will be available for watching starting this afternoon. These videos provide a great point of reference across a wide variety of features and capabilities. Modern Tools for Modern Apps I’ve been looking forward to today for quite some time. We have a huge line-up of platform releases from Microsoft this year, from Windows 8 to Windows Phone 8 to Windows Server 2012 to Windows Azure to SQL Server to Office 365, all of them enabling you to create or modernize really compelling apps. And Visual Studio 2012 is at the center of this. With our developer tools, we strive to give developers targeting these platforms a streamlined experience for creating apps that excite and exceed the needs of customers, whether with consumer-focused or business-focused apps. We know the demands on the apps you build and on how you deliver them are constantly evolving with industry trends. With the consumerization of IT, users expect new levels of app richness and interaction, desiring the same experiences for their business apps that they obtain in their consumer apps. Business stakeholders also demand much more agility for IT innovation. The apps themselves reflect this with more and more aspects of user-centricity, social integration, and data-centricity. And as your customers evolve, so too do your apps, requiring you to continuously improve and incorporate innovations faster than ever before, with continuous feedback, continuous quality, and continuous delivery. Visual Studio 2012 is all about enabling you to build and manage these consumer-focused and business-focused apps. It provides best-in-class tools that propel developers to build new apps or evolve existing ones, and it enables individuals and teams to deliver continuous value, with agility and on their own terms. In conjunction, .NET 4.5 provides expansive capabilities for developers working on all forms of apps and services, from client to mobile to web to cloud, while at the same time enabling fast time to market. Announcements Of course,

Visual Studio is also about being a platform that enables other developer tools to build upon and integrate with it. In that light, I’m thrilled to announce that today more than 70 Visual Studio partners are sim-shipping over 100 products for Visual Studio 2012. These solutions range from developer extensions and control libraries to extensions of the modern application lifecycle support in Visual Studio. Thank you to all these partners who are extending Visual Studio and customizing it for your needs. Visual Studio Update: We’re also not standing still with this release, but rather are committed to continuously delivering value to you as part of regular updates to Visual Studio. Our first “VS Update” will better support agile teams, enable continuous quality, elevate SharePoint development with application lifecycle management (ALM) tools, and expand Visual Studio 2012 Windows development capabilities. It will be available as a community technology preview (CTP) later this month and in final release later this calendar year. Visual Studio Express 2012 for Windows Desktop: Back in June, I announced we would expand our line-up of Express products. Today, we’re releasing Visual Studio Express 2012 for Windows Desktop, bringing the newest desktop development capabilities in Visual Studio 2012 to Express users, too. You can read more about this release on the Visual Studio team blog and download the release from here. In order to see whole essay please visit http://blogs.msdn.com/b/somasegar/archive/2012/09/12/visual-studio-2012-and-net-4-5-launch.aspx

 Have a nice day
 Yener Turkeli

24.8.12

How Do I: Update Related Tables in Visual Studio

Hi All, I am sharing a nice video if any questions you have, please feel free to contact me via yenerturkeli@v-basic.net About This Video Visual Basic programmers will learn how to properly control updates, inserts and deletes in multi-user applications on forms that edit master-detail related data using the TableAdapterManager in Visual Studio 2008. Presented By: Beth Massi.

14.8.12

How Do I: Create a Database?



Hi All,

I am sharing a nice video if any questions you have, please feel free to contact me via yenerturkeli@v-basic.net

SQL Server beginners will see how to create a database through Visual Studio using the Server Explorer. They will see how to define tables, columns, and relationships and how to add stored procedures.


video






Presented By: Beth Massi

27.7.12

Visual Studio 2012 ( download)







Hi Everybody,
I would like to explain one of faq within this essay , how we can install, vb,net 2012 .

If any question, please feel free to contact me
yenerturkeli@v-basic.net.

You can install Ultimate RC or Team Foundation Server RC 


http://www.microsoft.com/visualstudio/11/en-us/downloads


Cheers,
Yener

Working with Dynamic Objects (Visual Basic)


Working with Dynamic Objects (Visual Basic)

Dynamic objects provide another way, other than the Object type, to late bind to an object at run time. A dynamic object exposes members such as properties and methods at run time by using dynamic interfaces that are defined in the System.Dynamic namespace. You can use the classes in the System.Dynamic namespace to create objects that work with data structures that do not match a static type or format. You can also use the dynamic objects that are defined in dynamic languages such as IronPython and IronRuby. For examples that show how to create dynamic objects or use a dynamic object defined in a dynamic language, see Walkthrough: Creating and Using Dynamic Objects (C# and Visual Basic), DynamicObject, or ExpandoObject.

Visual Basic binds to objects from the dynamic language runtime and dynamic languages such as IronPython and IronRuby by using the IDynamicMetaObjectProvider interface. Examples of classes that implement the IDynamicMetaObjectProvider interface are the DynamicObject and ExpandoObject classes.

If a late-bound call is made to an object that implements the IDynamicMetaObjectProvider interface, Visual Basic binds to the dynamic object by using that interface. If a late-bound call is made to an object that does not implement the IDynamicMetaObjectProvider interface, or if the call to the IDynamicMetaObjectProvider interface fails, Visual Basic binds to the object by using the late-binding capabilities of the Visual Basic runtime.

22.6.12

ExpandoObject Class


The ExpandoObject class enables you to add and delete members of its instances at run time and also to set and get values of these members. This class supports dynamic binding, which enables you to use standard syntax like sampleObject.sampleMember instead of more complex syntax like sampleObject.GetAttribute("sampleMember").

The ExpandoObject class implements the standard Dynamic Language Runtime (DLR) interface IDynamicMetaObjectProvider, which enables you to share instances of the ExpandoObject class between languages that support the DLR interoperability model. For example, you can create an instance of the ExpandoObject class in C# and then pass it to an IronPython function. For more information, see Dynamic Language Runtime Overview documentation on the CodePlex Web site, and Introducing the ExpandoObject on the C# Frequently Asked Questions Web site.

The ExpandoObject class is an implementation of the dynamic object concept that enables getting, setting, and invoking members. If you want to define types that have their own dynamic dispatch semantics, use the DynamicObject class. If you want to define how dynamic objects participate in the interoperability protocol and manage DLR fast dynamic dispatch caching, create your own implementation of the IDynamicMetaObjectProvider interface.

Creating an Instance

In C#, to enable late binding for an instance of the ExpandoObject class, you must use the dynamic keyword. For more information, see Using Type dynamic (C# Programming Guide).

In Visual Basic, dynamic operations are supported by late binding. For more information, see Early and Late Binding (Visual Basic).

The following code example demonstrates how to create an instance of the ExpandoObject class.


Dim sampleObject As Object = New ExpandoObject()

Module Module1

Sub Main()
    Dim sampleObject As Object = New ExpandoObject()

    ' Create a new event and initialize it with null.
    sampleObject.sampleEvent = Nothing

    ' Add an event handler.
    Dim handler As EventHandler = AddressOf SampleHandler
    sampleObject.sampleEvent = 
        [Delegate].Combine(sampleObject.sampleEvent, handler)

    ' Raise an event for testing purposes.
    sampleObject.sampleEvent.Invoke(sampleObject, New EventArgs())

End Sub

' Event handler.
Sub SampleHandler(ByVal sender As Object, ByVal e As EventArgs)
    Console.WriteLine("SampleHandler for {0} event", sender)
End Sub

' This code example produces the following output:
' SampleHandler for System.Dynamic.ExpandoObject event.

End Module

13.6.12

DynamicObject Class ( Sample Code)


' The class derived from DynamicObject.
Public Class DynamicDictionary
    Inherits DynamicObject

    ' The inner dictionary.
    Dim dictionary As New Dictionary(Of String, Object)

    ' This property returns the number of elements
    ' in the inner dictionary.
    ReadOnly Property Count As Integer
        Get
            Return dictionary.Count
        End Get
    End Property


    ' If you try to get a value of a property that is
    ' not defined in the class, this method is called.

    Public Overrides Function TryGetMember(
        ByVal binder As System.Dynamic.GetMemberBinder,
        ByRef result As Object) As Boolean

        ' Converting the property name to lowercase
        ' so that property names become case-insensitive.
        Dim name As String = binder.Name.ToLower()

        ' If the property name is found in a dictionary,
        ' set the result parameter to the property value and return true.
        ' Otherwise, return false.
        Return dictionary.TryGetValue(name, result)
    End Function

    Public Overrides Function TrySetMember(
        ByVal binder As System.Dynamic.SetMemberBinder,
        ByVal value As Object) As Boolean

        ' Converting the property name to lowercase
        ' so that property names become case-insensitive.
        dictionary(binder.Name.ToLower()) = value

        ' You can always add a value to a dictionary,
        ' so this method always returns true.
        Return True
    End Function
End Class

Sub Main()
    ' Creating a dynamic dictionary.
    Dim person As Object = New DynamicDictionary()

    ' Adding new dynamic properties.
    ' The TrySetMember method is called.
    person.FirstName = "Ellen"
    person.LastName = "Adams"

    ' Getting values of the dynamic properties.
    ' The TryGetMember method is called.
    ' Note that property names are now case-insensitive,
    ' although they are case-sensitive in C#.
    Console.WriteLine(person.firstname & " " & person.lastname)

    ' Getting the value of the Count property.
    ' The TryGetMember is not called,
    ' because the property is defined in the class.
    Console.WriteLine("Number of dynamic properties:" & person.Count)

    ' The following statement throws an exception at run time.
    ' There is no "address" property,
    ' so the TryGetMember method returns false and this causes
    ' a MissingMemberException.
    ' Console.WriteLine(person.address)
End Sub
' This examples has the following output:
' Ellen Adams
' Number of dynamic properties: 2

17.5.12

How to Obtain Visual Studio 11 Beta

Welcome to Visual Studio 11 Beta Download this release:

How to Obtain Visual Studio 11 Beta http://www.microsoft.com/visualstudio/11/en-us/downloads


Documentation


Learn how to create applications by using Visual Studio 11 Beta:
Visual StudioVisual Studio 

Application Lifecycle Management

What’s New for ASP.NET 4.5 and Web Development in Visual Studio 11 Beta.

NET Framework 4.5 Beta

UML Activity Diagrams: Reference

UML Activity Diagrams: Reference Visual Studio 2010 Other Versions 6 out of 10 rated this helpful - Rate this topic An activity diagram shows a business process or a software process as a flow of work through a series of actions. People, software components, or computers can perform these actions. You can use an activity diagram to describe processes of several types, such as the following examples: A business process or a flow of work between users and your system. For more information, see Modeling User Requirements. The steps performed in a use case. For more information, see UML Use Case Diagrams: Guidelines. A software protocol, that is, the permitted sequences of interactions between components. A software algorithm. This topic describes the elements that you can use in activity diagrams. For more detailed in information about drawing activity diagrams see UML Activity Diagrams: Guidelines. To create a UML activity diagram, on the Architecture menu, click New Diagram. For more information about how to draw modeling diagrams in general, see How to: Edit a UML Model and Diagrams.

UML with VS 2010 Part 4: Capturing Business Workflows

25.4.12

Hidden Improvements in Visual Basic 11



Hi All,

I want to share perfect essay in my Visual Basic .NET Blog.
If any question you have, pls feel free to contact me.

yenerturkeli@v-basic.net

By Joe Kunk 04/20/2012
In my January article "Visual Basic Improvements in Visual Studio 11," I presented the major enhancements to Visual Basic 11 that appear in the Visual Studio 11 Beta. Key improvements include the Async and Await keywords, Iterators, Call Hierarchy and the Global keyword.

In February, I attended the 2012 Microsoft Global MVP Summit in Redmond. At the event, Microsoft Visual Basic Program Manager Lucian Wischik presented a four page list of enhancements in Visual Basic 11. Here are a few of the best VB11 updates from his list, enhancements that you may not have noticed.


Async
MSTest and XUnit now support Async and Await in unit tests. Prior to this support, the test method did not wait for the Await method to complete, potentially executing the Assert method too soon. Now, the Async method will complete and the Assert behaves as expected.

Security is enhanced to ensure that any framework method that delay-executes a delegate, does so in the proper SecurityContext. The number of heap allocations is reduced, which benefits server scalability.

Compiler Switches 
The compiler switch "/vbruntime:*" embeds core functionality from the Visual Basic Runtime Library into your assembly to provide useful Visual Basic functions without requiring a reference to the runtime library. This new functionality opens Visual Basic to target platforms that do not support the Visual Basic runtime like the Portable Library, XNA, Windows Phone and the Micro Framework. With this switch, any use of Visual Basic features outside the embedded core functionality will result in a compiler error.
The compiler switch "/platform: anycpu32bitpreferred" was added as a better alternative to the AnyCPU setting. Many developers change the default Target CPU from x86 to AnyCPU, thinking that will provide optimum performance in both x86 and x64 operating system (OS) environments. However, the performance penalty for running 64-bit code is rarely worth it. It's justified only when large memory space is truly needed. The vast majority of applications will run faster as 32-bit applications, even in a 64-bit OS. This new compiler switch favors the benefits of x86 on an Intel CPU, but still permits deployment to other CPUs such as ARM. Note that due to a bug in VB11, this option is not available in Visual Studio's Project Properties Compile tab Target CPU field, it can only be set with the vbc.exe command line compiler.

The compiler switch "/highentropyva" marks the assembly header with a flag instructing the OS to perform additional randomization of the memory layout of the executable, making it less vulnerable to some security attacks. This switch is on by default.

Optional Parameter Overloads 
The following overloads are now legal in VB11. In VB10, they generate the error message shown in Figure 1.
  Private Sub f(x As Integer)
           End Sub  Private Sub f(x As Integer,
           Optional y As Integer = 0)  End Sub

Figure 1. Visual Studio 2010 overloads error removed in Visual Studio 11 Beta

Read-Only Types
Three read-only types were added to the .NET Framework for compatibility with WinRT applications: IReadOnlyCollecton(Of T), IReadOnlyList(Of T) and IReadOnlyDictionary(Of K,V). Sample code to initialize the three structures is as follows:

  Private Sub NewVB11Types()
   'Initialize the ReadOnlyCollection from a mutable collection  
   Dim VSMAuthors As New List(Of String)(New String() {      
   "Brust", "Kunk", "Nasr", "Papa", "Steele", "Vogel"})  
   Dim VSMColumns As New Dictionary(Of String, String) From {      
   {"C# Corner", "bit.ly/HF0unQ"}, {"On VB", "bit.ly/HcVWmO"}}  
   Dim roc As New System.Collections.ObjectModel.ReadOnlyCollection(Of String)(VSMAuthors)  
   Dim rol As System.Collections.Generic.IReadOnlyList(Of String) = VSMAuthors  
Dim rod As System.Collections.Generic.IReadOnlyDictionary(Of String, String) = VSMColumns
End Sub

Type Inference for Return Array Literals 
Visual Basic 11 extends type inference to array literals as shown in the following code. In Visual Studio 2010, the "Return {}" statement would have been typed as an Object array incompatible with the required return type of Integer array and generated the error shown in Figure 2 . Under Visual Studio 11, this sample code builds fine.
  Function f(i As Integer) As Integer()    
   If i = 0 Then Return {}    
   Return {1, 2, 3}  End Function




Bug Fixes 
Nearly 200 bugs were fixed in Visual Studio 11, including many situations that caused Visual Studio to crash: error reporting, closing a project, referencing an obfuscated assembly, using NoPIA (type embedding) and huge string concatenation. Visual Studio 2010 was the first release of the WPF-based user interface, so these crash bugs were not unexpected, and they were quickly addressed.


How can you best report errors and enhancement suggestions to Microsoft to help improve future versions of Visual Studio and the .NET languages? If there is a crash, allow the Watson report of the crash to be sent to Microsoft. These reports are aggregated, and the ones that occur most frequently get automatically created as bugs.

Bugs are sometimes drawn from StackOverflow or from blogs, but this is not a reliable way to get Microsoft's attention. It's better to file your bug or enhancement idea on Microsoft Connect or the Visual Basic Language forum. These sites get the greatest attention from Microsoft.

Explore the Visual Basic 11 Beta
I've listed just some of the lesser known improvements in the Visual Basic 11 Beta. If you have not done so already, download your copy of the Windows 8 Consumer Preview and the Visual Studio 11 Beta. I'm sure you'll enjoy these enhancements and find even more language goodies than I've discussed here.


10.4.12

DNS Class





Method of the DNS 



BeginGetHostAddresses


Asynchronously returns the Internet Protocol (IP) addresses for the specified host.




BeginGetHostByName


 Obsolete. Begins an asynchronous request for IPHostEntry information about the specified DNS host name.




BeginGetHostEntry(IPAddress, AsyncCallback, Object)


Asynchronously resolves an IP address to an IPHostEntry instance.


BeginGetHostEntry(String, AsyncCallback, Object)


Asynchronously resolves a host name or IP address to an IPHostEntry instance.


BeginResolve


 Obsolete. Begins an asynchronous request to resolve a DNS host name or IP address to an IPAddress instance.




EndGetHostAddresses


Ends an asynchronous request for DNS information.




EndGetHostByName


 Obsolete. Ends an asynchronous request for DNS information.




EndGetHostEntry


Ends an asynchronous request for DNS information.


EndResolve


 Obsolete. Ends an asynchronous request for DNS information.




GetHostAddresses


Returns the Internet Protocol (IP) addresses for the specified host.




GetHostByAddress(IPAddress)


 Obsolete. Creates an IPHostEntry instance from the specified IPAddress.




GetHostByAddress(String)


 Obsolete. Creates an IPHostEntry instance from an IP address.




GetHostByName


 Obsolete. Gets the DNS information for the specified DNS host name.




GetHostEntry(IPAddress)


Resolves an IP address to an IPHostEntry instance.




GetHostEntry(String)


Resolves a host name or IP address to an IPHostEntry instance.


GetHostName


Gets the host name of the local computer.




Resolve


 Obsolete. Resolves a DNS host name or IP address to an IPHostEntry instance.


Have a nice day
Yener Turkeli 

VB.NET Using DNS

Hi Everybody,
I would like to explain one of faq within this essay , how we can
use DNS Function    via VB.NET Windows Application.
I am going to explain it with VB.NET 2010.


If any question, please feel free to contact me y_turkeli@yahoo.com or
yenerturkeli@v-basic.net.

The Dns class is a static class that retrieves information about a specific host from the Internet Domain Name System (DNS).

1-) We are creating a new Windows Application Project


2-) We are designing this windows form in a similar way to the picture below




3-) We are writing this code

Imports System.Net


Public Class Form1


    Private Sub dns_btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles dns_btn.Click
        Dim hostInfo As IPHostEntry = Dns.GetHostByName(address_txt.Text)

        Label1.Text = hostInfo.AddressList(0).Address
    End Sub
End Class


4-) Lets run the application





5-) 
Lets run the application







Have a nice day
Yener Turkeli





12.3.12

Using Outlook via VB.NET

Hi Everybody,
I would like to explain one of faq within this essay , how we can
use Outlook functions  
via VB.NET Windows Application. 
I am going to explain it with VB.NET 2010.


If any question, please feel free to contact me y_turkeli@yahoo.com or
yenerturkeli@v-basic.net.


1-) We are creating a new Windows Application Project


2-) We are designing this windows form in a similar way to the picture below


3-) We are writing this code

Imports Microsoft.Office.Interop.Outlook
Public Class Form1

   
    Private Sub send_btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles send_btn.Click
        Dim my_outlook As New Microsoft.Office.Interop.Outlook.Application()
        Dim my_namespace As Microsoft.Office.Interop.Outlook.NameSpace
        Dim my_folder As Microsoft.Office.Interop.Outlook.MAPIFolder


        my_namespace = my_outlook.GetNamespace("MAPI")
        my_namespace.Logon()

        Dim my_mail As Microsoft.Office.Interop.Outlook.MailItem

       

        my_folder = my_namespace.GetDefaultFolder(Microsoft.Office.Interop.Outlook.OlDefaultFolders.olFolderOutbox)

        my_mail = my_folder.Items.Add(Microsoft.Office.Interop.Outlook.OlItemType.olMailItem)

        my_mail.Attachments.Add("c:\db1.mdb")
        my_mail.Subject = "From Outlook"
        my_mail.Body = text_txt.Text
        my_mail.To = to_txt.Text
        my_mail.CC = cc_txt.Text


        my_mail.Send()
    End Sub
End Class

4-) Lets run the application



4-) Please allow your program to send email


5-) Check your email box 


Have a nice day
Yener Turkeli

8.3.12

Encrypt Connectionstring on Webconfig File



Hi Everybody,
I would like to explain one of faq within this essay , how we can 
Encrypt connectionstring 

via ASP.NET on webconfig file. I am going to explain it with VB.NET 2010.


If any question, please feel free to contact me y_turkeli@yahoo.com or
yenerturkeli@v-basic.net.


1-) We are creating a new Windows Application Project


2-) We are designing this windows form in a similar way to the picture below


Web Config 

<?xml version="1.0"?>

<configuration>
<appSettings/>
  <connectionStrings>
    <add name="my_con" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|test.mdf;User Instance=true"
      providerName="System.Data.SqlClient" />
  </connectionStrings>
<system.web>
<compilation debug="true">
</compilation>
<authentication mode="Windows"/>
</system.web>
</configuration>





3-) We are writing this code

Imports System.Web.Configuration
Partial Class _Default
    Inherits System.Web.UI.Page

    Protected Sub Encrypt_btn_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Encrypt_btn.Click

        Dim file As Configuration = _
WebConfigurationManager.OpenWebConfiguration(Request.ApplicationPath)

        Dim confg As ConfigurationSection = file.GetSection("connectionStrings")

        confg.SectionInformation.ProtectSection("")

        file.Save()
    End Sub

    Protected Sub read_btn_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles read_btn.Click
        con_lbl.Text = ConfigurationManager.ConnectionStrings("my_con").ConnectionString
    End Sub

    Protected Sub Decrypt_btn_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Decrypt_btn.Click

        Dim file As Configuration = _
WebConfigurationManager.OpenWebConfiguration(Request.ApplicationPath)

        Dim confg As ConfigurationSection = file.GetSection("connectionStrings")

        confg.SectionInformation.UnprotectSection()

        file.Save()

    End Sub
End Class

4-) Lets run the application



Encrypted 

<?xml version="1.0"?>

<configuration>
<appSettings/>
  <connectionStrings configProtectionProvider="RsaProtectedConfigurationProvider">
    <EncryptedData Type="http://www.w3.org/2001/04/xmlenc#Element"
      xmlns="http://www.w3.org/2001/04/xmlenc#">
      <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#tripledes-cbc" />
      <KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
        <EncryptedKey xmlns="http://www.w3.org/2001/04/xmlenc#">
          <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5" />
          <KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
            <KeyName>Rsa Key</KeyName>
          </KeyInfo>
          <CipherData>
            <CipherValue>ZBGdEa6zhAmdVQlvHJ2eFmYHD2w3Hl4pDg22JZUUphaNpQYXv0D88ppkinpW8yleZXA2Pws8N5BWyhESfLaYF+dZRas0omjEtxT0nl9/mcRgBXyZYbgsbvAh0g+bIbDYEAsMbHDOXdWfXqPoBTqoqA8lRvzmRXT/cD5kVpZvQys=</CipherValue>
          </CipherData>
        </EncryptedKey>
      </KeyInfo>
      <CipherData>
        <CipherValue>PXsYuKxLKONkZeMdd9NKyUSC6gYsCOmWcPyUrhIuah7FIPLdDO7erNpANt1Si+aInPXMS9MmdfUmCGawlAeZ5zAv7C9yxeUcugI/56alKqHzTBZIOcuYHcZ6z6wVg9iXCHU8S7L/WQqNfY6DVfkeHZnhWnt6v9nki/pkboDzNFyntpgXqD+RHB+/YOJm7MRSBmMQ8uJ5HaTL035pIq4xPhMBuBFk1t2WesBpLOlDAIdy8lQPMcpuyF9MWRyuEYUJUSnwTx3FoPEIPNiu2DfEGSIl1NX2FGd231BrumtiqOhiGynw4qM6dBcWkA9maLR+29Adj86Gc64=</CipherValue>
      </CipherData>
    </EncryptedData>
  </connectionStrings>
<system.web>
<compilation debug="true">
</compilation>
<authentication mode="Windows"/>
</system.web>
</configuration>




5-) Read Connectionstring 



Decrypted Web Config 

<?xml version="1.0"?>

<configuration>
<appSettings/>
  <connectionStrings>
    <add name="my_con" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|test.mdf;User Instance=true"
      providerName="System.Data.SqlClient" />
  </connectionStrings>
<system.web>
<compilation debug="true">
</compilation>
<authentication mode="Windows"/>
</system.web>
</configuration>




Have a great day
Yener Turkeli 

6.3.12

Hand Writing with VB.NET 2010

Hi Everybody,
I would like to explain one of faq within this essay , how we can hand writing via VB.NET. I am going to explain it with VB.NET 2010.


If any question, please feel free to contact me y_turkeli@yahoo.com or
yenerturkeli@v-basic.net.


1-) We are creating a new Windows Application Project 


2-) We are designing this windows form in a similar way to the picture below


3-) We are writing this code


Public Class Form1

    Dim my_picture As New System.Drawing.Drawing2D.GraphicsPath()
    Dim my_color As New Color()
   


    Private Sub PictureBox1_Paint(ByVal sender As System.Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles my_board.Paint


        Dim draw_ = New Pen(my_color, pen_txt.Text)

        e.Graphics.DrawPath(draw_, my_picture)

       
    End Sub








    Private Sub my_board_MouseMove(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles my_board.MouseMove
        If e.Button = MouseButtons.Left Then

            my_picture.AddLine(e.X, e.Y, e.X, e.Y)

        End If


        my_board.Invalidate()
    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        my_color = Color.Blue
    End Sub

    Private Sub my_board_MouseUp(ByVal sender As System.Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles my_board.MouseUp
        my_picture.StartFigure()
    End Sub

    Private Sub pen_color_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles pen_color.Click
        Dim my_dia As New ColorDialog
        my_dia.ShowDialog()
        my_color = my_dia.Color
    End Sub

    Private Sub picture_color_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles picture_color.Click
        Dim my_dia As New ColorDialog
        my_dia.ShowDialog()
        my_board.BackColor = my_dia.Color
    End Sub
End Class



4-) Lets run the application



5-) Lets change background color and foreground color 


6-) Lets write something 




Have a nice day
Yener Turkeli
yenerturkeli@v-basic.net 




Nominate an MVP

Nominate an MVP


Hi All,
If anybody want to nominate me for MVP Award 2012, please send an email to

mvpga@microsoft.com. Here you can outline how your nominee voluntarily and actively participates in online and/or offline community activities that focus on Microsoft technologies.

  • Nominee’s name ( Yener Turkeli)
  • Nominee’s e-mail address ( yenerturkeli@v-basic.net)
  • Country where the nominee lives ( Australia)
  • Nominee’s main spoken language (English-Turkish)
  • One or two Microsoft technologies or products that are the nominee’s area of expertise (for example, Microsoft V-Basic.NET , ASP.NET )
  • Specific examples of online/offline community activities in which the person you are nominating participates ( www.v-basic.net , Visual Basic Egitmenim (book))

Successful candidates will be contacted by a member of the Microsoft MVP Award Program team.

Thank you for your interest!

http://mvp.support.microsoft.com/gp/mvpnominate 

Have a nice day
Yener Turkeli

27.2.12

Using WebClient

Hi Everybody,
I would like to explain one of faq within this essay , how we can WebClient object. I am going to explain how we can show web image via WebClient object.


If any question, please feel free to contact me y_turkeli@yahoo.com or
yenerturkeli@v-basic.net.


1-) We are creating a new Windows Application Project 


2-) We are designing this windows form in a similar way to the picture below


3-) We are writing this code


Imports System.IO
Imports System.Net

Public Class Form1
    Dim my_url As String
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

        my_url = url_text.Text

        Try

            Dim web_client As New WebClient()

            Dim my_image As Image
            Dim img_stream As New  _
                MemoryStream(web_client.DownloadData(my_url))
            my_image = Image.FromStream(img_stream)

            web_pic.Image = my_image

        Catch ex As Exception
            MessageBox.Show("Error  " & _
             ex.Message, _
                "Download Error" & MessageBoxIcon.Error)
        End Try

    End Sub


End Class

4-) Lets run the application




Have a nice day
Yener Turkeli