
rustyd
Avatar/Signature-
Posts
114 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by rustyd
-
Thanks for the reply. It is a web app, and the code was in their own folder, which I moved to the app_code folder and it worked as expected. Thanks PlausiblyDamp.
-
Hi, In VB.NET 1.1, I created 2 classes in separate files. One is a data class and the other is an ExceptionClass. I used the Namespace directive in the following manner: Namespace RDDC.Components The data class is called DataAccess and the exception class is called ExceptionLogging. I've now added these two files to my VB.NET 2.0 project and in the DataAccess class, when I catch an exception, I throw the exception as follows: Catch ExceptionObject As Exception 'Any exception will be logged through our private logexception function Dim logerr As New RDDC.Components.ExceptionLogging logerr.LogException(ExceptionObject) 'If an exception occurs, close the connection now! _Connection.Close() 'The exception is passed back to the calling code, with our custom message and specific exception information Throw New Exception(logerr.ExecptionMessage, ExceptionObject) The problem is everywhere I'm referencing the RDDC.Components.ExceptionLogging it is giving me an error saying "Type 'RDDC.Components.ExceptionLogging' is undefined" Any help would be appreciated.
-
I had this happen I've had this happen several different times from several different sources. I changed the namespace and/or class and the html inherits line did not match caused this Null values while retrieving my controls settings from tabmodulesettings To help debug the situation there is a dnndebug.aspx file you can use. Here is a link to speerio.net that has the code for the dnndebug.aspx. Copy and paste the text from this link into a blank text file and save it as dnndebug.aspx in the root of you dnn site. Load this page in a browser and enter the path to the component and it helps you out.
-
Thanks for the reply. That will work. Hindsight being 20/20, we should have used OnLeave for validation.
-
I should clarify this a bit. I have a control that inherits from WIndows.Forms.Textbox. In this control, I have the On_Enter event. When the control receives focus it checks the data type for the field the control is holding. If the control is for a numeric field, it highlights the text, if it isn't, it places the cursor at the end of the string. So, I have 2 two of these controls on a form. The first is a numeric keyfield that to identify the record, the second is a string description. What I'm seeing is the On_Enter of the base class is firing before the form level OnEnter. 1. From first textbox, enter an existing record id and press enter. 2. Second textbox base class On_Enter event fires, since the record hasn't been retrieved yet there is no description text. 3. The form level on_enter event fires and the record is retrieved. 4. The description text is now highlighted If I make a call to sender.On_Enter(Sender, e) in step 3 after the record is retrieved, it works like expected, but this means on forms with more than the 2 controls, this would fire the On_Enter twice for each textbox that receives focus. How can I have the form level on_enter fire before the base class? Is that possible?
-
I have a usercontrol Public Class Ritext Inherits System.Windows.Forms.TextBox When this control receives focus, it should change to the user defined color held in a public variable, which it does. In my forms, I have a routine that binds all controls Enter event to a single sub: AddHandler c1.Enter, AddressOf Me.OnSetFocus In OnSetFocus, if the key field is entered and the user presses enter or tabs to the next control, if it is an inherited textbox, the text is highlighted even if the clear property is set to false. This only happens on the first textbox after the key textbox. After debugging, I find that the base class On_Enter event of ritext is fired, then the forms OnSetFocus is fired populating the form's fields and highlighting the inherited textboxes text. Public Sub On_Enter(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.Enter Try sender.BackColor = Color.FromArgb(255, InRGB) msSavedText = Me.Text If IsNothing(DirectCast(sender, Ritext).RICSFormLabel) Then DirectCast(sender, Ritext).RICSFormLabel.Text = "" End If Catch ex As Exception End Try Try If _RICSClear Then DirectCast(sender, Ritext).SelectAll() Else If DirectCast(sender, Ritext).Text.Length > 0 And DirectCast(sender, Ritext).SelectionLength = 0 And (DirectCast(sender, Ritext).SelectionStart = 0 Or DirectCast(sender, Ritext).SelectionStart = DirectCast(sender, Ritext).Text.Length) Then DirectCast(sender, Ritext).SelectionStart = DirectCast(sender, Ritext).Text.Length End If End If Catch ex As Exception Finally _dtEntered = Now End Try End Sub If I add the call sender.On_Enter(Sender, e) in the form's OnSetFocus routine, it "works" like it is supposed to, but every time a textbox receives focus it is calling the base class twice. Any suggestions are appreciated.
-
right click in the window and select Clear All
-
SendKeys.SendWait("%{PRTSC}") Dim iData As IDataObject = Clipboard.GetDataObject() If iData.GetDataPresent(DataFormats.Bitmap) Then Dim bmp As Bitmap = iData.GetData(DataFormats.Bitmap) ' TODO: Replace newfilename with the new filename to save screen shot as bmp.Save(<newfilename>, Imaging.ImageFormat.Bmp) bmp.Dispose() End If
-
Has anyone else noticed this? I know this is an old thread, but I am experiencing the same thing with a form inherited from my base form. I have 4 menu items on the base form, and I add a menu to the left-most position on the new form. When I do it, I can see all the menus. When I close the form and bring it back up, the new menuitem is gone! When I look at the Windows Form Designer generated code area, I see the new menuitems I added, but the first item has an index of -1. Any suggestions?
-
I know that up is negative, down is positive. It seems (+/-) 120 is the magic number, but I also occassionaly received (+/-) 240 when I scrolled aggressively. I don't know where you're getting 360. Basically, check for positive or negative to determine the direction of the scroll.
-
Add this line of code and the delta value produced by scrolling will appear in your output window. Console.WriteLine("e.delta = " & e.Delta.ToString) Mousewheel forward, or up, e.delta = 120; Mousewheel backward, or down, e.delta = -120; I noticed when I aggressively scrolled the value changed to 240 depending on the direction I scrolled. From scrolling up and down I get the following output: e.delta = 120 e.delta = 120 e.delta = 120 e.delta = 120 e.delta = 120 e.delta = 120 e.delta = 120 e.delta = 120 e.delta = 120 e.delta = 120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = 120 e.delta = 120 e.delta = 120 e.delta = 120 e.delta = 120 e.delta = 120 e.delta = 120 e.delta = 120 e.delta = 120 e.delta = 120 e.delta = 120 e.delta = 120 e.delta = 240 e.delta = 120 e.delta = 120 e.delta = 120 e.delta = 120 e.delta = 120 e.delta = 120 e.delta = 240 e.delta = 240 e.delta = 120 e.delta = 120 e.delta = 120 e.delta = 120 e.delta = 240 e.delta = 240 e.delta = 120 e.delta = 120 e.delta = 120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = 120 e.delta = 120 e.delta = 240 e.delta = 240 e.delta = 240 e.delta = 120 e.delta = 120 e.delta = 120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = 120 e.delta = 120 e.delta = 120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = 120 e.delta = 120 e.delta = 120 e.delta = 120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = 120 e.delta = 120 e.delta = 120 e.delta = 120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = 120 e.delta = 120 e.delta = 120 e.delta = 120 e.delta = 120 e.delta = 120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = 120 e.delta = 120 e.delta = 240 e.delta = 120 e.delta = 120 e.delta = -120 e.delta = -120 e.delta = -240 e.delta = -120 e.delta = -120 e.delta = 240 e.delta = 240 e.delta = 120 e.delta = 120 e.delta = 120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = 120 e.delta = 240 e.delta = 120 e.delta = 120 e.delta = 120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = -240 e.delta = -120 e.delta = -120 e.delta = 240 e.delta = 240 e.delta = 120 e.delta = 120 e.delta = 120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = -240 e.delta = -240 e.delta = -120 e.delta = -120 e.delta = 120 e.delta = 120 e.delta = 120 e.delta = 120 e.delta = 120 e.delta = 120 e.delta = 120 e.delta = 120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = 240 e.delta = 240 e.delta = 240 e.delta = 240 e.delta = 240 e.delta = 120 e.delta = 120 e.delta = 240 e.delta = 240 e.delta = 240 e.delta = 240 e.delta = 120 e.delta = 120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = -120 e.delta = 120 e.delta = 120 e.delta = 240 e.delta = 240 e.delta = 240 e.delta = 120
-
Mousewheel event This is from a VS 2002 app. The mousewheel event is not in the list of events but exists (found that on this site). Private Sub Form1_MouseWheel(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseWheel If e.Delta < 0 Then ' Routine when mouse scroll down Else ' Routine when mouse scroll up End If End Sub
-
Restricting the InventoryQuantity records reduced the records returned from 187,000 to 704. THe sql profiler showed the Inventory Quanitity record at 88% before the where clause addition and down to 50% after the change. The I/O cost went from 36.2 to .0129. The CPU cost went from 2.08 to .002341.
-
I'm running in debug mode through the development environment, and it's memory changes slightly while running this job and frees up memory when the job is complete. SqlServr.exe starts at 47000 Kb and after the process is complete, remains at 157000Kb. When I close the program, it comes back down to about 110000Kb. I'm running Windows XP Pro SP2 on a PIII 2.8 Ghz w/512MB RAM. I have another machine that I will run this process against with SQL Server 2000 w/ SP3 installed. So I will try that. In Query Analyzer, the query starts loading records almost immediately, but takes 1 min 46 secs to return all 187,703 records. During that time the sqlservr.exe fluctuated between 35000Kb and 70000Kb of memory and when the query was complete went way down to around 18000Kb of memory. The page file went up to 734 MB and stayed there after the query is complete. The query itself, I optimized by eliminating columns I didn't need returned, that helped a lot. I can improve the where clause to limit records returned which will help also. Thanks for your help.
-
Page File not cleared after .Dispose and = nothing Thanks for the response Wile. There are two places where I see it not releasing the page file usage and both times are when it runs a multi-table inner join where two of the tables have over 1.8 million records. The where clause reduces the quantity of records returned to 180,000 records. I am running this on an MSDE setup. Haven't run it over the network yet. After I dispose and set the sqldatareader = nothing, I see the memory slowly freeing up. What I don't see, is the page file usage remains huge and my entire computer runs very sluggish.
-
Hi, I've noticed that I call object.Dispose and if I mouse over it, it tells me what it is. If I set it = Nothing, it now shows nothing. Which is the better for memory/performance? I ask because I have a huge query from 3 tables, 2 of which have over 1.8 million records. The query reduces to 183,000 records. I open the sqldatareader with the query and it opens within less than 10 seconds. It is now running through the logic in the read loop. Two issues: 1) Occasionally, I get a timeout after the loop has read 75%-80% of the records. I've increased the command timeout to 60 and that problem went away. I set the command timeout back to 30 and removed some unneeded columns from the query and it reduced the frequency of this happening. Does this make sense? Before optimizing the query, it timed out every time. After optimization, it seems to only happen after the procedure has been run several times. Which brings me to my second issue. In the loop, it picks out records that match certain criteria and inserts them into a table 2) I have 512MB of RAM. My page file is managed by Windows XP Pro (1.5 GB). I start the procedure that loads the above query and Task Manager performance tab. I see the Physical Memory total at 523,000. As it begins looping through the read of the query, I see the Physical Memory available plummet, and the PF Usage steadily rise. After the procedure is complete, the Physical Memory slowly comes back, but the PF Usage remains high and my machine is dog slow after running this procedure. Even after closing the application it remains within a few MB of it's peak PF Usage. It is like this when run from the IDE, the EXE in both Debug and Release builds. Any ideas are appreciated.
-
Not so fast!! When I add a where clause to get 250 records before and 250 records after a particular vendor, I say SELECT * FROM (SELECT TOP 250 Item,Description,Vendor,Category,Style,Picturefilename FROM Inventory WHERE Vendor <= 'XYZ' ORDER BY Vendor Desc, Sku DESC) TempInv1 UNION SELECT * FROM (SELECT TOP 250 Item,Description,Vendor,Category,Style,Picturefilename FROM Inventory WHERE Vendor >= 'XYZ' ORDER BY Vendor, Sku) TempInv2 ORDER BY Vendor, Sku I have 414 items with a vendor of XYZ. That is how many records the query returns. If I change the top 250 to top 90, I get 180 records of items with the vendor XYZ. The problem is they are the first 90 and the last 90. The way it looks now, I'm going to have to use 2 separate recordsets and the first one will only have a less than in the where clause. What do you guys think?
-
Thanks. That did the trick.
-
I have a customer lookup screen. We set it up to select max 500 records from anywhere in the table. If the user includes some text for searching though, we select the 250 before and the 250 after the search phrase. Here is an example: SELECT TOP 250 Item,Description FROM Inventory WHERE Item <= 'FR' UNION SELECT TOP 250 Item,Description FROM Inventory WHERE Item >= 'FR' ORDER BY Item If for instance the records before the first instance of FR would be: Rec 400: Example98 Rec 401: Example99 Rec 402: Free1 Rec 403: Free2 But the result I got was not what I was looking for. I do not receive the 4 records in my results. I get records 1-250 and records 402 to 651. What I want is records 151-651. Any ideas? My thoughts are a union isn't going to work for what i need, I may need to make 2 separate calls.
-
The lines are from a groupbox inside another control (a panel or another groupbox). The location left setting is less than the container control and the size width is greater than the width of the container control.
-
In the selectedIndexChanged() you could use the sender instead of an index With Dim s as string = DirectCast(sender, ComboBox).Name Select Case s Case "ComboBox1" Case "ComboBox2" case Else end select
-
Add an index property Can you stub the SelectedIndexChanged() from a combobox, then add a handler to it for each combobox in the array on Initialize?
-
Yeah!! Got it to connect. Fixed the Response() function. Now onto getting it to pull emails.
-
On to the next problem Wanted to report that I remembered reading a post about someone having problems with their sockets program and they were told about mscorcfg.exe to setup permissions for the program. I added TestMail.exe to the applications and I can connect!! OK, enough of the good news. Now I have problems in the Response() call. It crashes on the line If (buff(0) = vbLf) Then I'm comparing a byte to a string. So, I'll get this figured out. Thanks for your help so far.
-
Telnet vs. My app I can connect successfully via telnet with the command: open mymailserver 110 responds with: +OK Hello There! I overload the connect method in my Pop3 class and use: Connect(mailserver, 110) I get the error: Operation not allowed on non-connected sockets I change the Connect to: Connect("open " + mailserver, 110) I get the error: System.Net.Sockets.SocketException: The requested name is valid and was found in the database, but it does not have the correct associated data being resolved What do you make of this?