|
|
With respect, if you don't understand this assignment question then you really are too far behind the eight ball for us to help you here.
However, there is a great book called VB.NET for Dummies. THIS DOES NOT IMPLY THAT YOU ARE DUMB. This book is one of the 'dummies' series for raw beginners in all subjects. It is clear and well written and I think you'll get a lot more out of it than calling for help on a forum such as this.
You can find it on Amazon.com[^]
BTW: I do not have any vested interest in Amazon.com or the book.
...Steve
1. quod erat demonstrandum
2. "Give a man a fish and you've fed him for a day. Teach him how to fish and you've fed him for life." I read that somewhere once
|
|
|
|
|
I doubt you'll answer this but i'll ask anyway.
Generally, when you take a class in anything they teach you a certain amount before setting you any assignments. Have you just not attended any classes and got this assignment from somebody that has?
I only ask because you wrote:
mcb12 wrote: I really don't know how to write codes
How does somebody who has taken a class that teaches coding practice not know ANYTHING about how to "write codes"?
Current blacklist
svmilky - Extremely rude | FeRtoll - Rude personal emails | ironstrike1 - Rude & Obnoxious behaviour
|
|
|
|
|
I really don't think anyone is trying to be rude answering your questions. What I've found is that almost everyone that is willing to answer questions on this or any other forum like Code Project, expects the person asking the questions to have put some effort into opening Visual Studio and setting up a form, etc.
Once you've started the application and get stuck trying to code a specific textbox or other control, ask.
Nobody is going to code your project for you, but there are many knowledgable individuals who will help with different parts of the project you have questions on.
As far as resources for learning, why not start with Microsoft's own Visual Studio site:
http://msdn.microsoft.com/vstudio/[^]
Lost in the vast sea of .NET
|
|
|
|
|
Hello. I want to validate a range of number like when you print in Word, "1,2,3-5,6,10-12". Any of you know the regular expression to do that.
Thanks a lot !!
|
|
|
|
|
What exactly would you like to validate? That the string entered is in the X-Y formatt?
--------------------------------------------------------
My development blog
Q:What does the derived class in C# tell to it's parent?
A:All your base are belong to us!
|
|
|
|
|
You could use something like:
\d+(-\d+)?(,\d+(-\d+)?)*
That will still only validate the format, not the sanity of the range. A string like "45-3,12-14,13,13,0,0,0,0" would still be valid.
---
b { font-weight: normal; }
|
|
|
|
|
|
I have commented out some code but when I run my app the commented code is still throwing an error.
The error that I get is "Object reference not set to an instance of an object."
I get this same error when the code is uncommented. My app stops at the commented code with the error.
anyone any ideas.
Thanks.
|
|
|
|
|
compile the supposed commented code.
|
|
|
|
|
|
I have drawn an undee chart on a panel dynamically.I use a scrollbar.it is used to read fore chart.And what i want to get help is:
what do you think the best way to achieve it.
ICQ:258-235-734
-- modified at 4:32 Thursday 11th May, 2006
|
|
|
|
|
Hello,
I have populated my dataset SQLDataset, and would like to pass the data to a table in SQL Server 7.0. How do I accomplish this?
<br />
Private Sub cmdExport_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdExport.Click<br />
<br />
Dim DBConnection As New SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\db1.mdf" & _<br />
";Integrated Security=True;User Instance=True")<br />
Dim SQLDataset As New DataSet("db1") <br />
Dim currentUser As String<br />
Dim trimUserName As String<br />
currentUser = My.User.Name<br />
<br />
trimUserName = My.User.Name.ToUpper.ToString()<br />
currentUser = trimUserName.Substring(9)<br />
<br />
DBConnection.Open() 'open database<br />
<br />
Dim dbAdapter As New SqlDataAdapter("SELECT * FROM tblContacts WHERE Status = 'NEW'", DBConnection)<br />
<br />
dbAdapter.Fill(SQLDataset) <br />
<br />
If SQLDataset.Tables("Table").Rows(0)(14).ToString = "NEW" Then<br />
<br />
'then send data to SQL Server 7.0<br />
<br />
<br />
End If<br />
<br />
SQLDataset.WriteXml("c:\temp\" & currentUser & ".xml", XmlWriteMode.WriteSchema)<br />
DBConnection.Close()<br />
<br />
<br />
<br />
<br />
End Sub<br />
|
|
|
|
|
Hi! there,
Im having a project to develop a library management system.
But i have no idea where to start.
P'se help me people where necessary.
Thanx
|
|
|
|
|
|
Have you studied Software Project yet?
Maybe it is useful to you.
Adair
|
|
|
|
|
Well what i studied is introduction to VB 6.0 only.
And i know about software re engineering.
What i dont know is how to develop this software using VB.
P'se help me. I can even send the interface i design for that library management system.
Thanx
|
|
|
|
|
hi there ,
I am trying to wrap all the rpoject file to setup file . how to do that in vb.net (2003)
thanks in advance.
bharath.s
|
|
|
|
|
http://msdn2.microsoft.com/en-us/library/2kt85ked(vs.80).aspx
Adair
|
|
|
|
|
Is there anything i have to Consider it befor,output msg from thread to label windows control ?
because i made code but it give me this exception->(Cross-thread operation not valid: Control 'Label1' accessed from a thread other than the thread it was created on.)
i want to know why exactly this?,also what solution for it?
|
|
|
|
|
|
is there any simple example doing this?
|
|
|
|
|
' This is an example from msdn of microsoft
Imports System
Imports System.ComponentModel
Imports System.Threading
Imports System.Windows.Forms
Public Class Form1
Inherits Form
' This delegate enables asynchronous calls for setting
' the text property on a TextBox control.
Delegate Sub SetTextCallback([text] As String)
' This thread is used to demonstrate both thread-safe and
' unsafe ways to call a Windows Forms control.
Private demoThread As Thread = Nothing
' This BackgroundWorker is used to demonstrate the
' preferred way of performing asynchronous operations.
Private WithEvents backgroundWorker1 As BackgroundWorker
Private textBox1 As TextBox
Private WithEvents setTextUnsafeBtn As Button
Private WithEvents setTextSafeBtn As Button
Private WithEvents setTextBackgroundWorkerBtn As Button
Private components As System.ComponentModel.IContainer = Nothing
Public Sub New()
InitializeComponent()
End Sub
Protected Overrides Sub Dispose(disposing As Boolean)
If disposing AndAlso Not (components Is Nothing) Then
components.Dispose()
End If
MyBase.Dispose(disposing)
End Sub
' This event handler creates a thread that calls a
' Windows Forms control in an unsafe way.
Private Sub setTextUnsafeBtn_Click( _
ByVal sender As Object, _
ByVal e As EventArgs) Handles setTextUnsafeBtn.Click
Me.demoThread = New Thread( _
New ThreadStart(AddressOf Me.ThreadProcUnsafe))
Me.demoThread.Start()
End Sub
' This method is executed on the worker thread and makes
' an unsafe call on the TextBox control.
Private Sub ThreadProcUnsafe()
Me.textBox1.Text = "This text was set unsafely."
End Sub
' This event handler creates a thread that calls a
' Windows Forms control in a thread-safe way.
Private Sub setTextSafeBtn_Click( _
ByVal sender As Object, _
ByVal e As EventArgs) Handles setTextSafeBtn.Click
Me.demoThread = New Thread( _
New ThreadStart(AddressOf Me.ThreadProcSafe))
Me.demoThread.Start()
End Sub
' This method is executed on the worker thread and makes
' a thread-safe call on the TextBox control.
Private Sub ThreadProcSafe()
Me.SetText("This text was set safely.")
End Sub
' This method demonstrates a pattern for making thread-safe
' calls on a Windows Forms control.
'
' If the calling thread is different from the thread that
' created the TextBox control, this method creates a
' SetTextCallback and calls itself asynchronously using the
' Invoke method.
'
' If the calling thread is the same as the thread that created
' the TextBox control, the Text property is set directly.
Private Sub SetText(ByVal [text] As String)
' InvokeRequired required compares the thread ID of the
' calling thread to the thread ID of the creating thread.
' If these threads are different, it returns true.
If Me.textBox1.InvokeRequired Then
Dim d As New SetTextCallback(AddressOf SetText)
Me.Invoke(d, New Object() {[text]})
Else
Me.textBox1.Text = [text]
End If
End Sub
' This event handler starts the form's
' BackgroundWorker by calling RunWorkerAsync.
'
' The Text property of the TextBox control is set
' when the BackgroundWorker raises the RunWorkerCompleted
' event.
Private Sub setTextBackgroundWorkerBtn_Click( _
ByVal sender As Object, _
ByVal e As EventArgs) Handles setTextBackgroundWorkerBtn.Click
Me.backgroundWorker1.RunWorkerAsync()
End Sub
' This event handler sets the Text property of the TextBox
' control. It is called on the thread that created the
' TextBox control, so the call is thread-safe.
'
' BackgroundWorker is the preferred way to perform asynchronous
' operations.
Private Sub backgroundWorker1_RunWorkerCompleted( _
ByVal sender As Object, _
ByVal e As RunWorkerCompletedEventArgs) _
Handles backgroundWorker1.RunWorkerCompleted
Me.textBox1.Text = _
"This text was set safely by BackgroundWorker."
End Sub
#Region "Windows Form Designer generated code"
Private Sub InitializeComponent()
Me.textBox1 = New System.Windows.Forms.TextBox()
Me.setTextUnsafeBtn = New System.Windows.Forms.Button()
Me.setTextSafeBtn = New System.Windows.Forms.Button()
Me.setTextBackgroundWorkerBtn = New System.Windows.Forms.Button()
Me.backgroundWorker1 = New System.ComponentModel.BackgroundWorker()
Me.SuspendLayout()
'
' textBox1
'
Me.textBox1.Location = New System.Drawing.Point(12, 12)
Me.textBox1.Name = "textBox1"
Me.textBox1.Size = New System.Drawing.Size(240, 20)
Me.textBox1.TabIndex = 0
'
' setTextUnsafeBtn
'
Me.setTextUnsafeBtn.Location = New System.Drawing.Point(15, 55)
Me.setTextUnsafeBtn.Name = "setTextUnsafeBtn"
Me.setTextUnsafeBtn.TabIndex = 1
Me.setTextUnsafeBtn.Text = "Unsafe Call"
'
' setTextSafeBtn
'
Me.setTextSafeBtn.Location = New System.Drawing.Point(96, 55)
Me.setTextSafeBtn.Name = "setTextSafeBtn"
Me.setTextSafeBtn.TabIndex = 2
Me.setTextSafeBtn.Text = "Safe Call"
'
' setTextBackgroundWorkerBtn
'
Me.setTextBackgroundWorkerBtn.Location = New System.Drawing.Point(177, 55)
Me.setTextBackgroundWorkerBtn.Name = "setTextBackgroundWorkerBtn"
Me.setTextBackgroundWorkerBtn.TabIndex = 3
Me.setTextBackgroundWorkerBtn.Text = "Safe BW Call"
'
' backgroundWorker1
'
'
' Form1
'
Me.ClientSize = New System.Drawing.Size(268, 96)
Me.Controls.Add(setTextBackgroundWorkerBtn)
Me.Controls.Add(setTextSafeBtn)
Me.Controls.Add(setTextUnsafeBtn)
Me.Controls.Add(textBox1)
Me.Name = "Form1"
Me.Text = "Form1"
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub 'InitializeComponent
#End Region
<stathread()> _
Shared Sub Main()
Application.EnableVisualStyles()
Application.Run(New Form1())
End Sub
End Class
Adair
|
|
|
|
|
is this simple example ? if yes , what about complex one hehehe
i searched befor , i found MSDN example but it is so long, what i want is real simple example because i dont have time for my project.
|
|
|
|
|
hi there ,
how to add the controls while the loading of the form . the number of each and every control will be dynamic.
thanks in advance.
bharath.s
|
|
|
|