Solved

How to change the location of Listbox using code

Posted on 2008-10-09
4
910 Views
Last Modified: 2012-05-05
i am using datagrid and when i click in first row 3 column it shld show the list box in its original position and for next time in next line in same column it shld show in different location like it shld x-axis by 1 and y axis by 20.so can u plz help me
0
Comment
Question by:mahmood66
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 

Author Comment

by:mahmood66
ID: 22677763
i want add the x axis and y-axis
0
 
LVL 11

Expert Comment

by:ladarling
ID: 22678112
This example will move the listbox 10 pixels down, 20 pixels right.

Dim p As Point = ListBox1.Location
p.X += 10
p.X += 20
ListBox1.Location = p
0
 
LVL 11

Accepted Solution

by:
ladarling earned 300 total points
ID: 22678128
Sorry, got that backward (and left off the Y...lol) Should look like:

Dim p As Point = ListBox1.Location
p.X += 10
p.Y += 20
ListBox1.Location = p
0
 

Author Closing Comment

by:mahmood66
ID: 31504612
thx a lot
0

Featured Post

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Visual Studio hangs on running project 6 84
VBA: copy range dynamically based on config sheet v3 6 54
GUID's in SQL Server 4 31
.NET Redemption/Outlook Examples 3 34
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
When we want to run, execute or repeat a statement multiple times, a loop is necessary. This article covers the two types of loops in Python: the while loop and the for loop.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

751 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