|
-
Oct 30th, 2000, 08:16 PM
#1
Thread Starter
New Member
iv'e recently come accross a minor hurdle in a fairly large application in which the deadline for the testing phase in nearing....anyway, the problem.. the ever buggy datetime picker control has no locked property, to many pitfalls in trying to capture keystrokes considering all of the users are keyboard guru's. Does anyone know of a better way in locking the datetime picker? (subclassing??) Seems like a fairly fundamental question yet im stumped... Another issue with same question being the ever so common listbox, another control in which there is no locked property.. oh ya, and if you reply with "just disable it" that wont do.. I need a disabled "scrollable" listbox, disabling completely hinders the control of any user interaction... thanks in advance..
-
Oct 30th, 2000, 09:15 PM
#2
Hyperactive Member
Feed me please
hello,
What do you want the DTPicker for in your app?
To show a date or to limit the date in a range to pick?
Saludos...
"Who Dares Wins" - "Quien se Arriesga Gana"
Mail me at: 
-
Oct 31st, 2000, 07:30 AM
#3
Thread Starter
New Member
For choosing a date. For instance Date Of Birth: <dtpicker>. I then send the value to a sql backend, i have to use a dtpicker as per users requests...
-
Oct 31st, 2000, 08:31 AM
#4
If I understand you correctly you don't want the user to be able to use the keyboard to change a date or time in the DTPicker but still be able to use the dropdown or the updown buttons.
Is this correct? In that case simply add the following code line in the KeyDown event:
Code:
Private Sub DTPicker1_KeyDown(KeyCode As Integer, Shift As Integer)
KeyCode = 0
End Sub
Best regards
-
Oct 31st, 2000, 08:35 AM
#5
Thread Starter
New Member
Yes, i do not want the user to change it with the keyboard or the mouse, and prevent the date time picker from dropping down. Pretty much acting like it is locked.
Thanks for your response
-
Oct 31st, 2000, 09:08 AM
#6
Well in that case you have two choises.
Either simply set the Enabled property to False.
If you don't like that put the DTPicker in a borderless picture box that is sized to the same size as the DTPicker and the set the Enabled property for the PictureBox to false.
Best regards
-
Oct 31st, 2000, 09:28 AM
#7
Thread Starter
New Member
Ahh, good thinking. I completely forgot about the old use a container trick. That works great! thanks again
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
|