800 Posted Topics

Member Avatar for Rachna0309

You can try to force the software to use 32 bit datatypes with a statement like this. Try '...Your Code. Dim shortVal As Short 'Replace this with your short variable. Dim i32Converted As Int32 = Convert.ToInt32(shortVal) 'Commit the 32bit value to the database. '...Your Code to update database. Catch ex …

Member Avatar for Begginnerdev
0
197
Member Avatar for reedone816

You have to update the datasource of the datagrid view. A DataAdapter will do the job: Dim da As OleDB.OleDBDataAdapter(New OleDB.OleDBCommand("SELECT * FROM TabelName",MyDbConnection)) 'Make sure the connection passed in is open. da.UpdateCommand = New OleDBCommandBuilder(da).GetUpdateCommand()' If not you will have to open the connection before calling this line. da.Update(MyDataGridViewSource) …

Member Avatar for reedone816
0
433
Member Avatar for UKnod

This will be an extremely complex thing to do it VB.NET, but [here](http://vyaskn.tripod.com/search_all_columns_in_all_tables.htm) is an example for SQL Server (Syntaticly Close to Access)

Member Avatar for TnTinMN
0
276
Member Avatar for swtprince

If the items that are in the access database combobox are infact in a table, then yes. If not, you will need to create a table, drop the data in, bind the data, and fill the combobox. [Here](http://www.codeproject.com/Articles/3665/Data-binding-concepts-in-NET-windows-forms) is an example of DataBinding to help you understand the concept.

Member Avatar for Begginnerdev
0
170
Member Avatar for xHellghostx

You can also try using a [Masked Text Box](http://msdn.microsoft.com/en-us/library/kkx4h3az.aspx).

Member Avatar for Reverend Jim
0
4K
Member Avatar for EliteNMC
Member Avatar for JamesCherrill
-1
101
Member Avatar for ImZick

Do you have code that draws the chart, or are you using some kind of office interopt to draw it?

Member Avatar for TnTinMN
0
3K
Member Avatar for jontennyeah

If you are using a Query to fill that report (99.99% sure you are at some point) I would check that Query for parameters than need to be passed in. [Here](http://stackoverflow.com/questions/542510/how-do-i-create-a-parameterized-sql-query-why-should-i) is an example.

Member Avatar for Begginnerdev
0
155
Member Avatar for HctiMitcH

Do you have code that fires on exit click? If so: I would start there. Step through the code and see where it stops. If not: I would start with Cleaning/Rebuilding the Solution. Build > Clean Build > Rebuild It has worked for me a few times.

Member Avatar for HctiMitcH
0
439
Member Avatar for hdng76

[AutoPostBack](http://www.w3schools.com/aspnet/prop_webcontrol_textbox_autopostback.asp) and [IsPostBack](http://msdn.microsoft.com/en-us/library/system.web.ui.page.ispostback.aspx)

Member Avatar for JorgeM
0
111
Member Avatar for monching

If you are wanting the button - you can try to reference the last clicked button to figure out which one was clicked. Example: Dim btnLastClicked As New Button Private Sub Button2_Click(sender As Object,e As EventArgs) Handles Button1.Click btnLastClicked=CType(sender,Button) 'btnLastClicked will now reference Button1 End Sub Private Sub Button2_Click(sender As …

Member Avatar for tinstaafl
0
2K
Member Avatar for ImZick

You can do as Jim has said and shave a VERY small amount of time off by placing everything inside of the If statement: If MsgBox("Do you want to Delete?", MsgBoxStyle.YesNo, "Confirm") = MsgBoxResult.Yes Then Dim cmd As new OleDBCommand("",con) cmd.CommandText = "DELETE FROM [" & EBU2DB_LOB & "] " …

Member Avatar for ImZick
0
181
Member Avatar for Begginnerdev

Upon resizing an anchored combobox - I noticed the text was always selected. This sparked the initiative to fix this problem. (Microsoft decided not to) So by extending the combobox class we can fix this. The following class can be dropped into a form for designer manipulation or as a …

2
276
Member Avatar for josverhoeff

Can you have something like this: Do While True strVarName = ds.Tables("MyTable")(iRow)("varname") strVarValue = ds.Tables("MyTable")(iRow)("varvalue") If Execute(strVarName, strVarValue) Then Exit Do 'If the function returns True, the loop will exit. Loop Private Function Execute(ByVal sVarName As String, ByVal sVarValue As String) As Boolean 'Your code here End Function Or am …

Member Avatar for josverhoeff
0
540
Member Avatar for shermags

Under your project's settings you can set the targeted deployment platform. Project > YourProjectNameHere Properties > Compile > Change Configuration to Release > Change Platform Et Voila

Member Avatar for shermags
0
135
Member Avatar for monching

Do you have crystal reports installed on the developer machine? If not - see [here](http://www.crystalreports.com/). If so - [Here](http://www.codeproject.com/Articles/9781/How-to-Load-and-Display-Crystal-Reports-in-VB-NET) is a great reference project on CodeProject.

Member Avatar for monching
0
387
Member Avatar for noname1015

After a quick google search, I have found [an article](http://social.msdn.microsoft.com/Forums/is/windowsdirectshowdevelopment/thread/560fb66c-76f4-4d5d-87ec-90bc683120df) that may be of use to you.

Member Avatar for Begginnerdev
0
455
Member Avatar for ImZick

I think your problem may be just as George and tins have stated. I think you are simply passing in a string that may have an extra space or a character that's not expected. Step through and look at the autos to see what is happening with your code.

Member Avatar for G_Waddell
0
203
Member Avatar for Unused Mass
Member Avatar for Begginnerdev
0
188
Member Avatar for Lightninghawk

Sounds more like a torjan/virus than a browser hijack. Try [Malwarebytes](http://www.malwarebytes.org/) - It's free and works great.

Member Avatar for gerbil
0
283
Member Avatar for achinthaadd

You will have to keep track of total time elapsed that the application has ran. You can't assume the app will stay loaded into memory for 10 days - therefore you will have to look into storing the total time it has spent running. You can use Registry Keys, Serialized …

Member Avatar for achinthaadd
0
115
Member Avatar for josverhoeff

If you are using datasets - You may have the problem of opening and closing a connection the same table multiple times. When I do this I declare one connection that will stay open until all operations are completed on that table - then close. If this is not the …

Member Avatar for TnTinMN
0
533
Member Avatar for clubberlangMayo

You can simplify this code with something like this: Public Class Main Dim rnd As New Random Dim iNumberToGuess As Integer Private Sub btnEnter_Click(sender As Object, e As EventArgs) Handles btnEnter.Click Try If IsNumeric(txtAttempt.Text) Then If CheckGuess(CInt(txtAttempt.Text)) Then Dim res As DialogResult = MsgBox("Do you want to exit the application?", …

Member Avatar for clubberlangMayo
0
282
Member Avatar for davidmr

Is the DGV databound? When you say it would be activating a checkbox and pressing a button, do you mean: 1) The user presses a check box 2) The user presses delete or 1)The application fires off a checkbox 2)The application fires off a button_click event

Member Avatar for TnTinMN
0
378
Member Avatar for sathishk20
Member Avatar for ImZick

Try setting the window parent of form2. 'Place a statement to check and launch. 'The check is to safeguard from InvalidOperation Exceptions. If Form2.Visible = False Then Form2.Show(Me) 'A simple call like: Form2.TextBox1.Focus() 'Will then focus the control desired.

Member Avatar for Begginnerdev
0
218
Member Avatar for SQLpower

You can fix your problem by simply opening the connection to communitcate. Use Reverend Jim's Code and add the following line before da.Fill(ds) da.SelectCommand.Connection.Open() da.Fill(ds)

Member Avatar for TnTinMN
0
223
Member Avatar for jill.valentine.5015

You will have to look into using [Hooks](http://support.microsoft.com/kb/319524).

Member Avatar for Begginnerdev
0
35
Member Avatar for Mr.M

Are you wanting to listen for events while the application has focus, or when the application is running and focus isn't required? If the first, then you just need to implement a timer/event lister on your form and place something like this in the timer.Tick event: Private iSecondsElasped As Integer …

Member Avatar for Begginnerdev
0
331
Member Avatar for chdboy

You might also want to look into using a data adapter do reduce the amound of code you have. For example: Private Sub UpdateData() 'You can place your select statment here... 'Don't worry about selecting certian columns... you will only edit the ones you want in the code below. Dim …

Member Avatar for chdboy
0
183
Member Avatar for rgilmore

If you want to search for all occurrances simultaneously, then you might want to check into [multithreading](http://www.codeproject.com/Articles/15104/Multithreading-with-VB-NET-A-beginner-s-choice).

Member Avatar for Begginnerdev
0
138
Member Avatar for Hendo

Have you verified that the ftp site allows folder creation? Also, you can clean the code with something like the following: private WebResponse CreateDirectory(string sDir) { try { FtpWebRequest req = FtpWebRequest.Create(sDir); req.Credentials = new NetworkCredential("username", "passw"); req.Method = WebRequestMethods.Ftp.MakeDirectory; WebResponse Response = req.GetResponse; return Response; } catch (Exception ex) …

Member Avatar for Begginnerdev
0
3K
Member Avatar for bryann

Kind of an OCD thing - but You can make your code a little cleaner with something like this: Dim iCount as Integer = 1 For Each t As TextBox In Me.Controls xlSheet.Cells(1,i).Text = t.Text i+=1 Next

Member Avatar for bryann
0
1K
Member Avatar for Oracle1986

If the library's source code is not accessible - then you can't. Only if the function takes a structure in as a parameter can you pass it in. You would have to recreate the function. ( to overload the first ) If you **DO** have the source code, just modify …

Member Avatar for Begginnerdev
0
101
Member Avatar for Lethugs

Try building a custom handler for it. 'Declare the textbox as so: Dim WithEvents txtBox1 As New TextBox Private Sub txtBox1_MouseDown(sender As Object, e As Windows.Forms.MouseEventArgs) Handles txtBox1.MouseDown If e.Button = Windows.Forms.MouseButtons.Left Then MsgBox("Left mouse button was pressed!") ElseIf e.Button = Windows.Forms.MouseButtons.Right Then MsgBox("Right Mouse Button was pressed!") ElseIf e.Button …

Member Avatar for Lethugs
0
1K
Member Avatar for sandeep.gade

Well you need to do the following: 1) Sit down and figure out what data needs to be stored ( You **WILL** need a database ) 2) Choose the [database](http://en.wikipedia.org/wiki/Category:Types_of_databases) that's right for you. 3) Design your atomic tables ([1NF](http://en.wikipedia.org/wiki/First_normal_form),[2NF](http://en.wikipedia.org/wiki/Second_normal_form),[3NF](http://en.wikipedia.org/wiki/Third_normal_form)) 4) Desing your GUI (With the end user in mind) …

Member Avatar for Begginnerdev
0
184
Member Avatar for ImZick

I use the following methods when I am editing data: Dim Con as New OleDBConnection("MyStringHere") Dim da As New OleDBDataAdapter("SELECT * FROM table",Con) Dim ds As New DataSet Try Con.Open() da.Fill(ds,"MyTable") ds("MyTable").Rows(0)("ColumName") = Me.Jan_Revenue2.Text ds("MyTable").Rows(1)("ColumName") = Me.Feb_Revenue2.Text ds("MyTable").Rows(2)("ColumName") = Me.Mar_Revenue2.Text da.UpdateCommand = New Data.OleDb.OleDbCommandBuilder(da).GetUpdateCommand da.Update(ds.Tables("MyTable")) Catch ex As Exception MsgBox(ex.ToString) …

Member Avatar for Begginnerdev
0
205
Member Avatar for Rahul47

[Here](http://codebetter.com/petervanooijen/2004/02/11/exporting-from-crystal-reports-to-pdf-word-excel-and-html/) is an example in C# ([Translate](http://www.developerfusion.com/tools/convert/csharp-to-vb/)) to use as a reference point.

Member Avatar for Dili1234
0
73
Member Avatar for IsaacMessi10

You can find a code [translator](http://www.developerfusion.com/tools/convert/csharp-to-vb/) for C#/VB.NET that will translate the code into something you can understand. (Hopefully)

Member Avatar for IsaacMessi10
-1
102
Member Avatar for Galbatorix

Does rumType.ToString() return a value? Step through the code in debug, and use intellisence to check if it does.

Member Avatar for Khristophor
0
141
Member Avatar for chdboy

Try this to see if the byte value is generating an image correctly: Using msStream As New IO.MemoryStream(pictureData) picture = Image.FromStream(msStream) If IsNothing(picture) = False Then frm.PB1.Image = picture Else MsgBox("Picture returned nothing") End If End Using

Member Avatar for chdboy
0
3K
Member Avatar for Minko

You can try something like this: Dim WithEvents MonthCalendar1 As New MonthCalendar Private Sub MC1_DateChanged(sender As Object, e As DateRangeEventArgs) Handles MonthCalendar1.DateSelected 'This will get the dates Dim dtStart As Date = e.Start Dim dtEnd As Date = e.End 'This will create a timespan from those dates. Dim dtRange As …

Member Avatar for Minko
0
263
Member Avatar for Begginnerdev

After seeing quite a few posts today asking about event handlers for dynamicly created controls, I have decided to give a little example for reference. **Note that you should check [Microsoft's Documentation](http://msdn.microsoft.com/en-us/library/system.windows.forms.control.aspx#inheritanceContinued) ( or research from web ) of any control if you are struggling**

0
514
Member Avatar for khair.ullah

The first column in a listview hold's the value placed in the LVI's .Text property. Example: |Record| Name | Age | Date | |.Text |SubItem|SubItem|SubItem| This being said - you need to change your code to reflect this: lvwItem = ListView 1. Items. Add (reader.G etString (0)) To: lvwItem.Text = …

Member Avatar for evadehawkeye07
0
6K
Member Avatar for IsaacMessi10

The easier solution would be to set the control's anchors in the desinger. This will cut down on code. Unles, of course, you are creating these controls on runtime.

Member Avatar for IsaacMessi10
0
126
Member Avatar for IsaacMessi10

I am not fully understanding your question. If you are asking for the code you are so close. Something like this: If ComboBox1.Text.Contains("x") Then Dialog1.ShowDialog() End If If not, then what **ARE** you asking? Please explain in more detail.

Member Avatar for IsaacMessi10
0
90
Member Avatar for Rahul47

Declare the string in the application settings, then call that setting. Example: 'In Application Settings Name | Type | Scope | Value myCon|String|Application|'Your Connection String Here 'In code Dim con As New OleDBConnection(My.Settings.myCon) If the string is changed in the application settings - it is changed globally.

Member Avatar for Begginnerdev
0
111
Member Avatar for sanket044

I must be a wizard! I set the form border style to none and then set the form to maximize on form load. Works like a charm for me. Do you have any special form drawing code?

Member Avatar for sanket044
0
2K
Member Avatar for smitty68503
Member Avatar for smitty68503
0
174
Member Avatar for Nionoas
Member Avatar for <M/>
0
313

The End.