|
Buy Dragon Naturally Speaking. Ponder why they'd create a whole product to do this, if it was so easy people could be told how to write it in a forum reply.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
If you want text to speech, then the System.Speech namespace should help. Try this article[^] for more information. However, this only works on version 3.0 of the .Net Framework and above. Otherwise, you'll need to use COM
|
|
|
|
|
hi...
I am entry level prog in vb.net..
Every day I want to take back file..
For Example,
2day we enter some data's in access DB.This DB ill take backup..Likewise everyday take backup...But only stored particular day entry only...finally merge all datas for month end...
i dont have idea for tis....Plz give me solution...
thx in advance...
Regards
kannan.c
|
|
|
|
|
m4kannan wrote: I am entry level prog in vb.net..
This task is well and truly beyond you if you're 'entry level'. If you want this for yourself, buy something. If you're being paid to write it, admit to your boss or client that they picked the wrong guy. I can't imagine it's homework.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
pls. help me...
i am having headache doing this barcode....i dont have any idea on how to generate numbers or letters into a barcode like EAN 13, Codebar, Code 128 etc.... i saw some activeX but all of them are demo.... Can someone help me or send me a source code on how to generate barcode? thank you very much in advance...
by the way, you can send me the code at jerome.mercado26@yahoo.com
thanks again.
i can help you in some codes for begginers.
|
|
|
|
|
jeje0926 wrote: i saw some activeX but all of them are demo....
Yes, typically, if the CP article on barcodes doesn't help, you'll need to buy something.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi
why dont you use a barcode font?
google for code3of9 barcode font.....
install it in your control panel/fonts and use it.
try this http://www.advancemeants.com/code39font/download.htm
thanks and hope it helps
|
|
|
|
|
Hi,
I make on OCX control as Alarmctrl.ocx thriugh VisualBasic 6.0.
And i use the control in another VB applcaiton of same version in my same machine,I added in components.and when i draged it into the form,it tells the following error.
"License information for this Component not found.You do not have an appropriate license to use this functionality in drsign environment"
How can i avoid tht.
I saw the article from MSDN and follow it but not working.
Pls help me out.
My visulabasic version is
Microsoft VisualBasic 6.0(SP6)
For 32-bit Windows Development.
Anu
|
|
|
|
|
Easily fixed with a little help from Google[^].
|
|
|
|
|
Hi,
I have one directory eith files and i want to copy one filr from that directory to another. For that i used the following code but it doesn't work.
Import System.IO
Filecopy(sourcepath, destinationpath)
Please let me know, here additionally i need to add any code...
Thanks in advance
Regards,
Samson
|
|
|
|
|
Well, where did you get this syntax from ? File.Copy will work. Filecopy will not, for obvious reasons.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
This also showing error like Could not find the part of the path
With Regards,
Samson
|
|
|
|
|
I am not sure that File.Copy will create directories that do not exist. Otherwise, if your paths exist, it should work fine ( of course, assuming the dest file does not exist, if it does, you need to pass true as the third param )
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Hi,
i have a crystal report.it takes time to load.so i would like to show the user that it is loading
so that like to know how can I create a progress bar that will show the progress of a loading crystal report in vb.net?
the time of to display progerss bar just before report open when the report are open than the progres bar dosen't show please help
if have a source code so please give it please
|
|
|
|
|
Well, I answered this yesterday. You did not respond. Why are you asking it again ?
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Ya But I Can't Understand Please if u have Some Code to please give or in can i use thread ?
but in this application how to use that's also i don't know so please if possible to give me some example or code to do this'
please
thanks you...
|
|
|
|
|
Hi Guys
How can I databind CheckedListBox with a multi dimensional array so that, one array value can be used as DataMember and other to be the value Member for the CheckedListBox. I want to allow the user to select fields from a DataTable for exporting DATA to a TextFile. Since the Field names in the DataTable are not meaningful to the user. I want a more descriptive Field name to be displayed on the screen. When user selects the decriptive field name I want to use the physical Fld name associated with it for selecting and exporting appropriate data.
Please help.....
|
|
|
|
|
I think there's no way to do this with databinding, you need to write a loop and add the items yourself.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
|
Hello Everyone,
I need to send simple textual data on a serial port of a remote machine using VB.NET . I just need a Windows app. with A server and a client side s/w.
Please help me.
Fahad Siddiqui
|
|
|
|
|
Hmm, it will be very hard to help you as you didn't even ask a question.
But the most help I can give you right now is right here... Google[^]
The best way to accelerate a Macintosh is at 9.8m/sec² - Marcus Dolengo
|
|
|
|
|
(Using Visual Studio 2008)
I am trying to learn how to add functionality to the MonthCalendar control. I have looked at the C# example at this url http://www.codeproject.com/KB/selection/MonthCalendar.aspx[^]
However I am not a C# guy, and the custom control is a bit over kill.
Specifically, all I want to do is add the ability to set the color of a BoldedDate, either the forecolor or the back color. The C# example is nice, but it lacks the ability to have a 4x3 grid of calendars like the MonthCalendar has.
I have already created a Class with some code examples to add functionality for a double click event as follows:
Thanks
J
Public Class ExtendedMonthCalendar
Inherits MonthCalendar
Private m_LastClickPosition As Point
Private m_LastClickTime As Long
Private m_LastClickRaisedDoubleClick As Boolean
Public Shadows Event DoubleClick( _
ByVal sender As Object, _
ByVal e As EventArgs _
)
#Region "Events"
Protected Overrides Sub OnDoubleClick(ByVal e As EventArgs)
RaiseEvent DoubleClick(Me, e)
End Sub
Protected Overrides Sub OnMouseDown(ByVal e As MouseEventArgs)
If e.Button = MouseButtons.Left Then
If _
Not m_LastClickRaisedDoubleClick AndAlso _
Now.Ticks - m_LastClickTime <= _
SystemInformation.DoubleClickTime * 10000 AndAlso _
IsInDoubleClickArea(m_LastClickPosition, Cursor.Position) _
Then
OnDoubleClick(EventArgs.Empty)
m_LastClickRaisedDoubleClick = True
Else
m_LastClickRaisedDoubleClick = False
End If
m_LastClickPosition = Cursor.Position
m_LastClickTime = Now.Ticks
End If
MyBase.OnMouseDown(e)
End Sub
Private Function IsInDoubleClickArea( _
ByVal Point1 As Point, _
ByVal Point2 As Point _
) As Boolean
Return _
Math.Abs(Point1.X - Point2.X) <= SystemInformation.DoubleClickSize.Width AndAlso _
Math.Abs(Point1.Y - Point2.Y) <= SystemInformation.DoubleClickSize.Height
End Function
#End Region
End Class
|
|
|
|
|
Member 2713401 wrote: However I am not a C# guy, and the custom control is a bit over kill.
You know far more about C# than you think you do. Remove all the semi-colons and C# starts to look a lot like VB.NET. Let me give you a hint. These two code blocks are identical:
C#: int n = 0;
Pen myPen = new Pen(Color.Black);
VB.NET: Dim n As Integer = 0
Dim myPen As New Pen(Color.Black)
The rest is easy...
As for your control, you have to handle the Paint event, have the control paint itself and then supply the drawing code to paint the current date as the color you want. The example you linked to does exactly that. It's just a matter of filtering out all the stuff you don't need. Start with a simple example. Handle the Paint event and try to get the control to paint itself first, then draw a line acrossed the control.
MyBase.Paint(e)
' Your drawing code goes here
|
|
|
|
|
Okay, well, I found similar C# code snippits, here http://forums.techpowerup.com/showthread.php?t=70554[^]
And decided that this was simple enough, no thrills not all the extra stuff.
So I converted everything to VB using SharpDevelop - (it is pretty handy )
I created a simple Control using the ctlClock example from Microsoft as a guideline. The control is simple in that all it does is add the ability to set the background on specific dates, bold or not bold, and a box or no box with color.
I am stuck... The project compiles with no errors.However when I create a test form in my project and try to add my newly created MonthCalendar, I get an error.
"Failed to create component 'ExtendedMonthCalendar'. The error message follows:
'System.NullReferenceException: Object Reference not set to instance of an object. ... " The error points to the Sub New where the testing created a control on the Control Design (at least that is what I think it was doing).
If I comment the code, when I add the control to my form it is blank.
If I try to add the class that is inheriting the monthcalendar to my control design, I get a different error related to the constructor of the MonCal
My code is below - converted from another example in trying to understand all of this... all of this is kept in the Control Code
any help would be appreciated.
J
Partial Public Class ExtendedMonthCalendar
Private MyDates As List(Of HighlightedDates)
Public Sub New()
InitializeComponent()
' Dates would normally be passed in, in a List. For testing purposes I added the next declaration
'MyDates.Add(New HighlightedDates(Convert.ToDateTime("9/1/2008"), Color.Red, Color.Blue, Color.Pink, True))
'Dim mCal As New MonCal(MyDates)
'Me.Controls.Add(mCal)
End Sub
End Class
Friend Class MonCal
Inherits MonthCalendar
Protected Shared WM_PAINT As Integer = 15
Private dayBox As Rectangle
Private dayTop As Integer = 0
Private range As SelectionRange
Private highlightedDates As New List(Of HighlightedDates)()
Public Sub New(ByVal HighlightedDates As List(Of HighlightedDates))
Me.ShowTodayCircle = False
Me.highlightedDates = HighlightedDates
range = GetDisplayRange(False)
SetDayBoxSize()
SetPosition(Me.highlightedDates)
End Sub
' This method figures out the size of the entire date area portion of the control
' and then divides it up o create a Rectagle for painting to individual dates
Private Sub SetDayBoxSize()
Dim bottom As Integer = Me.Height
While HitTest(1, dayTop).HitArea <> HitArea.[Date] AndAlso HitTest(1, dayTop).HitArea <> HitArea.PrevMonthDate
dayTop += 1
End While
While HitTest(1, bottom).HitArea <> HitArea.[Date] AndAlso HitTest(1, bottom).HitArea <> HitArea.NextMonthDate
bottom -= 1
End While
dayBox = New Rectangle()
dayBox.Size = New Size(Me.Width / 7, (bottom - dayTop) / 6)
End Sub
' This method determines where in the 7 x 6 array of dates on the control our highlighted dates reside.
Private Sub SetPosition(ByVal hlDates As List(Of HighlightedDates))
Dim row As Integer = 0, col As Integer = 0
hlDates.ForEach(AddressOf ConvertedAnonymousMethod1)
End Sub
' This overrides the message pump and traps the WM_PAINT call
Protected Overloads Overrides Sub WndProc(ByRef m As Message)
MyBase.WndProc(m)
If m.Msg = WM_PAINT Then
Dim g As Graphics = Graphics.FromHwnd(Me.Handle)
Dim pea As New PaintEventArgs(g, New Rectangle(0, 0, Me.Width, Me.Height))
OnPaint(pea)
End If
End Sub
' Here is where we use our information to selectively draw what we want
Protected Overloads Overrides Sub OnPaint(ByVal e As PaintEventArgs)
MyBase.OnPaint(e)
Dim g As Graphics = e.Graphics
Dim backgroundRect As Rectangle
highlightedDates.ForEach(AddressOf ConvertedAnonymousMethod2)
End Sub
Private Sub ConvertedAnonymousMethod1(ByVal [date] As HighlightedDates)
If [date].[Date] >= range.Start AndAlso [date].[Date] <= range.[End] Then
Dim span As TimeSpan = [date].[Date].Subtract(range.Start)
Dim row = span.Days / 7
Dim col = span.Days Mod 7
[date].Position = New Point(row, col)
End If
End Sub
Private Sub ConvertedAnonymousMethod2(ByVal [date] As HighlightedDates)
Dim g As Graphics
Dim backgroundRect = New Rectangle([date].Position.Y * dayBox.Width + 1, [date].Position.X * dayBox.Height + dayTop, dayBox.Width, dayBox.Height)
If [date].BackgroundColor <> Color.Empty Then
Using brush As Brush = New SolidBrush([date].BackgroundColor)
g.FillRectangle(brush, backgroundRect)
End Using
End If
If [date].Bold OrElse [date].DateColor <> Color.Empty Then
Using textFont As New Font(Font, (IIf([date].Bold, FontStyle.Bold, FontStyle.Regular)))
TextRenderer.DrawText(g, [date].[Date].Day.ToString(), textFont, backgroundRect, [date].DateColor, TextFormatFlags.HorizontalCenter Or TextFormatFlags.VerticalCenter)
End Using
End If
If [date].BoxColor <> Color.Empty Then
Using pen As New Pen([date].BoxColor)
Dim boxRect As New Rectangle([date].Position.Y * dayBox.Width + 1, [date].Position.X * dayBox.Height + dayTop, dayBox.Width, dayBox.Height)
g.DrawRectangle(pen, boxRect)
End Using
End If
End Sub
End Class
Friend Class HighlightedDates
Public [Date] As DateTime
Public Position As New Point(0, 0)
Public DateColor As Color
Public BoxColor As Color
Public BackgroundColor As Color
Public Bold As Boolean
' This constructor is used if you only want to make dates bold. All colors are set to "Empty"(null color)
Public Sub New(ByVal [date] As DateTime)
Me.[Date] = [date]
Me.DateColor = Color.Empty
Me.BoxColor = Color.Empty
Me.BackgroundColor = Color.Empty
Me.Bold = True
End Sub
' This constructor is used if you want colored and/or bolded dates
Public Sub New(ByVal [date] As DateTime, ByVal dateColor As Color, ByVal bold As Boolean)
Me.[Date] = [date]
Me.DateColor = dateColor
Me.BoxColor = Color.Empty
Me.BackgroundColor = Color.Empty
Me.Bold = bold
End Sub
' This constructor is used when you want to control everything
Public Sub New(ByVal [date] As DateTime, ByVal dateColor As Color, ByVal boxColor As Color, ByVal backgroundColor As Color, ByVal bold As Boolean)
Me.[Date] = [date]
Me.DateColor = dateColor
Me.BoxColor = boxColor
Me.BackgroundColor = backgroundColor
Me.Bold = bold
End Sub
End Class
|
|
|
|
|
Private MyDates As List(Of HighlightedDates)
Public Sub New()
InitializeComponent()
' Dates would normally be passed in, in a List. For testing purposes I added the next declaration
MyDates.Add(New HighlightedDates(Convert.ToDateTime("9/1/2008"), Color.Red, Color.Blue, Color.Pink, True))
Dim mCal As New MonCal(MyDates)
Me.Controls.Add(mCal)
End Sub
You didn't instantiate an instance of the List at the top of the New code. This is where you're problem lies. Your code should be:
Private MyDates As New List(Of HighlightedDates)
|
|
|
|
|