646 Posted Topics

Member Avatar for abrars

"Transaction" is a reserved word. Rename your table to "TransactionTable" or something like that.

Member Avatar for abrars
0
152
Member Avatar for QuickBooksDev

All the .NET methods and properties, that access file version data, are ReadOnly. Do you have only a single file to modify? If so, have you tried some hex editor (without messing up the original file of course)?

Member Avatar for QuickBooksDev
0
271
Member Avatar for Will Gresham

[QUOTE]The HTML produced by word is bloated and pretty useless to any program other than word (But then you already know that)[/QUOTE] Yes, I do know that very well. First solution that came in to my mind is to search for a third-party component that would "parse" Word documents to …

Member Avatar for Teme64
0
95
Member Avatar for maliha

Hi Maliha! This is a VB.NET forum. Please re-post your question to DaniWeb's [URL="http://www.daniweb.com/forums/forum4.html"]Visual Basic 4 / 5 / 6 [/URL] forum. You will get the answer from there.

Member Avatar for Teme64
0
44
Member Avatar for Naziakanwal

[QUOTE]f[/QUOTE]??? Here's an example [CODE=VB.NET]Dim g As Graphics g = PictureBox1.CreateGraphics g.DrawLine(Pens.Blue, 0, 0, 20, 20) [/CODE] Take a look at System.Drawing.Graphics namespace. And use some googling to find tutorials and graphics programming examples.

Member Avatar for jbennet
0
44
Member Avatar for sanstepsan

You already noticed that you couldn't do it in the way you first tried out. VB.NET doesn't have control arrays, it has control collections instead. Here's a one way to find matching text boxes. It uses Tag property and Name property to identify matching Alpha and Bravo text box [CODE=VB.NET]' …

Member Avatar for sanstepsan
0
164
Member Avatar for hennel

With a quick look I couldn't spot any error (in Edit function). I suggest setting a breakpoint to line [ICODE]MyOledbCommand.ExecuteNonQuery()[/ICODE], and before executing the command, check the properties of MyOledbCommand especially MyOledbCommand.CommandText.

Member Avatar for Teme64
0
89
Member Avatar for evertron

I rewrote the Client class and added a lot of (hopefully) helpful and understandable comments. I didn't check the rest of your code, but I hope you 'grasp' now more of the basics of the classes [CODE=VB.NET]Option Explicit On Option Strict On Public Class Client 'account information ' Local, private …

Member Avatar for Teme64
0
126
Member Avatar for nawa

[QUOTE]I worte a code for Palindrom and i am receiving error message could someone tell me where is the mistake is?[/QUOTE] Could you please tell, what error message you get? When you post your questions here, always include any error messages and/or describe the actual problem as detail as possible. …

Member Avatar for Teme64
0
102
Member Avatar for tonief

First, set a breakpoint at line [ICODE]conn.Open();[/ICODE], execute the line and check conn.State. It should be Open (or ConnectionState.Open) if your connection string is ok. Otherwise, recheck connection string like Ramy said. After you get your code work at that point, you have [ICODE]cmd.ExecuteNonQuery(); cmd.ExecuteScalar();[/ICODE] Since DELETE is not a …

Member Avatar for mail2saion
0
91
Member Avatar for Nawsheen

[QUOTE]Dim msgAnswer as MsgBoxResult msgAnswer = MsgBox ("Are your sure you want to Exit?",MsgBoxStye.YesNo,"Warning") If msgAnswer = MsgBoxResult.Yes Then End Elseif msgAnswer = MsgBoxResult.No Then Me.Close End If[/QUOTE] Here's the same code a bit more in VB.NET style than VB6 style [CODE=VB.NET]Dim msgAnswer As Windows.Forms.DialogResult msgAnswer = MessageBox.Show("Are your sure …

Member Avatar for Teme64
0
115
Member Avatar for sonia sardana

Here's maybe a better sample code for you: [URL="http://www.codeproject.com/KB/vb/PanExample.aspx"]Pan / scroll an Image in VB.NET[/URL] by Anthony Queen. The code is very simple and doesn't use any API calls.

Member Avatar for Teme64
0
90
Member Avatar for firoz.raj

My guess is that a 'Materials' can have many 'MaterialRequisitionDetail' (1-N relationship). Now, MaterialRequisitionOrder.requisition_no = 129 gives you a single 'MaterialRequisitionOrder'. 'MaterialRequisitionOrder.requisition_no' gives you a single 'MaterialRequisitionDetail.requisition_no' (1-1 relationship). 'MaterialRequisitionDetail.item_code' gives you many (four in this case) 'Materials' because of 1-N relationship between 'MaterialRequisitionDetail' and 'Materials'. If I'm right about …

Member Avatar for Teme64
0
87
Member Avatar for Rahul8389

What do you mean by 'root directory'? You get most of the special directories with [ICODE]My.Computer.FileSystem.SpecialDirectories[/ICODE] property. [ICODE]Environment.SystemDirectory[/ICODE] property returns full path of the system directory. [ICODE]Environment.GetFolderPath(<SpecialFolder>)[/ICODE] function returns also special folders. Check those properties and the function. I'll think you'll find what you're looking for.

Member Avatar for Teme64
0
109
Member Avatar for kn2790

A few obvious points are wrong with the code [CODE=VB.NET]cN = New OleDbConnection("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\LVuserdb.accdb;Jet OLEDBatabase Password=1") myOleDbCommand = New OleDbCommand("SELECT StaffID,Password FROM Staff WHERE Staffid = '" & username & "' AND Password1 = '" & password & "'", cN) username = Me.staffid.Text password = Me.staffpass.Text[/CODE] First, get the user …

Member Avatar for Teme64
0
277
Member Avatar for Rohinir

I answered a similar question about listbox control and I assume that checked listbox behaves in the same way. Setting MultiColumn property doesn't actually provide you a control with desired number of columns. It still has a single list of items and while you add more items, it 'wraps' them …

Member Avatar for Teme64
0
3K
Member Avatar for Nada403

Here's a one way to do it[CODE=VB.NET] Dim StartDate As Date Dim DaysUntilToday As Integer Dim aRandomNum As Integer Dim oRandom As System.Random Dim aRandomDate As Date ' Start date (in my locale format) StartDate = CDate("1.1.2008") ' Number of days until today DaysUntilToday = System.DateTime.Now.Subtract(StartDate).Days ' Create a 'randomizer' …

Member Avatar for Teme64
0
101
Member Avatar for Nada403

Here's a one [URL="http://www.w3schools.com/sql/default.asp"]SQL Tutorial[/URL]. You'll find the samples how to insert records and how to join the tables.

Member Avatar for Teme64
0
56
Member Avatar for tripes

This is for VB.NET 2005 and I hope it works in 2003 too [CODE=VB.NET]Private Sub PictureBox1_MouseClick(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles PictureBox1.MouseClick ' Dim TempBitmap As New Bitmap(PictureBox1.Image) Dim MyColor As Color MyColor = TempBitmap.GetPixel(e.X, e.Y) MessageBox.Show("Pixel x=" & e.X & ", y=" & e.Y & ", …

Member Avatar for Teme64
0
830
Member Avatar for Benniit

[QUOTE]I receive this error ""String or binary data would be truncated. The statement has been terminated""[/QUOTE]You have, for example, a field of type Varchar with size 100 and you're trying to insert a string value which length is longer than 100. For text boxes you can set the Maxlength property …

Member Avatar for Teme64
0
165
Member Avatar for manoj_582033

Ramy has it right that Access is not a "real" database in the sense you can't have multiple users simultaniously. Since this a VB.NET (programming) forum, I guess you're building the system at the moment. I suggest taking a look at some other data storage. Like SQL Server or MySQL. …

Member Avatar for PirateTUX
0
134
Member Avatar for Arunabh Nag

Q1: Open VB.NET. Then open your browser and navigate to [URL="http://www.google.com"]www.google.com[/URL] Q2: [QUOTE]Can a web browser be made..??[/QUOTE] Yes, it can be made. .NET has a WebBrowser control. [QUOTE]If so where do i find help resources.[/QUOTE] By googling [URL="http://www.google.com/search?q=webbrowser+control+vb.net"]webbrowser control vb.net[/URL] Q3: Yes. You can write parts of your application …

Member Avatar for Teme64
0
109
Member Avatar for Merovingian

You didn't mention which DB you're using. For help with connection strings, check [URL="http://www.connectionstrings.com/"]The connection string reference[/URL]. After that you may succeed in creating a new login.

Member Avatar for Teme64
0
123
Member Avatar for ninjaimp

Since you want only the status code, you'll do well with webbrowser control. Another way to check the code is to use WebRequest and WebResponse. Here's something I ripped from my app (bugs included). It may be a bit overkill for your purposes (it returns the page HTML etc.) but …

Member Avatar for ninjaimp
0
1K
Member Avatar for Cardboard Box

[QUOTE]it comes up with an error message saying "object reference not set to an instance of an object."[/QUOTE] That's because variable 'g' doesn't point to anywhere. You can make your drawing in a separate class but you'll have to provide some (control) to draw on. Here's an example how it …

Member Avatar for Cardboard Box
0
116
Member Avatar for pavan204

Here's a VB.NET version of the code above (this is a VB.NET forum :) ) Dim c As Char c = CChar(CStr(Integer.Parse(Hex, System.Globalization.NumberStyles.HexNumber))) and instead of '\r\n', use Environment.NewLine

Member Avatar for Ramy Mahrous
0
183
Member Avatar for 6pandn21

Yes, you do need a loop [CODE=VB.NET]Dim FoundAtPosition As Integer FoundAtPosition = RichTextBox1.Find("foo", RichTextBoxFinds.MatchCase) Do Until FoundAtPosition < 0 ' Highlight text ' Search next occurrence FoundAtPosition = RichTextBox1.Find("foo", FoundAtPosition + 1, RichTextBoxFinds.MatchCase) Loop[/CODE]

Member Avatar for Teme64
0
520
Member Avatar for sravankolla

This VB.NET forum. You'll get an answer if you re-post your question to [URL="http://www.daniweb.com/forums/forum61.html"]DaniWeb's C# forum[/URL]

Member Avatar for Teme64
0
116
Member Avatar for kerek2

Call image's Save method[CODE=VB.NET] PictureBox1.Image.Save("C:\test.jpg", System.Drawing.Imaging.ImageFormat.Jpeg)[/CODE]

Member Avatar for Teme64
0
99
Member Avatar for TheFueley

You may try [ICODE]SendKeys.Send("TEXT FROM VB")[/ICODE] instead of [ICODE]stdINwriter.WriteLine("TEXT FROM VB")[/ICODE] SendKeys.Send() sends keystrokes to the active window. However, it's not a very reliable method. If the process you started loses focus, it won't receive those keystrokes.

Member Avatar for TheFueley
0
118
Member Avatar for sweet cLassy

Split function splits a string to substrings. Second argument is substring separator. For example[CODE=VB.NET] Dim Data() As String Data = Split("Comma,separated,values)", ",") 'Data(0) is "Comma" 'Data(1) is "separated" 'Data(2) is "values"[/CODE]

Member Avatar for sweet cLassy
0
145
Member Avatar for densman

And here's an example how to get an image from the file to a picturebox [ICODE]PictureBox1.Image = Image.FromFile("D:\image.jpg")[/ICODE] You'll have to set some properties of the picturebox to get the result you want. One important property is SizeMode [ICODE]PictureBox1.SizeMode = PictureBoxSizeMode.StretchImage[/ICODE]

Member Avatar for Teme64
0
73
Member Avatar for ninjaimp

Correct syntax is [ICODE]Dim imgbinarydata(imglen - 1) As Byte[/ICODE] Since arrays are zero-based, you use imglen - 1 to get an array with imglen elements. You should check that UploadFile.PostedFile.ContentLength is not zero to avoid errors: [CODE=VB.NET]Dim imgStream As System.IO.Stream = UploadFile.PostedFile.InputStream Dim imglen As Integer = UploadFile.PostedFile.ContentLength Dim imgcontenttype …

Member Avatar for Teme64
0
275
Member Avatar for taylormsj

You didn't said which DB you're using and do you store birth dates in date type or in textual data type. If the birth dates are stored as a text, you'll get matching records (January in this case) with following SQL select statement (just change correct table- and field-names): [CODE]SELECT …

Member Avatar for taylormsj
0
92
Member Avatar for Pacman21

Set Name-property: [CODE=VB.NET]Dim TC As RichTextBox For I = 1 To 100 TC = New RichTextBox TC.Name = "RTBox" & I.ToString Me.Controls.Add(TC) Next I[/CODE]now you should have rt-boxes with names "RTBox1", "RTBox2", ..., "RTBox100". You'll refer to rt-boxes: [ICODE]Me.Controls.Item("RTBox1")[/ICODE] or cast control to RichTextBox type. For example [ICODE]CType(Me.Controls.Item("RTBox1"), RichTextBox).Multiline = …

Member Avatar for Teme64
0
77
Member Avatar for prabu.r

Here are the links: [URL="http://msdn.microsoft.com/en-us/library/ms950416.aspx"]Visual Studio 2005[/URL] you'll find VB.NET reference from there, and [URL="http://msdn.microsoft.com/en-us/library/bb966997.aspx"].NET Framework 2.0[/URL] is the .NET 2.0 reference.

Member Avatar for Teme64
0
70
Member Avatar for jhonnyboy

This doesn't exactly answer how to do it from the module, but shows how to create and dispose forms (from the "main" form) [CODE=VB.NET]' A global variable to "hold" the form Private aForm As Form Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click ' ' Create …

Member Avatar for jhonnyboy
0
164
Member Avatar for jhonnyboy

You have to create StreamWriter in the append mode [CODE=VB.NET]Dim fileOut As New System.IO.StreamWriter(fileName, True)[/CODE]

Member Avatar for jhonnyboy
0
118
Member Avatar for Dawoodelgharib

You will have to write your own control for that purpose. To get started take a look at the thread [URL="http://www.daniweb.com/forums/thread176182.html"]How to resize images at runtime using mouse...[/URL]. There's a "basic" zoomable picturebox user control. I'm not familiar with VB.NET 2008 (or .NET 3.x) which may support those features you …

Member Avatar for Teme64
0
93
Member Avatar for chriswellings
Member Avatar for raiko098

In your update statement [ICODE]UPDATE TIME SET Time_Out = " & timeout & " WHERE EXISTS (SELECT Sessions FROM TIME WHERE Sessions = Sessions)[/ICODE] condition [ICODE]EXISTS (SELECT Sessions FROM TIME WHERE Sessions = Sessions)[/ICODE] is true for each row because [ICODE]Sessions = Sessions[/ICODE] is always true. That's why your statement …

Member Avatar for Teme64
0
90
Member Avatar for razmca

Threading is something that comes with VB.NET. If I got it right, you're using VB6, which does not have "built-in" threading. Re-post your question to DaniWeb's [URL="http://www.daniweb.com/forums/forum4.html"]VB6 forum[/URL]. I'm sure you'll get an answer from there. I don't also think you'll need threading in a setup application.

Member Avatar for razmca
0
113
Member Avatar for kerek2

Take a look at SendKeys class in the VB.NET documentation. It might do what you're looking for.

Member Avatar for Teme64
0
68
Member Avatar for krm08

nescio99 has it right that you can't use ExecuteNonQuery() because you want to [B]query[/B] something from the database. Either use ExecuteScalar() to check if a record exists i.e. returned number of records equals one, like nescio99 suggested, or if you need some information from the record, use simple Execute. If …

Member Avatar for raul15791
0
201
Member Avatar for anilforproject

Here's how you kill current process: [CODE=VB.NET]Dim aProcess As System.Diagnostics.Process aProcess = System.Diagnostics.Process.GetCurrentProcess() aProcess.Kill() [/CODE]To kill a process with a specific ID, make the following change: [CODE=VB.NET]aProcess = System.Diagnostics.Process.GetProcessById(ThisID)[/CODE] I just wonder where you need this code...

Member Avatar for Teme64
0
114
Member Avatar for mem81

You're right about that you have to know the number of the days in a month. This snippet will add one month to a date and "modifies" date to be the last day of the month. In December it goes to the January of the next year. I used DateTime-picker …

Member Avatar for Teme64
0
151
Member Avatar for arunasingh

This is VB.NET forum. You'll find Daniweb's C# forum in [URL="http://www.daniweb.com/forums/forum61.html"]here[/URL]. You may also try Daniweb's site search (in upper right corner) with "import excel sheet". You're not the first one to ask that...

Member Avatar for Teme64
0
74
Member Avatar for novadose

I'm not sure where you need Dictionary object, but if you want a list of unique file names, here's how I would do it [CODE=VB.NET]Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click ' Dim FileNames() As String Dim FileName As String FileNames = IO.Directory.GetFiles("c:\windows") For Each …

Member Avatar for Teme64
0
114
Member Avatar for bonbonbon

A simple Q&D solution[CODE=VB.NET] Dim MyUrl As String = "<a href=""/profiles/13374222/"" title=""View The Admin's profile"">The Admin</a>" Dim StrArr() As String Dim i As Integer Dim UNum As Long StrArr = Strings.Split(MyUrl, "/") UNum = 0 For i = 0 To StrArr.GetUpperBound(0) If IsNumeric(StrArr(i)) Then UNum = CLng(StrArr(i)) Exit For End …

Member Avatar for Teme64
0
161
Member Avatar for newbie_here

Use DISTINCT keyword: [ICODE]SELECT DISTINCT Contractor FROM Companies[/ICODE]

Member Avatar for newbie_here
0
77

The End.