|
-
Apr 29th, 2002, 12:43 AM
#1
Thread Starter
PowerPoster
Move a Command Button in Frame
Ok I have a Command Button which will move a Frame to the side of the form, so it gets out of the way of the user. I've placed a Command Button in the top right hand corner of the Frame to do this.
Whats the code so that when I have the Frame hidden, I can move the Command Button to the left side of the Frame?
At the moment I'm hiding the Frame by doing,
Frame1.Left = Frame1.Left + Frame1.Width - 200
The 200 is so that there is room for the command button.
Its going to be something really simple, but I just can't figure out what........
-
Apr 29th, 2002, 12:51 AM
#2
If you want to 'hide' it then why not just use Frame1.Visible=false?
-
Apr 29th, 2002, 12:54 AM
#3
If the command button is on the frame it will be hidden when the frame is hidden. If this is a different command button then do
VB Code:
cboCommandButton.left = me.left ' This will set it the forms left border
'to hide the frame
frame1.visible = false
I don't think I understand what you are trying to do...
-
Apr 29th, 2002, 12:54 AM
#4
Thread Starter
PowerPoster
Well I just want it off the form. Its on the right hand edge, so, add the forms width to its .Left and then minus the width of the command button.
Ok got it.
As I said, pretty simple.
Frame1.Left = Frame1.Left + Frame1.Width - Command1.Width
Command1.Left = Command1.Left - 1100
-
Apr 29th, 2002, 01:02 AM
#5
Thread Starter
PowerPoster
Ok, heres another question.
The Command Button's Captions are "<" and ">"
The problem is, when its clicked, it gets a line around it, which makes the caption hard to read, as the command button is about the size of the character "<"
How can I get rid of the border thing
Is Setting the Focus to something else the best way???
-
Apr 29th, 2002, 01:14 AM
#6
You can make the button a little bigger or use a picturebox instead, thats the easiest anyway.
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
|