|
I am trying to display the current date and time in a label. Here is my code:
Dim rightNow As DateTime = DateTime.Now
datetime.Text = String.Format("{0 )", rightNow) & String.Format("{0:T)", rightNow)
This code works in my other two applications but this time it underlines DateTime.Now and says Now is not a member of System.Windows.Forms.Label.
Any ideas?
|
|
|
|
|
If datetime is a label or a text, it doesn't have any property named as NOW. Now indicates the date and time for now. It is a function.
Dim myLabel as new label
label.text = Now.toString
What a curious mind needs to discover knowledge is noting else than a pin-hole.
|
|
|
|
|
I found out what the problem was. Here is my code:
Dim rightNow As DateTime = DateAndTime.Now
lbltime.Text = String.Format("{0:T}", rightNow)
lbldate.Text = String.Format("{0 }", rightNow)
Thanks for the help!
jds1207
|
|
|
|
|
It looks like you named your label the same name as the function, visual basic is not case sensitive, try renaming your label
|
|
|
|
|
Could anyone help me write the codes in VB 2005 Pocket PC program? I am currently working on a project to receive and play audio/video streaming files on a PDA. I need codes to determine if the media file is coming from a live source, the file type, and the file size(bandwidth), and how to play them on the PDA . Thank you.
|
|
|
|
|
I have a VB .NET 2K5 application that has the following code to execute a store procedure from SQL 2K5 Server:
Dim Conn As New SqlClient.SqlConnection("connection string")
Dim CmdStoreCall As New SqlClient.SqlCommand
CmdStoreCall.Connection = Conn
CmdStoreCall.CommandText = "Name of stored procedure"
CmdStoreCall.CommandType = CommandType.StoredProcedure
Try
CmdStoreCall.Parameters.AddWithValue("@pickup", prmpickup)
CmdStoreCall.Parameters.AddWithValue("@selrecord", prmselrecord)
CmdStoreCall.Parameters.AddWithValue("@rollsre", prmrollsre)
Catch ex As Exception
MessageBox.Show(ex.Message)
End Try
Conn.Open()
Try
CmdStoreCall.ExecuteNonQuery()
Catch ex As Exception
MessageBox.Show(ex.Message)
Conn.Close()
The code seems to gets an error on the "CmdStoreCall.ExecuteNonQuery".
Here is the error: "No mapping exist from object System.Data.SqlClient.Sqlparameter to a managed Native type"
|
|
|
|
|
You must specify the SqlDbtype of the parameters
hopes that helps you.
wachill
Signature has been encrypted
|
|
|
|
|
the program must have 9 numaric buttons for the user to click in order to set the time for microwave.start and clear buttons and if the microwave starts to work glass color will change to green.
|
|
|
|
|
You missed the bell on timer expiration...
Homework?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
You have three questions posted and they are all obviously homework. Work on it and if you get stuck then ask your question.
_________________________________________
You can't fix stupid, but you can medicate crazy.
|
|
|
|
|
nyakallo wrote: numaric buttons
Your teacher cannot spell. Obviously, you're going to fail, regardless. Next time, I recommend playing attention in class. Or, just get a job at McDonalds and be done with it.
Look around, we love to help people who try to do their own homework and get stuck. None of us want to one day have a co worker who posts all their work assignments to the web, so we don't like to encourage that mindset.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"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 )
|
|
|
|
|
Hi All
I Want To Run A Program At A Remote Computer.
I Need The API Function.
Can You Help Me.
The Host Computer Is NT Family (NT;2000&XP)
Tanks
|
|
|
|
|
go for citris utlity...
Regards,
Smart Boy
Mumbai,
(INDIA)
|
|
|
|
|
Hi 2 All..
In Vb.net i am using a datagrid with 50 columns. Actually the horizontal scroll bar should start from the 5th column. so that upon scrolling column 5 - 50 should get scroll. column 0 -4 should remain static.
Expecting Favourable reply..
Gurudatta B. Shelke
|
|
|
|
|
You can use two grids.
one grid for the 4 static colunm and the other for the scrollable part.
hopes it helps you
wachill
Signature has been encrypted
|
|
|
|
|
thanx wachill 4 ur responce..
But I want to attach the scrollbar by using one datagrid only requirement is like that and one morething i should tell u thet all the columns which are not frozen are dynamic columns means those will be added at runtime. The columns which are aded at runtime to that datagrid for those datagrid columns only i want to attach a horizontal scrollbar.
Gurudatta B. Shelke
|
|
|
|
|
Hi
You can use FarPoint Spread instead of DataGrid. In that you can freeze columns but you need to download from the site.
Harini
|
|
|
|
|
Thanx Harini for ur responce. I will definitely try FarPoint.
Thanx once again.
Gurudatta B. Shelke
|
|
|
|
|
the tower of hanoio with three pegs. i need a recursion method to move the disks to another peg using the other one as a temporary holding
|
|
|
|
|
You have three questions posted and they are all obviously homework. Work on it and if you get stuck then ask your question.
_________________________________________
You can't fix stupid, but you can medicate crazy.
|
|
|
|
|
How can i link Foxpro Data to our vb.net project.
|
|
|
|
|
Ajeet mittal wrote: urgent
Not to us it isn't.
We answer in our spare time. For FREE. If you want urgent then pay for support. If you want free then be patient.
|
|
|
|
|
ok,when u free give me answer
|
|
|
|
|
see this link
www.connectionstrings.com
regards
chandru
|
|
|
|
|
Its quite simple , Create *.udl file and simply follow to create
foxpro connection string. open that .udl file with notepad copy that
string and paste onto file as connectionstring.
Develop2Program & Program2Develop
|
|
|
|