10 Replies - 742 Views - Last Post: 27 January 2013 - 10:15 AM Rate Topic: -----

#1 Brilene  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 9
  • Joined: 25-January 13

Move TextBox on Form

Posted 25 January 2013 - 11:59 AM

I had vb.net on my Computer and it crashed. I could put the focus on any control and using the arrow keys i could move the control anywhere on the form. Now it does not work.
Is This A Good Question/Topic? 0
  • +

Replies To: Move TextBox on Form

#2 rusoaica  Icon User is online

  • They're watching you, Neo!
  • member icon

Reputation: 140
  • View blog
  • Posts: 516
  • Joined: 10-March 12

Re: Move TextBox on Form

Posted 25 January 2013 - 12:02 PM

and what are you trying to achieve? re-create that code? do you still have a sample of that code?
Was This Post Helpful? 0
  • +
  • -

#3 CharlieMay  Icon User is offline

  • This space intentionally left blank
  • member icon

Reputation: 1605
  • View blog
  • Posts: 5,162
  • Joined: 25-September 09

Re: Move TextBox on Form

Posted 25 January 2013 - 12:14 PM

By default, if you're talking about in the Form designer, the arrow keys are used for moving the controls. The arrow keys alone nudge the control in the direction of the arrow. With the Alt key held down, it will move the controls to an alignment of the grid and with the shift keys, it will allow you to grow and shrink sizeable controls.

This WILL NOT happen in a running form, only in the design phase. You would have to write code to make something like this happen on your running program.
Was This Post Helpful? 0
  • +
  • -

#4 andrewsw  Icon User is online

  • It's just been revoked!
  • member icon

Reputation: 3608
  • View blog
  • Posts: 12,399
  • Joined: 12-December 12

Re: Move TextBox on Form

Posted 25 January 2013 - 12:28 PM

..holding Ctrl causes the control to jump to different corners; I suppose technically it's jumping to Anchor points(?). Not particularly useful :whistling:
Was This Post Helpful? 0
  • +
  • -

#5 CharlieMay  Icon User is offline

  • This space intentionally left blank
  • member icon

Reputation: 1605
  • View blog
  • Posts: 5,162
  • Joined: 25-September 09

Re: Move TextBox on Form

Posted 25 January 2013 - 12:44 PM

Agreed, and you're right, I should have listed CTRL where I used ALT, I don't see ALT doing anything. But I tend to not use the arrow keys to design with the exception of nudging and even that is very rare with the snap features that are built in to moving the controls around. I find it easier to drag it to where I want it with the mouse.
Was This Post Helpful? 0
  • +
  • -

#6 lar3ry  Icon User is offline

  • Coding Geezer
  • member icon

Reputation: 310
  • View blog
  • Posts: 1,290
  • Joined: 12-September 12

Re: Move TextBox on Form

Posted 25 January 2013 - 12:47 PM

View Postandrewsw, on 25 January 2013 - 01:28 PM, said:

..holding Ctrl causes the control to jump to different corners; I suppose technically it's jumping to Anchor points(?). Not particularly useful :whistling:/>

In mine (Visual Studio 2010), the Alt key doesn't modify the action, but Ctrl does. It causes the control to jump to alignment points, aligning with various alignments on other controls, or if none are there, to places a small distance from the edge of the form.

I think the OP should probably re-install Visual Studio.
Was This Post Helpful? 0
  • +
  • -

#7 andrewsw  Icon User is online

  • It's just been revoked!
  • member icon

Reputation: 3608
  • View blog
  • Posts: 12,399
  • Joined: 12-December 12

Re: Move TextBox on Form

Posted 25 January 2013 - 12:55 PM

I often use Ctrl-drag to copy a control (or controls) but it seems we can't do this to drag/copy across forms(?).

[In Excel Ctrl-Alt-Shift, drag can copy and insert a range between worksheets :) but it requires a (very) steady hand!]

This post has been edited by andrewsw: 25 January 2013 - 12:59 PM

Was This Post Helpful? 1
  • +
  • -

#8 CharlieMay  Icon User is offline

  • This space intentionally left blank
  • member icon

Reputation: 1605
  • View blog
  • Posts: 5,162
  • Joined: 25-September 09

Re: Move TextBox on Form

Posted 25 January 2013 - 01:26 PM

View Postandrewsw, on 25 January 2013 - 02:55 PM, said:

I often use Ctrl-drag to copy a control (or controls) but it seems we can't do this to drag/copy across forms(?).

Definitely, you can also do that with code. (hilight and CTRL-Drag to drop a duplicate) Then make your changes. Saves a lot of typing.
That along with the ALT-Column Select makes editing easier :)/>/>/>

Actually, you can do this across forms. pull the tab out of the tab row so that it's a separate window. Grab the control from the 1st form with CTRL move it to the new form, drag the tab back to the tab row.
EDIT: I should mention, you need to be able to see a part of the form you're dragging to, the panel that holds the form won't bring it to the foreground. But as long as you move over the actual form, it will pop to the front allowing you to release the copied conrol.

This post has been edited by CharlieMay: 25 January 2013 - 01:32 PM

Was This Post Helpful? 2
  • +
  • -

#9 andrewsw  Icon User is online

  • It's just been revoked!
  • member icon

Reputation: 3608
  • View blog
  • Posts: 12,399
  • Joined: 12-December 12

Re: Move TextBox on Form

Posted 25 January 2013 - 01:38 PM

@CharlieMay Thank you.
Was This Post Helpful? 0
  • +
  • -

#10 lar3ry  Icon User is offline

  • Coding Geezer
  • member icon

Reputation: 310
  • View blog
  • Posts: 1,290
  • Joined: 12-September 12

Re: Move TextBox on Form

Posted 27 January 2013 - 10:06 AM

Great tips on the Ctrl-Drag! I have always just selected a control, then copied and pasted. MUCH nicer to drag and drop a copy!

Thanks, guys!
Was This Post Helpful? 0
  • +
  • -

#11 andrewsw  Icon User is online

  • It's just been revoked!
  • member icon

Reputation: 3608
  • View blog
  • Posts: 12,399
  • Joined: 12-December 12

Re: Move TextBox on Form

Posted 27 January 2013 - 10:15 AM

If we hold Ctrl (again!) and drag a control to the General tab at the bottom it will copy the control (dragging will just move it). We can even create our own tabs by right-clicking the Toolbox, Add Tab :)

If we select a container and double-click a control in the toolbox it will be inserted into the container.

That's all folks!!
Was This Post Helpful? 1
  • +
  • -

Page 1 of 1