^
pain in the *** to all here. But i think he is helpful sometimes considering his posts in Windows Xp/NT forums.
^
pain in the *** to all here. But i think he is helpful sometimes considering his posts in Windows Xp/NT forums.
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.
Hey bob welcome to daniweb. Great site you got there. :)
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 …
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 ?
pussy :twisted: