VS 2008 Form Moving?
Feb 10, 2010I have this code
vb
Public Class Form1
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs)
[code].....
I have this code
vb
Public Class Form1
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs)
[code].....
I already got the move part, that's easy, what I'm having trouble with is when I click on the form and try to move it, it shifts a little, that is really annoying, I just want it to be smooth. I want it to be as if I'm moving the form from the title bar. [Code]
View 9 RepliesI want to move a viriable content from one form to the other . and like wise. Lets see now here is the startup form.
Public Class startup
ok as you can see am making a public shared variable to get the name from the textbox and put it in the var, thats easy already done , now the problem I can't get it to be moved to the other form. (Below the 1st code is the code I use to get the outcome from form1 to form2).
Public Shared playername As String
Private Sub startup_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
[Code] .....
Is there any way I can move a form in the center of the screen ? I am talking about run time for a form that is already shown . I need this because some times this form may become larger or smaller during run time and I'd like it to be moved in the center of the screen in order to look better . Back in VB6 I used to show again the form (despite being already shown) by MyForm.Show , which resulted i the form being moved to the center , but now it seems this doesn't work anymore ...
View 7 Repliestrying to move a lineshape (line), across or down my form, but not having any luck with it, I think it is something like this, (but it not quite right)
LineShape1.X1 & LineShape1.X2 = val (HScrollBar1.Value)
The following code works perfectly to allow moving a control on a form at run-time. However, when AutoScroll is set to True on Form1, and you drag Button1 past the right and/or bottom bounds of the form, it goes haywire. I really need someway to smoothing control the autoscroll so that as you scroll the control off the form, the scrollbars smoothly appear.
[Code]...
I tried it every way I can think off, but nothing can stop it .
View 7 RepliesHow can I update and get values in a Windows Forms application while moving one form to other form (like cookies)?
I need to update the values to some variable and again I am going to refer stored values and need to do some calculations.
I have used cookies in ASP.NET but I am not able to find out the same concept in .NET Windows Forms (C#).
How can these issues be resolves?
simple problem Basically in form1 i have a line of SQL code in a rich text box called rtb_select
what i would like..This code to run under a connection string called strSQLSelectQuery in form2
I have been told someting like strSQLselectQuery = rtb_select.text would work however because rtb_select is in a different form in the same project it does not recognise rtb_Select
I was trying to do a label that will slide from left to right of a web form in vb. I search on the web it only have example that work for windows application form.. I wanted it to be done in web form..
View 2 RepliesTaking the following code into the account: [code] This makes my entire form client area act like a cpation bar and i can darg it using any any part of it! Becuase i had a borderless form that is why i used this code (which is definitely not mine - no offense) . This works perfect in windows 7 but in lower OS versions it acts weired like even if user makes little dragging on the form occasionally this triggers and takes the form out of the bound of screen! I was wondering can i alter the above code somewhat like instead of intercepting the form area as caption bar it detects a panel (docked at the top giving illusion of a caption bar) and make that my form move. I know you brothers will make me say that using the mouse down mouse move and mouse up events of panel i can attain this, definitely i can but thought of some more professional approach. url...
View 4 Replies(Visual Basic .NET 2003) I am trying to move a picturebox up and then down on my form. The Picturebox moves up but does not move down. The motion is more of a bouncing motion (to the left) until it disappears off the screen. I have one button and one timer. I know this is probably so simple, but I cannot resolve the problem
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Timer1.Enabled = True
End Sub
[CODE]...
The purpose of this (maybe there is a better method I don't know) is to so the user can say what order they want pieces of code to be compiled in. Sort of like a flow-chart. I want it somewhat animated, so, example being 3D circles the user drags and drops in the order they want things.
1. I need 4 circles inside of a form.
2. I need it so when the user selects the circle, they can drag and drop it in an order.
3. User clicks OK to finish their chosen order.
I haven't designed anything before that needed to check the borders of the form etc.
i want to ask that i want the code for moving the data from one form to anothe form in VB when i click on delete button.means some of the data from form1 which i want store in another form after deleting it.
View 7 RepliesI was putted an image on the form (and filled) How to move form with click to image?
View 2 RepliesI'm developing a VB.net windows form app in Visual Studio 2010. I want to be able to drag the form to another location or minimize it while the app is running. Is that possible? Here's and example. I have a form with 1 button. Here's the code associated with the button:
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
Dim time0 As Integer
Dim time1 As Integer
For time0 = 0 To 1000000000
time1 = time0
Next
End Sub
I can move the form or minimize it until I push the button. Then it freezes until the code stops running.
I am using the software called Visual Studio 2008 Express Edition. I've created this calculator on my own, and the past hour I've been messing with the design. Right now I am wondering how I can move the form around, with the FormBorderStyle set to none (no borders (means no exit button, minimize etc. I made those myself )
What I'm looking for is that I should be able to press anywhere on a place that isn't used (black place) and drag it around. I forgot to mention another issue that I have. The textbox on the calculator accepts any signs and letters, how can I make it so it just accepts numbers?
how do i "drag and drop a picturebox" on a form drag and drop is used in vb.net for moving a picture by mousedown
View 11 RepliesOkay, so just wondering, if its possible. I Have a picturebox (PictureBox1) and just wondering if I dragged the picturebox how could i drag the form?
View 5 RepliesI am trying to learn how to use Thread.Sleep properly as the main problem I am facing when using it is the fact that the window/form on run time would not move until after the sleep time has elapsed. Did I miss something? Below is a short example of what I want to achieve.
[Code]...
I am trying to create some simple animation using GDI+ graphics. The scene takes place in outer space, I want to run comets across the form. My problem is getting the comets once they leave the form to reappear on the other side. I can do it horizontally, the code for that is below. I can't figure out how to get a comet to leave the bottom of the form and reappear at the top. Anyone have any advice or knowledge on this?
Private Sub CometTimer_Tick(ByVal sender As Object, ByVal e As System.EventArgs) Handles CometTimer.Tick
'Declare variables.
[code].....
So i have a "game", and the login screen for the game is built into a panel. When you click the load button the panel shows up inside the form, and you are able to type in your username and password. what i am trying to do is make it so the user is able to drag that login panel anywhere inside the game form; just to make it a bit more advanced then just a fixed spot.
View 5 RepliesI'm making a small program in which i want to move labels from one position to another , I used the following statementLabel1.Location.Y = 10 ' Error - Expression is a value and cannot be the target of an assignment
View 3 RepliesI'd like to keep all my SQL data related code in a separate class and only have UI related code in my main form. However, the TableAdapters are automatically placed on the main form and, of course, the auto-generated code placed in the Form_Load event.
Obviously, it's easier to keep it like that but is it possible to move them to a different class?
How do I prevent a child form from moving down and across each time it is opened? I want it to always open in the extreme top left.
View 3 RepliesI have the following settings:
ControlBox : False
WindowState: Maximized
Because I want the user to have a full screen application that they cannot close without using my Exit menu. The problem is, they can simply grab the title bar of the form and drag it, exposing the desktop!
Basically ive a picturebox which ive coded to move around the form, however I can move it off/under the form if i want to if i move it that far. I want it to stop on the edge of the four sides of the form if i move it that far. Basically I want to make sure that when moving the picturebox around, it never goes off the form and stops on the edge of the form if i move it that far.
I'm guessing it's to do with the position command but i cannot quite work it out.
Ok my form is titlebarless but i want the user to be able to click and drag it to whereever on screen. i found this in VB6 can anyone convert it or do you have another solution??
Private Declare Function SendMessage Lib "User32" _
Alias "SendMessageA" (ByVal hWnd As Long, _
ByVal wMsg As Long, _
[Code].....
Problem: My datagridview is moving from a tabcontrol onto the main form when I execute the below code. I desire it to stay in the original position. Details:
1) I created a MAIN datagridview1 for my master on tab 2 (OK) - this is for editing, deleting etc.
2) I created datagridview3 on tab 1 for implementing 2 textbox filters (OK)
3) The actual filter code fires on changing of values in two text boxes
The above works perfect except when the code below is executed, datagridview3 moves from tab1 of my tabcontrol to my main form. How do I keep it from moving (desired) or at the least move it back to control tab 1?
[Code]...
I've got a form with no borders, and I am wondering how a user would be able to move this form around. I would like it to be moved the same way a form would move by left-clicking and holding the top border. I know that's a little vague, so if you need any more info feel free to ask...
View 1 Replies