|
I get an odd error when trying to connect to a SQL 2005 database. When I try to preview it, it comes up and says, "MaxLength applies to string data type only. You cannot set Column 'Project' property MaxLength to be a non-negative number." I don't even know what MaxLength is... and therefore assume it is nowhere in my code. Is there something I am missing?
Perhaps I am posting this in the wrong forum. A timely answer is preferred.
Thanks!
|
|
|
|
|
Hi
Can u send me the code of of how u defined the datatable, creating the coloumn & rows, n also the data passing to that table?
Senthil S
Software Engineer
|
|
|
|
|
Is there is any way to freeze the column of listview?
Thanks in advance.
Ejaz
|
|
|
|
|
Nope. It's not supported by the default control. You'd have to implement your own version of the control for that. Or, use a DataGridView, which already supports freezing columns.
|
|
|
|
|
I am trying to create a shortcut to the user's desktop when I install the application on the user's machine. During the deployment process under the FileSystem(Setup1) tab, it gives me the option to create a shortcut on the user's desktop. When I right click on User's Desktop and choose Create Shortcut to User's Desktop, it will create a shortcut but when I try to open the shortcut from the desktop it opens up the Desktop folder instead of the actual program. Any ideas?
jds1207
|
|
|
|
|
It did exactly what you told it to do. It created a shortcut to the user's Desktop folder.
jds1207 wrote: I am trying to create a shortcut to the user's desktop
That's also what your explanation said you wanted. Or did you mean to say something else?
How about creating a shortcut to the Primary output from your project IN the User's Desktop folder? All you have to do is click on the User's Desktop folder in the left pane, then right-click in the right pane and pick Create New Shortcut. Then you open the File System on Target Machine, then the Application Folder. You can then pick the Primary output to create the shortcut to.
|
|
|
|
|
I simply copied over (in code) the start menu icon that ClickOnce (thanks Microsoft...) created. Just ask if you want help doing that.
|
|
|
|
|
I am just getting started with VBA for Excel and don't knwo the code to get to do the following:
1. Saving a Workbook I am creating with the following format ddmmmyyyy & _Weekly_Forecast.xls in a folder named "Weekly Reports" right under the folder where the master workbook is. The file being saved is generated from a copy/paste of two sheets of the master workbook that is found in the current directory.
2. How to change directory without the need of typing the entire path. Does anything like "~" exist? The problem being I don't want to force users to save the workbook on a given location. As long as they have the workbook in the Weekly Forecasts folder I am providing them with it should not matter where they place it. Doon't want the coding to depend on that.
Carlos Rodriguez
|
|
|
|
|
I don't have an answer, but you may get one on a different site. Try Access-Programmers. Of course, they deal with Access issues, but they also write in VBA.
Just a thought.
|
|
|
|
|
Hi,
I submitted my first n only one article abt Excel need n using in VB.Net. Use my article which may help u....
The article is http://www.codeproject.com/useritems/Senthil_S__Software_Eng_.asp
And anything pls reply r inform to me... Pls..
Senthil S
Software Engineer
|
|
|
|
|
Ok, basically it goes something like this, I have written a key logger of sorts for my application. What it does is to trap the F1-F12 keys, when they are pressed it raises an event letting me know which one was pressed. I need to be able to call the appropriate sub in whatever form or dialog is currently running in my application.
Any ideas?
Thanks in advance for any help guys.
--
"Keyboard not found. Press < F1 > to RESUME. "
Source unknown (appears in many common BIOSes as a real error message)
|
|
|
|
|
Form.ActiveForm will return the form with the focus in your app.
|
|
|
|
|
Thanks alot
--
"Keyboard not found. Press < F1 > to RESUME. "
Source unknown (appears in many common BIOSes as a real error message)
|
|
|
|
|
This doesn't seem to be working...It keeps returning nothing from form.activeform...here is a link that shows the debug i was doing:
My Debug Session
--
"Keyboard not found. Press < F1 > to RESUME. "
Source unknown (appears in many common BIOSes as a real error message)
|
|
|
|
|
How about Me.ActiveForm . Of course, that will only work if the code is in a form class. It won't work outside of a form.
|
|
|
|
|
It is under a modual with my Sub Main. The only way I could make it work so far is to use
Private Sub mKeyLogger_KeyPressed(ByVal theKey As System.Windows.Forms.Keys, ByVal isDown As Boolean) Handles mKeyLogger.KeyPressed
If isDown Then
Dim f As Form = mFrmMain.ActiveMdiChild
If Not f Is Nothing Then
If TypeOf f Is IHandlesDirectInput Then
DirectCast(f, IHandlesDirectInput).HandleInput(theKey, isDown)
End If
End If
End If
End Sub
The problem with this is that it limits me to only MDI childre, and not a dialog that could be showing...I need the top level form or dialog at the time the key is pressed so that I can dispatch the key directly to that form or dialog and let it handle it.
--
"Keyboard not found. Press < F1 > to RESUME. "
Source unknown (appears in many common BIOSes as a real error message)
|
|
|
|
|
Well, it's definately not working as advertised. I never use it, so all I have to go on is the documentation.
Hmmm... Well. Quick and drity, it's possible to set a Shared variable from the Form.Activate event of each form you want to handle.
|
|
|
|
|
Expand the event to include the form object so that you can call it's routine
|
|
|
|
|
better yet, expand the event and pass the delegate that you want the logger to call...
|
|
|
|
|
As is ANY form implementing the interface WILL be called if it is in the front, except for dialogs...There is no way to expand the event to include the form, the event is fired from the key logger which has no knowledge of the form that will receive the event. The key logger simply sees the trapped key being pressed and raises an event saying it was pressed and letting me know if its state is up or down. passing delegates would require the form to know about the key logger and the key logger to know about the form, violating the principle of least privilege...besides if there was a way of knowing which form is in front from the key logger, then the same can be done from the event, its just a matter of how to find the current form or dialog that is running in the front of the application.
--
"Keyboard not found. Press < F1 > to RESUME. "
Source unknown (appears in many common BIOSes as a real error message)
|
|
|
|
|
Is there an easy way to Compact and Repair Access Database.
|
|
|
|
|
I found this article which may interest you:
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q303528[^]
I wrote a utility to compact an access database using some code that I had found somewhere. I referenced Microsoft DAO 3.6 Object Library Com object and then used the following code:
Private Sub CompactFile(ByVal strFileIn As String, ByVal strFileOut As String)
Try
'First check the file u want to compact exists or not
If My.Computer.FileSystem.FileExists(strFileIn) Then
Dim objDAO As New DAO.DBEngine()
'CompactDatabase has two parameters, creates a copy of compact DB at the Destination path
objDAO.CompactDatabase(strFileIn, strFileOut)
End If
Catch ex As Exception
MsgBox("Compact File Error: " & ex.Message)
End Try
End Sub
Note: This method will save the compacted database under a new name. If you want it to appear that the file itself was compacted you will have to add code to delete the exising db and replace it with the compacted one after you perform this method.
Hope this helps.
|
|
|
|
|
How to add a chart in vb.net application?
Thanks In advance.
Ejaz
|
|
|
|
|
Ejaz, Look up article 301982 in support.microsoft.com. Worked as a start for me. OH
ohart
|
|
|
|
|
Thanks ohart but I tried to search this at support.microsoft.com but did not find this.
Can you please provide me the link for this article?
Thanks
|
|
|
|