
mjb3030
Avatar/Signature-
Posts
76 -
Joined
-
Last visited
Everything posted by mjb3030
-
I see what you are saying. I haven't gotten it to work yet, though. I am still messing with it. Here is my code: Private Sub TestsForm_MouseLeave(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.MouseLeave Dim rBounds As Rectangle rBounds = Me.Bounds If Not rBounds.Contains(btnTestEditor.MousePosition) Then Me.Hide() End If End Sub It is still hiding when I mouse over the button.
-
Thanks for the tip on that conversion utility. That worked. That is exactly what I want to do. The only problem is... if you add a button to your child form and mouse over that button, it triggers the MouseLeave event for the form and closes the form.
-
I am sorry. I tried to open it, but it won't let me. It is telling me that it is incompatible with my version of VS (I have 2002). Thank you for taking the time, though.
-
I just tried them again because I couldn't remember what the problem was... MouseLeave doesn't work with the popup form because everytime I mouse over one of the controls on the form, it triggers the form's MouseLeave event and hides the form. MouseEnter just doesn't work at all on the MDI form.
-
I tried both of those. I tried MouseEnter on the MDI form and MouseLeave on the popup form. Neither one worked.
-
I am converting a VB6 program to .NET. It consists of an MDI form with a button on it. When the user moves the mouse over the button, another form opens. When the user moves the mouse out of that second form, it hides. It makes for a quick show/hide form without the user having to manually close the popup form. In VB6, I used the MouseMove event in the MDI form to hide the popup form. It worked fine. However, the MouseMove event does not work for MDI forms in .NET. I have tried MouseMove in my popup form and checking the mouse coordinates to determine if it should close, but that doesn't work. Probably because if I move out of the bounds of the form, it would no longer trigger the MouseMove event for that form! (I just realized that while typing this). Is there a good way to handle this? Also... in VB6, the popup form would appear on top of the button (actually, I did not use a button in VB6, I used a small form with no border that looked like a button). In .NET, the form appears under the button which I do not want. BringToFront does not seem to fix the problem. How to fix that too? Thanks.
-
I found a workaround for this problem. In my form_close event, I set the DataSource property of my datagrid to nothing. That forces the changes into the dataset.
-
I have a DataAdapter/DataSet/DataGrid application I created using the database wizard. The problem is that if I make a change to a cell in the datagrid and then close the application without moving the focus to another record, the database doesn't get changed. If I move the focus to another record first, everything is OK. How do I force it to update? I am currently doing this when the application is closed: Private Sub UpdateDB() daWheelLog.Update(dsWheelLog) End Sub The DataGrid is called dgrWheelLog. I tried this: dsWheelLog.AcceptChanges() I put that before the daWheelLog.Update line, but that didn't work. What do I need to do?
-
How do most people determine minimum software requirements for an application they have written? Hard drive requirements are pretty obvious, but how do you determine processor / RAM requirements?
-
Or this: http://www.zan1011.com/ Sorry for the multiple posts... I keep finding more stuff after I've already posted.
-
Check this out: http://www.leadtools.com/Utilities/PrinterDriver/Converter/ePrint_As_A_BMP_Converter.htm
-
I don't know what steps you would take to do all of this in .NET, but I know that PDF's can be converted to BMP. So, if you printed the web page to a PDF file and then converted it to BMP..... Or, maybe there is a way (perhaps someone has already created a component for this) to print directly to a BMP file. That way you could get the whole page instead of just the portion on the screen.
-
Never mind... I'm a big dumb animal. I had set e.cancel to true in 2 of my child forms' Closing events. as soon as I removed that, it worked.
-
OK... I found this on MSDN: --------------------------------- Note Keep in mind that when closing an MDI parent form, each of the MDI child forms raises a Closing event before the Closing event for the MDI parent is raised. Cancelling an MDI child's Closing event will not prevent the MDI parent's Closing event from being raised; however, the CancelEventArgs argument for the MDI parent's Closing event will now be set to true. You can force the MDI parent and all MDI child forms to close by setting the CancelEventArgs argument to false. --------------------------------------- So, now I understand why the parent form's Closing event isn't being called right away, but that still doesn't explain why my application closes one child window and then stops. Why won't it go through and close them all? I have one hidden form that is constantly collecting data from a USB data acquistion device. Could that have something to do with it? I don't see why it wouldn't just close that also.
-
Those are all child forms.
-
I tried adding: frmCal.Close() frmMain.Close() frmTest.Close() After that didn't work, I discovered that it isn't even hitting the Closing event of the parent form until the final click when it closes itself.
-
I have an MDI application. I am opening the MDI children from within the parent like this: With frmCal .MdiParent = Me .Show() .Location = new Point(0,0) End With The problem I am having is that when I try to close the parent (say I click the close (X) button), it closes one of the child forms. If I click it again, it closes another child form. It keeps doing this until all the child forms are closed. Then, it will finally close on the final click. What do I have to do to make sure it closes everything with one click?
-
I am connecting to a USB data acquisition device which is converting an analog signal to a digital one.
-
I am creating an application that will be collecting data from a data acquisition device. The device will be supplying the data at a much faster rate than I need to collect it, which is fine. I need to collect exactly 360 pieces of data in exactly 3 seconds, 120 points per second. My question is... how? Should I use a Timer? My guess is that won't be accurate enough to give me exactly 360 data points each time. If I use a For...Next loop, I will get exactly 360 points, but it won't happen over 3 seconds. Where should I turn? Thanks.
-
How to access memory buffer directly?
mjb3030 replied to mjb3030's topic in Interoperation / Office Integration
Thank you for your help. I emailed the company that made this software, and they sent me a modified module which works. -
I am working with some 3rd party API functions which were written a number of years ago. They are for data acquistion purposes. One of the functions returns a handle to a location where the acquired data value is stored. That works fine. Another function takes the handle as input and puts the data stored at that location into another variable. This function keeps returning an "Invalid Buffer" error. However, if I perform the exact same sequence of events in VB6, everything works fine, and the value that is being passed as the handle is in the same numeric range as when I run it in VB.NET. The only change I have made in .NET is that I changed the Longs to Integers. My question is: A) Is there a .NET function which will allow me to access the memory buffer directly without having to use these old functions? B) If not, does anyone know what I might be doing wrong? I can post the code if the answer to A is no. Thanks.
-
System.NullReferenceException
mjb3030 replied to mjb3030's topic in Interoperation / Office Integration
I got it now. I just had to convert all my Longs to Integers. -
System.NullReferenceException
mjb3030 replied to mjb3030's topic in Interoperation / Office Integration
A value of 0 is being passed in for WinFlags, a value of 200 is being passed in for buffersize, and hbuf is the variable that will hold the result being returned from olDmAllocBuffer. -
I have the following function: Function AllocBuffer(ByVal WinFlags As Integer, ByVal buffersize As Long) As Long Dim hbuf As Long Dim ecode As Long ecode = olDmAllocBuffer(WinFlags, buffersize, hbuf) If ecode <> OLNOERROR Then OLMEMTrap("AllocBuffer", ecode) Else AllocBuffer = hbuf End If End Function the olDmAllocBuffer function is defined as: Declare Function olDmAllocBuffer& Lib "OLMEM32.DLL" (ByVal usWinFlags%, ByVal ulBufferSize&, ByVal hBuffer&) An error of System.NullReference Exception or "Object reference not set to an instance of an object" is being thrown at the line ecode = olDmAllocBuffer(WinFlags, buffersize, hbuf) All of this code is contained in a module. I don't see any objects here other than longs and integers. This code works in VB6. What am I doing wrong?
-
Why is it that when I do this: With mnuFile .menuitems.add("&New", new eventhandler(addressof mnuNew_Click)) End With it works, but when I use the constructor with a shortcut: with mnuFile .menutems.add("&New", new eventhandler(addressof mnuNew_Click), Shortcut.CtrlN) End With I get the error "BC30516: Overload resolution failed because no accessible 'Add' accepts this number of arguments."