|
OK. 0,0 it is. I've never had to change the CurrentCell myself...
Try setting the Focus to the DataGrid FIRST, then make the change to the CurrentCell.
DataGrid.Focus()
DataGrid.CurrentCell = New DataGridCell(0,0)
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I had the logic like this:
DataGrid.CurrentCell = New DataGridCell(0,0)<br />
DataGrid.Focus()
I changed it to your suggestion of:
DataGrid.Focus()<br />
DataGrid.CurrentCell = New DataGridCell(0,0)
Neither way allows the cursor to be focused in the cell. If I set it to (1,1), the pointer on the side has the arrow pointing at the second record, so the CurrentCell logic is working but the Focus() is not.
I've also set the breakpoint on that line just to make sure I'm not going crazy and the logic wasn't being executed. It is.
Thanks for your suggestions...
Lost in the vast sea of .NET
|
|
|
|
|
KreativeKai wrote: I've also set the breakpoint on that line just to make sure I'm not going crazy and the logic wasn't being executed. It is.
Set the breakpoint on what line? Did it execute these two lines or not? What you said contradicts itself.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
The logic is executing. I set the breakpoint right above this section of code and stepped through the code.
Any other suggestions?
Lost in the vast sea of .NET
-- modified at 14:51 Friday 27th January, 2006
|
|
|
|
|
Here is the code I've used which works.
DataGrid.CurrentCell = New DataGridCell(0, 0)
SendKeys.Send("{TAB}")
SendKeys.Send("{TAB}")
SendKeys.Send("{TAB}")
SendKeys.Send("{HOME}")
This just doesn't seem like the best way to get focus on a datagrid.
Does anyone have a better suggestion?
Lost in the vast sea of .NET
|
|
|
|
|
I'm having a massive amount of trouble registering a VB.net created COM/ActiveX dll on another machine. Every time I try to register with regsvr32 it says "<myfile>.dll was loaded, but the DllRegisterServer entry point was not found. This file can not be registered"
I have created the dll using the "Register for COM interop" option enabled and the dll works fine on my machine.
The test machine I'm using has the .net framework installed but just won't register the dll.
Am I doing something stupid? Any help would be greatly appreciated.
|
|
|
|
|
It's not as easy as you might think. You might want to read Exposing .NET Framework Components to COM[^] on MSDN.
RegSvr32 only works with REAL COM servers, not .NET assemblies impersonating them. The registration utility you're looking for is RegAsm.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks for the reply Dave. Am reading your link now.
Have tried the regasm.exe and it seems to work fine but I now get a message "File or assembly name mydll, or one of its dependencies, was not found" when I try to use my class.
Any Ideas or is it very much more complicated than I am thinking?
Thanks again
|
|
|
|
|
Does your assembly reference any other controls or libraries that might not be installed on the target machine? What did you set References to (Hint, Hint!) when you wrote this thing?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I don;t think there should be anything missing from the target machine.
I'll explain what i've done.
Someone here has developed a huge model in XL and is frightened about giving it away to people as they can see all of his precious code. I was asked to bung it into a dll as xl security is supposedly quite poor.
He's used loads of arrays in the xl model so I just ripped out a couple of functions into vb.net and passed these array's byref. Turned the interop option on and built the solution. It worked fine on my machine. The code only uses variables and numbers!
If you can help me sort this I'll be over the moon as its starting to do my head in a bit!
Thanx 4 all the help already.
|
|
|
|
|
Again, did your project add any REFERENCES (check in the References folder of your project!). Such as to the Office PIA's?? If your project makes any references to anything other than the standard ones for the project you built, you have to make sure that the libraries those references are pointing to are also installed on the target machine.
If you added a Reference to the Office PIA's, that version of Office, or greater, better be installed on the target machine.
I can't make it any clearer than that. You're project is referencing something that is not installed on that machine.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi again Dave,
Thanks for all your help.
Still can't get it to work though. I have no references at all in the references folder in solution explorer and the only things the solution imports in the AssemblyInfo are:
Imports System
Imports System.Reflection
Imports System.Runtime.InteropServices
It imports Microsoft.VisualBasic in the project property pages. The target machine has exactly the same version of office as I have on the machine that works.
I have run out of all options now.
Thanks again for all your help
|
|
|
|
|
I have no idea. There's something your code is referencing that just isn't there or is mis-registered.
Stupid thing maybe, but the same version of the .NET Framework installed? Same version of MDAC maybe?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-- modified at 20:45 Thursday 26th January, 2006
|
|
|
|
|
im trying to compare the username and the password for login from the database.
after compling this error come out:
Object reference not set to an instance of an object.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object reference not set to an instance of an object.
Source Error:
Line 44: Function DBConnection(ByVal strnomatriks As String, ByVal strnoic As String) As Boolean
Line 45:
Line 46: Dim MyConn As SqlClient.SqlConnection = New SqlClient.SqlConnection(ConfigurationManager.ConnectionStrings("psm").ConnectionString)
Line 47:
Line 48: Dim MyCmd As New SqlClient.SqlCommand("sp_ValidateUser", MyConn)
could anyone help?
|
|
|
|
|
The problem is that one of these methods returned Nothing . All of your code is assuming that everything worked. There is no error checking built into any of this.
Check to see if ConfigurationManager.ConnectionStrings("psm") actually returned anything. You're trying to call the .ConnectionString property on something that, apparently, doesn't have an instance!
Did .ConnectionString actually return anything, or did IT return Nothing .
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
i still cant get it?
i want it to get a certain data in the database to campare with the user given data?
|
|
|
|
|
Step through the code line-by-line. It's the only way your going to see what's going on. Look in the Local Variables box in the debugger after each line executes so you can see the values of variables.
I can't tell you what's wrong because I can't see enough of the code. You'll learn a HELL of alot more if you step through and watch the code yourself.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hello world!,
I want to make my classes, is possible that I can imported this classes?.
I think that I can use:
Imports MyClass
Is possible, How can do that?...
gangeles
|
|
|
|
|
In the project that you want to use your class library in, you have to add a reference to the library.
If the class library project is in the same solution as the project you want to use it in, add a project reference. If your library is completely finished and won't be changing, you can add a reference to the .DLL that your class library is in.
Only after the reference is added, will your Imports statement work and your code be able to use those classes.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-- modified at 11:12 Thursday 26th January, 2006
|
|
|
|
|
I got an error message as "IIS dose not Support ASP.Net version 1.1 you can not run the application " while running the WebApplication on VB.Net
I have done all the things like
1> Configuring the IIS
2> Reinstalling on .Net
The Error Still remain
Can anybody tell me the solution.
sagarharale@gmail.com
Sagar Harale
|
|
|
|
|
Does the machine in question meet the requirements of ASP.NET 1.1?
ASP.NET Platform Requirements[^]
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
there is no sound when i run this simple code??what is the problem?
Dim Peedy As AgentObjects.IAgentCtlCharacter
Const PEEDYPATH = "Peedy.acs"
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Peedy.Speak("hi man how are you")
End Sub
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
AxAgent1.Characters.Load("Peedy", PEEDYPATH)
Peedy = AxAgent1.Characters("Peedy")
Peedy.Show()
'Merlin.Play("GestureLeft")
'Merlin.Hide()
End Sub
|
|
|
|
|
Your problem is not code related.
I have an application that I wrote two to three years ago when I was starting to learn Visual Studio and Visual Basic .NET. The application uses Peedy and I use the "Speak" syntax also.
On my Windows XP development system, all I see are the words display over his head on the screen.
On my Windows 2000 system I see the words, but also hear him say the words.
I've compared my systems and have no idea what is installed on my old system that allows him to talk. My Windows 2000 system is about 7 years old and started out as Windows NT. I've installed many software applications on it and removed many of them over the years.
I have no idea what driver or software is installed that allows him to speak, but I can say one thing. It's not the VB code.
Lost in the vast sea of .NET
<a href="http://www.komputing.com/Pricelist.html">Visit my website at www.komputing.com</a>
-- modified at 12:44 Thursday 26th January, 2006
|
|
|
|
|
hi! here's my problem...i'm using a listbox where i drop objects and they're added into the list...now, i want to implement that, when a selected item is dragged and droped into the form which contains this list, the item is removed from the list...
i've implemented it, but it's not working very well...sometimes when i drop an item into the form from the list, an exception occurs telling me that there was an error with the list's bounds...here's the code:
'this one is for when the drag starts from the list (to the form)
Private Sub lstReglas_MouseDown(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles lstReglas.MouseDown
If lstReglas.SelectedItem <> Nothing Then
lstReglas.DoDragDrop(lstReglas.SelectedItem, DragDropEffects.Move)
End If
End Sub
'here is when i enter the form while dragging the item
Private Sub windows_DragEnter(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles MyBase.DragEnter
If e.Data.GetDataPresent(DataFormats.Text) Then
e.Effect = DragDropEffects.Move
Else
e.Effect = DragDropEffects.None
End If
End Sub
'and this happens when i drop the item into the form
Private Sub windows_DragDrop(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles MyBase.DragDrop
lstReglas.Items.Remove(lstReglas.SelectedItem)
End Sub
|
|
|
|
|
i want a function (or class contains a function) doing this:
function_name(12.154) will return: twelve, one hundred and fifty four
|
|
|
|