Solved

VB.Net move the button in a form

Posted on 2013-05-30
9
476 Views
Last Modified: 2013-06-14
hi, I am design a restaurant system, now I need a Form to show all the table in the room, and need to move the table to the right position.
I am planing create 50 buttons, set the button visible as QTY request, then change each button's position . but how can I make all the button is movable and remember the position?

I am using Visual studio 2010. VB.net

thanks
0
Comment
Question by:irietek
  • 5
  • 4
9 Comments
 
LVL 35

Expert Comment

by:Robert Schutt
ID: 39210208
This seemed rather interesting to me, so I created a project for it and put it on ee-stuff.com, hope this is what you wanted: https://filedb.experts-exchange.com/incoming/ee-stuff/8309-EE_Q_28143113.ZIP

Note that this is far from complete but it has a couple of nice features already like rotate the 'active' table (press space).

For the actual dragging I used some excellent code from another forum (credit in source).
0
 
LVL 35

Accepted Solution

by:
Robert Schutt earned 500 total points
ID: 39210217
Alternative download link: http://schutt.nl/ee/Q_28143113/EE_Q_28143113.ZIP

Just for reference, this is how it should look if you press Control-L after running the project:
capture
0
 

Author Comment

by:irietek
ID: 39210822
WOW, you are so amazing!!!
0
 

Author Closing Comment

by:irietek
ID: 39210823
very helpful
0
Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:irietek
ID: 39210832
but if I need to select a table to place an order, how can I do it then?
0
 
LVL 35

Expert Comment

by:Robert Schutt
ID: 39210922
Glad you liked it!

Well that depends a lot on how it will be used. You could for example make a hidden text field that shows a related remark/order info and set the info visible/fill the text when a table is clicked, for example in the 'MouseUp' event handler. You know which Control was clicked (check the .Text property) so you can relate this to information from an array or database table.

To give more specific help I would need some more info on what else you want to add or are already using.
0
 
LVL 35

Expert Comment

by:Robert Schutt
ID: 39213102
Not sure if that's the way you wanna go but I made a new version with a text box and also fixed some bugs: http://schutt.nl/ee/Q_28143113/EE_Q_28143113_v2.ZIP
0
 

Author Comment

by:irietek
ID: 39248672
Dear Robert

thanks a lot!! I have tested your code and found a strange thing, if at the beginning I have move the button I create ,after I save and load again, it will show this table's name on the textbox, all other I didn't move at all, it won't show the name on the textbox
0
 
LVL 35

Expert Comment

by:Robert Schutt
ID: 39249500
I just tried but can't reproduce the problem. Can you inspect the saved file for problems, or post it? You could try debugging, put a breakpoint in Sub DoLoadPos() for example, does the arrData() array contain the right info?
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Visual Studio installation 5 39
Spacing between controls 4 17
Copy/Clone an object. 9 18
Open a word document 23 19
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now