Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Introduction
When should you use CType and when should you use DirectCast and which one preforms better? The short answer is: DirectCast is twice as fast for value types (integers...etc), but identical for reference types.

Background
The first thing to understand is that CType and DirectCast are not the same thing. Only CType can convert the underlying object to a new instance of an object of a different type. For example, if you want to turn an integer into a string. Since an Integer doesn't inherit a String, a new instance of a String object must be created in order to store the number as a String. CType can do this, DirectCast cannot. Note: There are other ways to do this too such as the Convert.ToString method or CStr().

Dim MyInt As Integer = 123

Dim MyString1 As String = CType(MyInt, String)

Dim MyString2 As String = DirectCast(MyInt, String) ' This will not work

What DirectCast and CType do have in common is their ability to convert an object to a new type based on inheritance or implementation. For example, if you have a String but it is stored in a variable of type Object, you can use DirectCast or CType to treat that variable as an object of type String because type String inherits type Object. In this case, the underlying data in memory is not actually changing, nor is any processing happening on that data.

Dim MyObject As Object = …

Jx_Man 987 Nearly a Senior Poster Featured Poster

This code running good in desktop application, you can try in web application :

Dim i As Integer
    Dim Con As Control
        
    For i = 0 To Me.Controls.Count - 1
        Con = Me.Controls(i)
        If TypeOf Con Is TextBox Then
            Con.Text = 0
        End If
    Next
Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi
System.String is immutable; System.StringBuilder was designed with the purpose of having a mutable string where a variety of operations can be performed.
StringBuilder is faster when Compared to string
String each time it creates an object.Hence its called Mutable that is changable
Stringbuilder just appends instead of creating new object
String builder class can provide the formatted string facility alway's u have the posibility for appending it can store large data comparatively String class

http://www.java2s.com/Tutorial/VB/0040__Data-Type/PerformancedifferencebetweenStringandStringBuilder.htm

Jx_Man 987 Nearly a Senior Poster Featured Poster

actually its happened in this morning, but now all things in daniweb was fine. I don't know why this happened.

Jx_Man 987 Nearly a Senior Poster Featured Poster

why you don't make user to do not input string/char inputs? make them to input numbers only. so you don't have to convert input from text to number.

Jx_Man 987 Nearly a Senior Poster Featured Poster

oh, great.
Don't forget to mark this thread solved.
Happy coding friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

yeah, this problem happened to me too in this morning.
when i tried to opened forum, it directed me to other site with crossbones pic then for few second other forum appeared and want me to Sign UP as their member...
i just can opened my profile with cookies address in my mozilla address bar.

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi Dazzaman...Welcome to Daniweb friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi Danny...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

private void button1_ON_Click(object sender, EventArgs e)
{
serialPort1.Write(new byte[] { 0xFF, 0x01, 0x01 }, 0, 3);
panel1.BackColor = Color.Lime;
}

C# code above become in this following code :

Private Sub button1_ON_Click(ByVal sender As Object, ByVal e As EventArgs)
    serialPort1.Write(New Byte() {255, 1, 1}, 0, 3)
	panel1.BackColor = Color.Lime
End Sub
Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi Eugene...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Textbox1.Text = "What Ever You Want to Write"
    End Sub
Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi Kevin...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi selva...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

what its your column name?

Jx_Man 987 Nearly a Senior Poster Featured Poster

Sorry I haven't read the Rules. I am new user to DaniWeb. I am very sorry to make lazy. In future i correct this sense. Thanks Jx_Man

its ok...please don't mind it. i m just want to tell you.
Make them tried the best first then you can help them.
actually i like your answer and post in this forum. Keep on fire to help but don't make them have a laziness.
Happy Coding Friend :)

Regard
Jx_Man

Jx_Man 987 Nearly a Senior Poster Featured Poster

I Downloaded PingPong somewhere by google search. I may be useful

thanks to make he more lazy...
Have you read the rules???

Jx_Man 987 Nearly a Senior Poster Featured Poster

try to post your question on Oracle section too...

Jx_Man 987 Nearly a Senior Poster Featured Poster

Go to Google and search that!!!
who want to give u a FULL code?

Jx_Man 987 Nearly a Senior Poster Featured Poster

HKEY_Current_User\Software\VB and VBA Program Settings.
open regedit and go to above path to see the result by shouvik code...

Jx_Man 987 Nearly a Senior Poster Featured Poster

you're welcome...
don't forget to mark this thread solved
Happy coding :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

thanks to use searching function in this forum. :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

I got :
Syntax Error in Insert statement

are you have tried my code in previous post??

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi Phuti...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi Red...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

hi there...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

you want to start timer when button pressed?

Jx_Man 987 Nearly a Senior Poster Featured Poster

post in current section in web development.
this for C# section..

Jx_Man 987 Nearly a Senior Poster Featured Poster

post your code...

Jx_Man 987 Nearly a Senior Poster Featured Poster

well, this is not a simple program but hard program.
you need to store spanish and english word in database, grammar checking?,searching words ...
So, great with your program...

Jx_Man 987 Nearly a Senior Poster Featured Poster

1. Hi Belo...Welcome to Daniweb Friend
2. Table Name, Column Name in database ??
3. Post your code first (your attempt code).
Actually Shouvik was given the answer.
Hope you will learn and repost your feedback.

Jx_Man 987 Nearly a Senior Poster Featured Poster

confusing to read. please explain more what exactly you want to do..

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi Pat...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

make a new form and put your welcome text on label. use timer to set how long the Welcome Screen shown and use progress bar.
i post an example.
Hope this helps.

Jx_Man 987 Nearly a Senior Poster Featured Poster

I post an example in attachment.
Hope it help you.

Jx_Man 987 Nearly a Senior Poster Featured Poster

Just a little wrong :

For Each Item As Object In ListView1.CheckedItems
        lstResults.Items.Add(Item.Text)
Next
Jx_Man 987 Nearly a Senior Poster Featured Poster

so, your checkbox on listview is true...

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi PetrosEklesia...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi Will66...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

HI pramod ...Welcome to Daniweb Friend :)

Jx_Man 987 Nearly a Senior Poster Featured Poster

Hi Welcome to Daniweb Friend :)