Design the logic according to your conditions. And make sure the conditions can fit the logic or you'll never go as you wish. If you can't create the simple logic of this, you are not better then 10 years old kid. Hint: Tree diagram method. I'm sorry.
Nouvand
Posts
-
validation by code -
How to write data into a file?Lets say you wanna write data into binary file. Make sure you already convert the data into byte array (in this examples: StreamByte()). And if you;re using vb 2005, use this a line code to write to file. My.Computer.FileSystem.WriteAllBytes("C:\MyData.dat", StreamByte, True) Set the last argument to False if you want to append the file. It means, you can add more bytes chain into the same file. And if you wanna read your data, use this one Dim StreamByte As Byte() = My.Computer.FileSystem.ReadAllBytes("C:\MyData.dat") hope this helpful.
-
Strings:)'Or you can try this. --------------with comments----------------- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If Me.TextBox1.Text <> Nothing Then 'make sure the textbox value is exist. Dim NameParts As String() = Split(Me.TextBox1.Text) 'split the name parts into an array. Dim FullName As String = "" 'make a buffer to save the processed name parts. Dim nMax As Integer = NameParts.GetUpperBound(0) 'number of name parts. For i As Integer = 0 To nMax 'iterate through the element of name part array. 'Replace first character with upper case character on each elements. NameParts(i) = Mid(NameParts(i), 1, 1).ToUpper & Mid(NameParts(i), 2).ToLower FullName &= NameParts(i) & " " 'save into buffer. Next Dim xTrim As Integer = FullName.Length - 1 'count characther length in fullname FullName = Mid(FullName, 1, xTrim) 'remove space character at the end of fullname. Me.TextBox1.Text = FullName 'put the processed value back into textbox End If End Sub --------------without comments----------------- Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click If Me.TextBox1.Text <> Nothing Then Dim NameParts As String() = Split(Me.TextBox1.Text) Dim FullName As String = "" Dim nMax As Integer = NameParts.GetUpperBound(0) For i As Integer = 0 To nMax NameParts(i) = Mid(NameParts(i), 1, 1).ToUpper & Mid(NameParts(i), 2).ToLower FullName &= NameParts(i) & " " Next Dim xTrim As Integer = FullName.Length - 1 FullName = Mid(FullName, 1, xTrim) Me.TextBox1.Text = FullName End If End Sub
-
how to save a file into MS Access Table...I use ReadAllBytes and WriteAllBytes built-in functions Form Systems.IO namespace. The size is ok. :)
-
TableAdapter, Database Tutorialhi..cstrader232 (how to spell your name?) X| ;) It's not easy to make tutorial. if i got ones i will inform you.. But let take a look in your problem.. what are the problem regarding to fill or refill dataset and also with table adapter. ?:confused: just let us know ur problem then we can respon it as soon as we understand and figure out the solution. Beside, you have to try by yourself to experience more problem and that will make you sharper. How about interactive tutorial..? we'll discuss what kind of project will be develop in order to learn something within. and then we can develop it together in paralel? :-Ois it sound good?
-
ComboboxMake inner join to JobMaster table/query in your query.
-
one to one milion conversion of numbers into words??Are you working as cashier or teller maybe? ya..ya.. i'm very understood what you're facing out now. There are 2 things you need to develop here: 1. Parser (mean: will parse the amount into several variables) 2. Dictionary (every variable declare above will bind to word on dictionary.) I can help you with the parser but i have no time with the dictionary. Beside, English isn't my 1st language. I'm hungry now, maybe after dinner i'll write it for you. X|
-
About User Entered Data [modified]Beside using the registry, you can use My.Settings to store your setting. You have to create your setting in Design Time You can set this in Project Properties and point to Settings Tab. The settings will be save into XML format in your application path here's the code to change and save the settings ---------------------------------------- My.Settings.UserName = "BrazenSix" My.Settings.Subject = "About what??" My.Settings.Save() to retrieve settings value ---------------------------------------- Dim UName, USubject As String UName = My.Settings.UserName USubject = My.Settings.Subject
-
Is there a way to hide datagrid columnsJust replace the string with index of column.. YourGrid.Columns(0).Visible = False :suss:
-
Windows authentication with login formIf you're using VB.NET or VB2005. Please spend your time to look at MSDN Help: 'My.' From 'My' you can get a lot of information about security, Devices, etc.. :cool:
-
ole object in access database.........It's been a long time since i stop using my vb6. Now i'm using vb2005. You can store many kind of file into your OLE object field. THe concept is: First, you need to read all bytes of your file and put it into an array of bytes. Last, then you can store this array into your OLE Object. Simple isn't it?:laugh: In VB2005 you can do this with a line of code: -------------------------------------------------------------- Imports System Import System.IO Class Streamer 'It will return array of bytes. Public Function GetByteArrayFromFile(ByVal FileName As String) As Byte() Return File.ReadAllBytes(FileName) End Function 'It will make the file form array of bytes. Public Sub MakeFileFormByteArray(ByVal FileName As String, ByVal ByteStream As Byte()) File.WriteAllBytes(FileName, ByteStream) End Sub End Class -------------------------------- You need to make the routine to retrieve and store the data by your own. I believe you can do that. If anyone can convert it to vb6? Plz Helo him Thanks before
-
comparing values on fields in arraylistsOr... Here we have 2 array list ArrList1 -------- arrayA1 * arrayA2 * arrayA3 * arrayA4 * -------- ArrList2 -------- ArrayB1 * arrayB2 * arrayB3 * arrayB4 * -------- *= 1 dimensional array. Lets say you want to compare arrayA2(n).Length with arrayB2(n).Length. But before we compare the values, we need to compare the bounds of arrays. ----------------------- Dim x as integer = ArrList1.GetUpperBound(0), _ y as integer = ArrList2.GetUpperBound(0) if x = y then For i as integer = 0 to x If ArrList1(i).Length = ArrList2(i).Length Then 'put your code here End If Next End If You can't compare "arraylist1(r) = arraylist2(r)" because the value on both side is an array, not property of array. Every array has properties(Length, UpperBound, LowerBound, i;e) I mean you can't compare your gf with your friend's gf, except they properties such as skin color, cute face, height, etc. ;P Here sample code to copy an array from array list to a new array: Dim newarr As Object() = ArrList1(1).Clone Good Luck -- modified at 4:59 Friday 4th August, 2006
-
comparing values on fields in arraylistsHmm.. have you check the datatype on both arrays.. I believe you knew that Integer and Long were not the same things and it would throw exception if you compare those values. or try to edit this line: .... If arraylist1(r) = arraylist2(r) Then .... replace with: .... if CType(arrayList1(r), Object) = CType(arrayList2(r), Object) Then .... you can replace Object data type into another data type but remember to set the sama data type on both side of comparison process.
-
how to save a file into MS Access Table...Wow... i just found it... Just take a line of code to read a file into an array of bytes, and a line for write the bytes array into a file... ty Microsoft ;P
-
how to save a file into MS Access Table...It will be pdf or ms office files. I want to embed it to the database. Here i tell you the concept we want to meet to: We have several teams on the field. And those team will use and report the data using that database. So for this purpose, i create the replica set. Frequently, they have to submit the pre-formated report in office(doc,xls,ppt) and pdf. The teams report once every month. So all they have to do is just to send the database file and at HQ team will syncronize the database and send it back to the field. I never use OLE object, so it possible to store array of byte into it? Is it take more space? ty:)
-
how to save a file into MS Access Table...Thanks anyway..:)
-
Formatting data using a data gridIt looks like Pivot Table... I don't know if Datagrid Control in VB can does. How about this.. you unbound your datagrid with your datasource.. You will create several collection/array to act as buffer/dataset for your data Then you will put that data into datagrid cell like the way you want to. It make sense?
-
sharing common data between 2 seperate applicationsTry to add Marking field on your database.. If any changes or user in app1 is using the cell then make a routine that will sets the fields value. The value will be represent as locking for example. So.. when app2 is accessing the current cell, it will check the state of the cell and will set the rules to the user how to interact with it. Example: 0=Unlocked 1=Locked Make sure, you mark it when u click on the cell and immediately the routine will send/update marking value into related record that represent your current cell to prevent app2 to mistaken retrieve the incorrect marking value.
-
InventoryJust start from build the database then you'll find out what you gonna do next.
-
how to check the check box programatically in vb..?What do you want to check from the checkbox? You have to make it narrow, so other user can help you with it. Thanks