I'm using Visual Basic 2010 and my database on SQL Server,maintaining a table "tblSalesLog" with field InvoiceNo etc... Sir my requirement is when I create a NEW Invoice on my windows form the last Invoice number should be printed on a Textbox so, I can follow what number will be the next, because the InvoiceNo maintained manually
I am handling many of the BindingNavigator tasks (MoveFirst, MoveNext, etc.)in code to ensure that I always ask the User to save his changes.
The one area I am have a problem is PositionItem. I would like to sense that the User has changed the Record Number in the BindingNavigatorPositionItem, handle my record Update, and move to the Record Number the User entered I have looked all over and have not found any way to do this.
I'm using VS2010 with a mdb database. I would like to open a new form and fill it with the last added data in the database. I tried to use the "BindingNavigatorMoveLastItem" from the tooltip toolbar but i can't get this to work.
Is there anyone that can tell me the easy way to move to the last record in the database?
i connected a MS Access Database using data source in Visual Studio 2008. im using the following code.
Inherits System.Windows.Forms.Form #Region " Windows Form Designer generated code " #End Region
[Code]....
when i click on load its working and showing the first record from the database. when im clicking at btnNext its not generating any error or warning in visual stduio 2008 and the text fields are not showing the next record?
So i have this form where it prints a certain record i search, but im trying to do restaurant form and a print form that it will print the last order done.So I Know how to print it via search in a crystal report form, but i'm changing the view and i want it to print the last order saved.
how can i manually iterate through an entire datatable record by record, but only moving to next record after clicking a button. am using vb 2008 express and below is the code i wrote: Private Sub STARTButton_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles STARTButton.Click
Dim RealName As String Dim UserName As String Dim PASSWORD As String
I'm maintaining a Datagridview on my Windows Form. When I open the form all the contained records are displaying, which is from SQLserver Table ok. when I open the form the datagridview should show just black and after I insert a new record that particular record should only display on that form gridview. [Code]
I hav a web service which pull records from a database and I am hosting these services in IIS which works fine but I am trying to retrieve the record and display the record in a listbox displaying the time field as the text for that record.I have created the following function
public sub get_data() dim dt as new data.dataTable dim service as ws webservice.webservice
I am trying to check a record in database before inerting a new record here is my code but problem is when i enter a names first alphabet it imediatly populate massage. i want to check it after entering whole name
Private Sub TextBox1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox1.KeyPress Try Dim cnString As String = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" &
I am working on a little football simulator along similar lines to the Football Manager games. For those who aren't familiar with what they look like, here is an image. So yeah I just have little circles running around on the field. Things are fine but I hate the fact that GDI+, as far as I can tell, is pretty much entirely CPU driven. I mean I am trying to make a video game here and it seems like a waste of the graphics card. In terms of performance, it can be smooth but at other times is choppy.
In another thread I asked about multithreading (which I kind of have the hang of now) and when I run a bunch of tasks in the background the GDI+ performance goes right down, I guess because the CPU is being heavily taxed. I guess I could make sure there isn't much background processing from the game when using the GDI+ but I still don't like having the animation so CPU dependent.
I wrote already a program where 2 sheep are moving all over the form , but i want from them to drop a bottle of milk while they are moving by some random time. And when the player take that click on that milk bottle to recive +5 points but this is easy, the hard part is the drop.
I need help moving a listbox item UP or DOWN. VB2010 is like 2008 so dont say that i know the 08 code, but not 2010 code. (sorry if i seem rude, i talk like this alot)
I have very much a noob at coding for VB. I was wondering if i can make it so if u click button1 it will move your mouse to a location. Buuutt if its possible. Smoothly, not super fast the mouse is magically at your location.
This is actually not really a question about vb, but about how to make a code.I'm making a RPG game and I want to make my character have "normal" movement. The problem is actually when I just hold down one of my movement keys (a, s, d, w) my character will jump out of the screen because it's going to fast. here is my movement sub:
Private Sub frmMain_KeyDown(sender As Object, e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown 'MOVEMENT'
i want to move a program that already is running, and by move, i mean change the x and y coordinates of the application on the screen. how would i go about doing this?
It is very easy to move your cursor to a specific coordinate but my question here is how do you move your cursor to an image? Now what this would involve doing is importing an image so the program understands it, then finding that image on your screen (maybe through RGB colors). How exactly do you do this? What is the procedure?
Say I want to import this image: Now I want the program to find that image on the screen (THE START BUTTON) and then move my cursor on it. so cursor.position = new point(the image)
A new journey, A new problem. As I downloaded VS2010 Today, there's a new UI, New Code, new problems.
Now I looked for a code that seemed to work for the VS2008, I found the one .Paul made, but it sure didn't work for me. Is there anyone who managed this on the new 2010? Please tell me.
If there were any confusion what I really wanted, I'll explain.
Mousedown on Picturebox = Move around the form free.
I am trying to make a shape move in a rectangular route clockwise. Right now I am only able to make the shape go right, down, left but not back up again. Whenever I try to make the shape return to its original position, the shape moves back up at the wrong place.
Public Class Form1 Public movingright1 As Integer Public movingdown1 As Integer
Normally you would move a program around by dragging the bar at the top of the window, agreed? How can you change a form in VB to move around when dragging anywhere on the form apart from a button?
there is this picture on the form How would you make arrow keys move the object around the screen?Also how would you make buttons correspond to arrow keys?
I am placing and image using this [code]It works perfectly however when my document is extended to second or third page.. it does not stays on the first page.. it stays on same position however moves to the last page
so my goal is to get a picturebox to move in random directions and smoothly (like a character moving straight in a game) without using thread.sleep and me.refresh (and also without animation atm). Would anyone be able to guide me on how to accomplish this?The reason I want to do this is because when I need to use like 3 threads to move 3 different things around smoothly my computer slows down too much.here's my code now without all the other subs used to place the random code in it's own thread. There's a lot of other code too so I can't really post the entire thing:
Private Sub random_movements(ByVal e As Integer, ByVal speed As Integer, ByVal ctrl As Control) Dim location_x As Integer = ctrl.Location.X
How can I move the mouse to a pixel location of a program?[code]I know it doesn't work, but I'm trying to make it easier to understand what I'm trying to do.