|
-
May 1st, 2007, 04:39 PM
#1
Thread Starter
Fanatic Member
[RESOLVED] [2005] Is this possible
Heya guys
I have a BIG question for you all. i know that if its possible to do there will be someone in here that will know how to do it.
Basically there are two things which i am tryin to do.
1. When a button is clicked i want a datagridview to reduce in height and stuff displayed. i realise that this can be done by just changing the height however i would quite like it to visably scroll up.
2. I would like something (a calander) to appear when you click a button but have it infront of other things almost hovers and then when a date is double clicked the calander closes.
Is any of this possible
I look forward to you replys
Frosty
Last edited by frosty16; May 1st, 2007 at 04:58 PM.
-
May 1st, 2007, 05:11 PM
#2
Re: [2005] Is this possible
1) Change the height inside of a loop, decrementing it by a set value on each iteration.
2) You mean like the Date Time Picker? Or the Calendar control?
-tg
-
May 1st, 2007, 05:13 PM
#3
Thread Starter
Fanatic Member
Re: [2005] Is this possible
i mean the calendar control.
basically i want a calendar like that in the calendar control
-
May 1st, 2007, 05:27 PM
#4
Thread Starter
Fanatic Member
Re: [2005] Is this possible
for the loop i hav used the following code:
Code:
Dim intHeight As Integer
Dim intEndHeight As Integer
intHeight = DataGridView1.Height
Do Until intEndHeight = 220
intHeight = intHeight - 5
DataGridView1.Height = intHeight
intEndHeight = intHeight
Loop
however it doesnt seem to stop at 220 it just keep going
what have i done wrong?
-
May 1st, 2007, 05:41 PM
#5
Re: [2005] Is this possible
Your intEndHeight will never equals 220, because with each iteration, you decrease the intHeight and set intEndHeight = intHeight...
Actually, you don't need intEndHeight at all. Just do it like this
Code:
Dim intHeight As Integer = DataGridView1.Height
Do Until intHeight >= 220
intHeight = intHeight - 5
DataGridView1.Height = intHeight
Loop
-
May 1st, 2007, 06:09 PM
#6
Thread Starter
Fanatic Member
Re: [2005] Is this possible
brilliant that works, well it does if you change the '>' to a '<'.
so can anyone help me with the second problem?
-
May 1st, 2007, 06:36 PM
#7
Re: [2005] Is this possible
If you want the calendar control, why not just use it? Make a form that has nothing else on it, and show that as needed.
My usual boring signature: Nothing
 
-
May 1st, 2007, 06:39 PM
#8
Thread Starter
Fanatic Member
Re: [2005] Is this possible
i thought about that however i thought that someone might know how to do it.
if knowone does then i will do it that way
-
May 1st, 2007, 06:44 PM
#9
Addicted Member
Re: [2005] Is this possible
 Originally Posted by frosty16
i thought about that however i thought that someone might know how to do it.
if knowone does then i will do it that way
wouldn't the "Month Calender" control work just fine... use the button to "Show" and "Hide" it?
-
May 1st, 2007, 06:47 PM
#10
Thread Starter
Fanatic Member
Re: [2005] Is this possible
the show hide feature on the calander would work however i need it to be on top ov everything is that is the case i am having troubles with
-
May 1st, 2007, 07:13 PM
#11
Addicted Member
Re: [2005] Is this possible
 Originally Posted by frosty16
the show hide feature on the calander would work however i need it to be on top ov everything is that is the case i am having troubles with
On top... hmm... too bad there isn't a "topmost" property for the calanders... (not sarcasm...).
I don't see why you would have troubles keeping it on top... maybe you could post your what you have so far on here?
-
May 2nd, 2007, 08:34 AM
#12
Thread Starter
Fanatic Member
Re: [2005] Is this possible
so far what i have is:
Code:
Private Sub cmdCalendar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdContactSave.Click
Calendar.visable= true
End Class
that displayes the calendar however is it no on top of everything else
also is the a double click event for a calendar i.e double clicking the date
-
May 2nd, 2007, 09:52 AM
#13
Re: [2005] Is this possible
Put the calendar in its own form. Then do a showdialog of that form. That way they cannot go back to the other form until they are done on the calendar form.
-
May 2nd, 2007, 01:38 PM
#14
Re: [2005] Is this possible
 Originally Posted by Negative0
Put the calendar in its own form. Then do a showdialog of that form. That way they cannot go back to the other form until they are done on the calendar form.
That's what I was saying. Why try to reinvent the wheel? You can make a form behave the way you want it to, and the control can fill the form. The only thing that matters is what the user thinks is going on, not what is really happening, so this workaround should be manageable.
My usual boring signature: Nothing
 
-
May 2nd, 2007, 02:21 PM
#15
Re: [2005] Is this possible
 Originally Posted by Shaggy Hiker
That's what I was saying. Why try to reinvent the wheel? You can make a form behave the way you want it to, and the control can fill the form. The only thing that matters is what the user thinks is going on, not what is really happening, so this workaround should be manageable.
I was agreeing with you Shaggy, I probably should have stated that.
-
May 2nd, 2007, 04:41 PM
#16
Thread Starter
Fanatic Member
Re: [2005] Is this possible
what i didnt realise uptill today was that you could remove the frame from the form which is what i was hoping you could do however i didnt realise that it was possible to do
thank you all and sorry for being a pain
-
May 2nd, 2007, 05:17 PM
#17
Re: [RESOLVED] [2005] Is this possible
Don't worry about that. It was actually an interesting discussion about means of accomplishing a design task. You can get where you want to go, but sometimes it takes some odd thinking to get there.
My usual boring signature: Nothing
 
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
|