|
-
Feb 5th, 2002, 04:47 PM
#1
Thread Starter
New Member
Form location and list boxes
Hey people, hate to sound like an idiot but i'm a VB newb! Anyhow, I have a form of a set size which I would like to position on the right side of the screen. Which property can I use to set the startup position of the form, or is there any code where I can set its coordinates without resizing it?
Also, I have a list box containing all the windows default fonts. I want the user to be able to click on the font, then click on a command button I have to select it. How do I manipulate the individual items in a list box? Thanks in advance for answers to both questions!
__________________________
- Irish Guitarist
"Before you criticize someone, walk a mile in their shoes. That way, when you criticize them you're a mile away and you have their shoes."
-
Feb 5th, 2002, 05:24 PM
#2
Frenzied Member
put this is form_activate:
VB Code:
me.left = screen.width - me.width
me.top=0
that will put the current form in the top right.
-
Feb 5th, 2002, 05:27 PM
#3
PowerPoster
To retrieve an item from a ListBox, the code is something like
List1.ListItem(i)
What do you mean by 'manipulate the individual items'?
-----------------------------------------
-RJ
[email protected]
-----------------------------------------
-
Feb 6th, 2002, 11:24 AM
#4
Thread Starter
New Member
I have a list box with a bunch of items in it. I'm trying to make it so that when you click on an item in a list, the text appears in a text box. Thanks!
__________________________
- Irish Guitarist
"Before you criticize someone, walk a mile in their shoes. That way, when you criticize them you're a mile away and you have their shoes."
-
Feb 6th, 2002, 05:02 PM
#5
PowerPoster
Code:
Private Sub List1_Click()
Text1.Text = List1.List(List1.ListIndex)
End Sub
That'll do it.
-----------------------------------------
-RJ
[email protected]
-----------------------------------------
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|