arjunsasidharan 297 Practically a Posting Shark

^

pain in the *** to all here. But i think he is helpful sometimes considering his posts in Windows Xp/NT forums.

iamthwee commented: please stop swearing. -2
jbennet commented: that words isnt swearing, its cursing +22
Sulley's Boo commented: iamthwee was never wrong -_- +0
arjunsasidharan 297 Practically a Posting Shark

You can use a datagrid in your form and retrieve the values from your database to your datagrid.

Check out this link. Make changes according to your need.

arjunsasidharan 297 Practically a Posting Shark

Hey bob welcome to daniweb. Great site you got there. :)

christina>you commented: STOP giving me bad rep you fag. If you really had a life you wouldn't keep spreading around rep just to give it back to me. ALL you do is give people rep. Quit acting like a child! -3
joshSCH commented: Christina is right. -2
~s.o.s~ commented: Awww...2 on 1, not fair. :-) +23
arjunsasidharan 297 Practically a Posting Shark

It's pretty simple, write their last choice to a text file, and then when they open up the program again read in that last value.

There was a project where i had to use themes for my application. What i did was create a class file, and in that class file i have written a code where the colors that i change are being saved in the registry. So i used to call the class where ever its need by declaring an object in particular form. And then when changes are made they wil be saved in the registry.

Il give you a bit of a sample code

#Region "Template1 Settings"   'The template1 = theme1
    Public Sub settemp1BackColor(ByVal pstrBackColor As String)
        Dim myRegKey As Microsoft.Win32.RegistryKey = Microsoft.Win32.Registry.LocalMachine
        Try
            myRegKey = myRegKey.CreateSubKey("SOFTWARE\DrawMachineSettings\Template1") 'myRegKey.OpenSubKey("SOFTWARE\DrawMachineSettings", True)
            If Not IsNothing(myRegKey) Then
                myRegKey.SetValue("BackColor", pstrBackColor) 'pstrbackcolor is a value which is been used in a particular form
            Else
                myRegKey = myRegKey.CreateSubKey("SOFTWARE\DrawMachineSettings\Template1")
                myRegKey.SetValue("BackColor", pstrBackColor)
            End If
        Catch ex As Exception
            MsgBox(ex.Message.ToString)
        Finally
            myRegKey = Nothing
        End Try
    End Sub

 Public Function gettemp1BackColor() As String ' Method to get the back color from the registry
        Dim myRegKey As RegistryKey = Registry.LocalMachine
        Dim lstrReturn As String
        Try
            myRegKey = myRegKey.OpenSubKey("SOFTWARE\DrawMachineSettings\Template1", True)
            If Not IsNothing(myRegKey) Then
                lstrReturn = Trim(myRegKey.GetValue("BackColor").ToString())
                If (Trim(lstrReturn) <> "") Then
                    Return lstrReturn
                Else
                    Return Nothing
                End If
            End If
        Catch ex As Exception
            MsgBox(ex.Message.ToString)
            Return False
        Finally
            myRegKey = Nothing
        End Try
    End Function

This is for the back color of that particular form.This …

iamthwee commented: Daft idea, there is no need to mess with the registry? -2
christina>you commented: What you wrote was hypocritic. -3
arjunsasidharan 297 Practically a Posting Shark

649

Duki commented: 649 is not a prime number -1
arjunsasidharan 297 Practically a Posting Shark

451

joshSCH commented: 451 isn't prime -2
arjunsasidharan 297 Practically a Posting Shark

Yes, try writing your idea on paper. You would be using looking for spaces, but not just single spaces because words can be separated by more than one space.

Also watch out for tabs etc.

:D

Hi every body
I have a textbox on my form and i want to know how many words i have writen in it.
the idea >> i thought if i declared ( x as string and x =" ") now x equal one space if i can count how many spaces in the textbox i will know how many words in textbox by adding 1 to result of x .
this is my idea but finally any method will help.
by the way if there are any file *.pdf teatch me functions(trim,len.....) i will be thankful.

why dont you try using textbox1.text.length ?

iamthwee commented: Won't work... -2
arjunsasidharan 297 Practically a Posting Shark

pussy :twisted:

Duki commented: very inappropriate language! +0
christina>you commented: disturbing... -2