|
What happened when you set the MinDate to the first day of the chosen month, and MaxDate to the last day of that same month? Can you still change the DateTimePicker to a date outside that month?
My advice is free, and you may get what you paid for.
|
|
|
|
|
In this case how do i find what will be the last date for the month??
|
|
|
|
|
You can use the possibilities of Date:
<br />
Dim MaximumDate As Date<br />
Dim MinimumDate as Date<br />
Dim ChosenYear As Integer = 2007 'or the year chosen by the user<br />
Dim ChosenMonth As Integer = ComboBox1.SelectedValue<br />
MinimumDate = ChosenYear & "/" & ChosenMonth & "/1"<br />
MaximumDate = ChosenYear & "/" & ChosenMonth & "/" & Date.DaysInMonth(MinimumDate.Year, MinimumDate.Month)<br />
Try it.
My advice is free, and you may get what you paid for.
|
|
|
|
|
Hi,
I could tell you that Smart FieldPackEditor.Net allows you to set individual fields as readonly (well, I said it, sorry for the plug), however, why do you make it so difficult for the user to select a birth date ? Why not a single DateTimePicker ? Or if for a reason I ignore you absolutely need comboboxes, why not 3 comboboxes ? If the users acts on the 2 comboboxes, then he has to edit the DateTimePicker, he will feel like he can change the month and year in the dtp until he actually tries it and see no modification... Think usability first.
|
|
|
|
|
Hai,
Can u give me idea to do certification in dot net like MCP. I am well in VB.Net & ASP.Net with sql. Pls refer me which help to seek jobs.
If it can done in online it is good for me??????????
Senthil S
Software Engineer
|
|
|
|
|
Senthil S wrote: If it can done in online it is good for me??????????
MCPs must be completed at authorised test centres.
Senthil S wrote: Pls refer me which help to seek jobs.
The ones that relate to the job you are going for. It would be stupid to get an MCP in Windows Server 2003 administration if you want to write software.
|
|
|
|
|
|
hi frnd,
better to do MCTS and MCPD just collect the information of MCTS and MCPD from internet
best luck
regards,
koolprasad2003
If the message is useful for U then please Rate This message...
Be a good listener...Because Opprtunity knoughts softly...N-Joy
|
|
|
|
|
Hi Friends,
I need to bind a picture to a picture box control at run time in Vb.net.
How to do..?
someone help in this regard as early as possible..
Regards,
Balagurunathan S
Balaguru
|
|
|
|
|
Hello,
You can use the following code to bind the picture in an Picture box on a button click.
<br />
Dim fod As New OpenFileDialog<br />
fod.Filter = "JPG|*.jpg|BMP|*.bmp|All Files|*.*"<br />
Dim dr As DialogResult<br />
dr = fod.ShowDialog()<br />
If dr = Windows.Forms.DialogResult.OK Then<br />
<br />
PictureBox1.SizeMode = PictureBoxSizeMode.StretchImage<br />
PictureBox1.Load(fod.FileName)<br />
<br />
End If<br />
If you have path of the picture in a string variable, you can pass the file name to the Load()
method of the PictureBox.
I hope this helps.
Regards,
Allen
Allen Smith
Software Engineer
ComponentOne LLC
www.componentone.com
|
|
|
|
|
Thanks Allen..
I got it..
Regards,
Balagurunathan S
Balaguru
|
|
|
|
|
How can i set day notes in calender using vb.net.which control i want to use.
|
|
|
|
|
A MonthCalendar control maybe?? Its in the ToolBox under the "All Windows Forms" tab.
As for typing in notes, you'll have to provide that functionality, plus some way to save the notes and associate them with a date/time.
|
|
|
|
|
Hi guys and ladies,
I created a custom control "ExtendedButton" that "Inherits System.Windows.Forms.Button", because I need to apply a rotation to this object.
I'm trying to use the overridable "OnPaint" sub but I cannot apply this rotation to the object, that's because I'm quite a newbie in VB.NET
My question is: anyone could me give some hints about adding rotation to an object like a BUTTON? Where I must look for info, exactly (do not answer me on MSDN, I know)? I don't wanna spend my youth in reading that brick-book ... if someone could give me a step-by-step procedure on what methods override and where to find them, it will be enough.
Thanks
---
die
|
|
|
|
|
Inheriting from Button isn't going to let you do this. The Button class will accept a click anywhere in the box that contains the image you draw.
You're going to have to implement this thing from scratch, to include all the properties to support how you want the button to be draw, including rotation, font size, text, alignment, ... You're also going to have to write all the drawing code, including rotation, and all the hit test code to test for mouse hovering over the button and click on the button image itself.
No matter what rotation you pick for the button, the control's drawing surface is always going to be an orthogonal (?) rectangle.
+----drawing surface----+
| /\ |
| / \ |
| / \ |
| Button / \ |
| image / \ |
| / \ |
| \ / |
| \ / |
| \ / |
| \ / |
| \ / |
| \/ |
+-----------------------+
diebugger wrote: Where I must look for info, exactly (do not answer me on MSDN, I know)? I don't wanna spend my youth in reading that brick-book
You'll be spending that month doing it anyway. You have to understand controls very well, hit testing, GDI+ drawing, and have good planning skills.
diebugger wrote: if someone could give me a step-by-step procedure on what methods override and where to find them, it will be enough.
No, it's not enough. You're basically writing an entire control from scratch. There is no step-by-step procedure. This is going to take a LOT of work and is not something that can be described in a few forum posts.
|
|
|
|
|
Thank you very much, Dave.
---
die
|
|
|
|
|
Hi... sorry for posting it here.
If IsNull(c_SignedEmployee) = False Then<br />
dtpEmployeeSigned.Value = c_SignedEmployee.Value<br />
Else<br />
dtpEmployeeSigned.Value = DateTime.Now<br />
End If
this is a code snippet i a using...
NOW
when i try to do the same with a new column it does not show up (Like with the c_SignedEmployee it shows up if you hit Ctrl+Space)
It doesn't seem to be picking it up???
What to do?
"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison
|
|
|
|
|
Never mind... It is working now
Dont ask me what i did... i have no idea.
It seems that if you wait long enough... it will eventually pick up the new column in the table and you are able to work with it then.
Funny that.
"Many of life's failures are people who did not realize how close they were to success when they gave up." Thomas A. Edison
|
|
|
|
|
Hi...
i am using VB 2005 for a project.
I have a panel which is having two images... On the load of image if they are bigger then the panel the scroll bar appears... This is working fine, but when i try to move the scroll bar (Only vertical in my case) by mouse “wheel scroll” it dose now works
Can please some one help me
Regards
Nishkarsh
|
|
|
|
|
hi
create a new class and implements/inherit a label.
in the new class override the OnMouseWheel methode.
regards
|
|
|
|
|
Hi JoeSharp
thanks for the suggestion
i am not that great in OOPS way... can you please send me a sample code
|
|
|
|
|
hi
a little example
Public Class MyControl
Inherits System.Windows.Forms.UserControl
Protected Overrides Sub OnMouseWheel(ByVal e As System.Windows.Forms.MouseEventArgs)
If e.Delta <> 0 Then 'has wheel been moved?
'The .NET docs suggest that e.Delta returns the actual number of notches
'the mouse wheel has been rotated, but in actuality each roll of the mouse wheel
'returns a value of +/- 120 (depending on the direction of rotation).
'120 is actually a system constant, and therefore there is a possibility that it could
'change to allow for higher-resolution mouse wheels.
'check out <http: msdn.microsoft.com="" library="" en-us="" winui="" windowsuserinterface="" userinput="" mouseinput="" mouseinputreference="" mouseinputmessages="" wm_mousewheel.asp="">
'for more information
Dim zoomIn As Boolean = (e.Delta < 0)
End Sub
Protected Overrides Sub OnPaint(ByVal e As PaintEventArgs)
' Overriden Paint Methode
' Do your paint stuff in this methode, such as draw images or draw text
End Sub
End Class
regards
|
|
|
|
|
hi friends,
i have a win application , i want to block installtion of the same application from next time, (ie, if i uninstalled first & try to install the same application again, dont allow it to install). Also , i want to do the same for both Vb.net and Vb6 application..
Need help fast...
cheers..
|
|
|
|
|
Your best bet is to leave a file behind on uninstall which tells your app not to run, but I don't see how you can stop it installing.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
thanks to reply,
yes, i need to stop the installation from second time, i made a exe that will create a txt file in program files, if that file is there, then dont allow to install, but how can i execute that exe & how can i stop installation
cheers,,
|
|
|
|