|
If you do not want a menu you can also look at Hotkey
Private Declare Function RegisterHotKey Lib "user32" (ByVal hwnd As IntPtr, ByVal id As Integer, ByVal fsModifiers As Integer, ByVal vk As Integer) As Integer
Private Declare Function UnregisterHotKey Lib "user32" (ByVal hwnd As IntPtr, ByVal id As Integer) As Integer
Private Declare Function GlobalAddAtom Lib "kernel32" Alias "GlobalAddAtomA" (ByVal lpString As String) As Short
Private Declare Function GlobalDeleteAtom Lib "kernel32" (ByVal nAtom As Short) As Short
there is on CP a very good in VB.net example
Jan
|
|
|
|
|
|
|
Thanks a lot Friend.
I tried using Mainmenu, its working fine.
|
|
|
|
|
Hi
My code displays the error in top
cmd = New SqlCommand("spStudent", con1)
cmd.CommandType = CommandType.StoredProcedure
cmd.Parameters.Add(New SqlParameter("@EnterDate", SqlDbType.DateTime, 8))
cmd.Parameters("@EnterDate").Value = "01/09/2009"
cmd.CommandTimeout = 1800
cmd.ExecuteNonQuery()
Sda = New SqlDataAdapter(cmd)
Sda.Fill(dt)
How to resolve this problem... please help
Regards,
Samson
modified on Friday, January 9, 2009 5:35 AM
|
|
|
|
|
Try:
cmd.Parameters("@EnterDate").Value = New Date(1, 9, 2009)
|
|
|
|
|
cmd.Parameters("@EnterDate").Value = New Date(1, 9, 2009)
This one is Date(year, month, Date) Format.
But my Format is MM/dd/yyyy.... Please help further
With Regards,
Samson
|
|
|
|
|
Ah I see, sorry, I misread your post. Unfortuanately I can't offer any more help, sorry.
|
|
|
|
|
samsonx wrote: cmd.Parameters("@EnterDate").Value = "01/09/2009"
Convert "01/09/2009" to dateTime variable and then assign the value to parameter.
The format of DateTime does not matter during the Saving of information.
|
|
|
|
|
That means that the database doesn't use the same date format that you use, and is parsing it to a completely different date, like perhaps '0001-09-09'. This is outside the range of dates that the datetime type in the database can handle, hence that specific error message.
Parse the string into a DateTime value before you put it in the parameter:
cmd.Parameters("@EnterDate").Value = DateTime.ParseExact("01/09/2009", "MM/dd/yyyy", CultureInfo.InvariantCulture)
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Try date format with
cmd.Parameters("@EnterDate").Value = cdate("#01/09/2009#")
mailto: anubhava.prodata@gmail.com
|
|
|
|
|
in my application i want to draw n level treeview with dataset
please help me in this matter and if possible please give me some example because i am never use treeview before
|
|
|
|
|
aajignesh wrote: i am never use treeview before
...or Google apparently. Only about 378,000 hits on google for treeview samples in VB so it should be possible for you to use one of those.
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
Sarcasm is the lowest form of wit but I love it
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Mycroft Holmes wrote: Sarcasm is the lowest form of wit
I know, but sometimes its just too tempting
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
Ah the rapier like thrust of a well weighted insult into the vitals of such a pillock as this, is most satisfying I must admit.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Mycroft Holmes wrote: Ah the rapier like thrust of a well weighted insult
Wouldn't say it was that good
Mycroft Holmes wrote: such a pillock as this
can't argue about that
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
Just parse your datatable in dataset with parent and child fields and add nodes to treeview, can you handle this or you want more in code?
|
|
|
|
|
Ya sir Please Give Me Some code
|
|
|
|
|
Hi to All,
I have created a new process using
dim p as new process
And then I have ran a particular file. But, I ran that in a loop, where three process will be created with the same file/exe. Would there be any concurrency problem?
Thax in advance
|
|
|
|
|
Do you mean you are running the same EXE three times concurrently? Probably not, but some EXEs don't like being run at the same time as another instance of them. It depends on the EXE.
|
|
|
|
|
thax colin....I am running an powerpoint ppt,..So is there any problem.
Actually, my current situation is somethng like this:: i have a server, where my ppt(for quize) is stored. Now from each client connected to it, I am running the same ppt( in fact am planning to make it as pps format).
Now what I felt is, because every process has its own stack and all, it wont have any problem . But still I want to conform it.. Could u pls lel me know about the same...
Thanks in advance
Himangshu
|
|
|
|
|
PowerPoints should have no problem with running on multiple computers at once (in fact, my college computer science course is doing it right now). However PowerPoint may set the file as read-only beyond the first person open the file. That way any editing is done by one person.
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my Blog
|
|
|
|
|
Hi all...
I want to change system volume through my application.
Suggest me how can I do this.
Thanks.
Gagan
|
|
|
|
|
What do you mean by "system Volume
Never underestimate the power of human stupidity
RAH
|
|
|
|