|
I don't know, I would check by doing some research[^]
|
|
|
|
|
Hi Friends,
How to assign shortcut keys for toolbar buttons? I have tried using "&" in button text,this works in normal button but not in toolbar buttons.Please guide me.
Note: using windows Application
Thanks in advance...
|
|
|
|
|
|
Thanks for your reply,
but, i am not setting shortcut keys for vs.net...
I need to add shortcut keys for my own application
|
|
|
|
|
There is no shortcut for ToolBarButtons. Normally you would create a corresponding MenuItem and set the Shortcut property of that. If you haven't created a MainMenu then you would have to set the KeyPreview property of the form to True and handle the KeyDown event, testing for whatever key combination you wanted to use as the shortcut key. Then you could call the same method that you would call from the ToolBar.ButtonClick event handler when that particular button is clicked.
[source: jmcilhinney at vbforums.com]
|
|
|
|
|
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
|
|
|
|