Jump to content
Xtreme .Net Talk

blabore

Avatar/Signature
  • Posts

    48
  • Joined

  • Last visited

Everything posted by blabore

  1. I'll take a look, Thanks
  2. I have some standard controls (checkboxes, radio buttons, etc.) that are placed above a background that is drawn using alpha blending. The flat style of the controls is set to system. This works great when my app is shown with xp visual styles, but when the classic visual styles are shown, the controls are shown with a white background, not the background color. The only way I can see to get around this is to set the flat style based on the the visual styles being used. Is there a way to determine what visual styles are currently being applied (i.e. XP or something else). Any help would be appreciated. Thanks, Ben
  3. In my form designer for the parent form of MDI application, I've created a context menu. Each of these items has a shortcut (such as CTRL+SHIFT+T) assigned to it. I then used this menu as the dropdown menu for one of my toolbar buttons (the toolbar is on the same form). However, the shortcuts do not seem to work. Is there a problem with using shortcuts this way, or am I missing something here? Thanks in advance, Ben
  4. Might want to look at the API function NetServerEnum, which you can use to find all pc names for a given domain name
  5. Have you tried using SQL's Data Transformation Services (DTS)? It comes with the rest of SQL Server's tools (such as Query Analyzer) and can import/export from just about any data source.
  6. I have the same problem in an application I'm writing. Each MDI child needed to able to load it's own toolbar buttons/menus, and be able to respond to events from these controls. My solution (though it's not really mine, as I've seen it used in other applications) was to create a special interface that all of my MDI child forms would implement. The important methods of the interface include "LoadToolbar" and "ToolbarClick". In the MDI parent form, I then call these methods as needed. For example, before showing a child form, I call the LoadToolbar method, and the child form can then create the appropriate buttons on the toolbar (note it has to cast it's parent form to the appropriate form type to access the toolbar). In a similar fashion, when the toolbar was clicked, I'd call the "ToolbarClick" method to let the child form handle the event whatever way it wanted to (and would pass the appropriate arguments).
  7. Just a guess, but I'd don't think that office libraries are not backward compatible. You developed the add-in with the Word 11.0 library, and when you try to run this on a machine using Office 2000/XP, it's probably going to work, as it has an older version of the same library installed. However, I do believe the libraries are forward compatible (at least somewhat), so unless you're using stuff specific to Word 2003, you could probably just develop the add-in using an earlier version of Word/Office, and it should work with newer versions.
  8. I'm not sure if this really helps, but check out this link: http://support.microsoft.com/default.aspx?scid=kb;EN-US;244167
  9. This might not help you much, but I have some VB6 apps that pull data from dbf files. Here's the connection string I use: "Driver={Microsoft dBASE Driver (*.dbf)}; DriverID=277; Dbq=" & YOUR_DBF_PATH_HERE & ";" It works with ADO in VB6, but not sure about .Net.
  10. I'm looking for a way to run compiled code on the client end of a web application. Back in the days of VB6 I would've whipped up a simple ActiveX control, but it appears the only way you can do that now in .Net is with a C++ MFC control (which isn't worth the effort). Is there any workaround to this situation in .Net? I saw some posts referencing winforms user controls, but didn't see anyone who has actually used one in a web page. Any help would be appreciated.
  11. I created a small utility app that I'd like to give a small group of people access to. Rather than copy the app onto everyone's machine, I'd like to just place it in a shared folder, and have people create a shortcut to the exe file in the folder. However, when I try doing this, I always get the exception "System.Security.SecurityException" when the app starts. Anyone know if there is a workaround for this, or is this just part of running managed code? Any help would be appreciated.
  12. Terminal Server works nice.
  13. Can anyone tell me what type of control is being used in Microsoft Outlook's "Outlook Today" page? Is this another one of their "in-house" controls used for Microsoft applications only? Any help would be appreciated.
  14. Just a start, but I'd try looking for print drivers that can print to a bitmap/other image format. Then use word automation to insert the picture file directly into a word document. You could easily create a Word macro and view the code to see how to do the second part.
  15. The datetimepicker control can be used without any mouse input, using F4 to show the calendar when it has the focus. However, if you must use a textbox, I'd suggest using a regular expression to validate the entered text after the control has lost focus/during the validate event. Otherwise you're going to have to handle keystrokes as the user types them, which might be a real mess due the different types of date formats.Using an ErrorProvider control also works well with this type of approach to notify your user of invalid data without having to display message boxes, etc. Just my 2 cents.
  16. Howard, Note that this may not solve your problem, but in my experience it's much better to use template based add-ins rather than COM style add-ins. They can do just about everything a COM add-in can do, plus are MUCH easier to debug and deploy.
  17. Though this might not be the way you want to go, the ActiveX toolbar control from the Windows Common controls in VB6 supports different images for mouseovers, etc. You could add this control to a .Net Windows Form project.
  18. Just a start (i.e. you might need to tweak it), but I'd try something like this: Dim xlApp As Excel.Application Dim xlBook As Excel.Workbook Dim xlSheet As Excel.Worksheet Dim i As Integer Dim BlankLine As Integer = -1 xlApp = New Excel.Application xlBook = xlApp.Workbooks.Open(pathToMyFile) xlSheet = xlBook.Worksheets(1) 'Loop until some max value For i = 0 To 10000 'Check if the value of the cell is empty If CStr(xlSheet.Range("A" & i.ToString).Value).Length = 0 Then BlankLine = i Exit For End If Next 'Check blank line was found If BlankLine = -1 Then MsgBox("No Blank Lines Found") Note that this would only check one column (column A), you might want to check several to verify a line is really "blank". There's probably better (i.e. faster) ways to loops through cells, since constantly setting a new range object will slow things down. I know you can set multiple cell values at once using an array, so I'm guessing you could also read multiple values, which would be much faster. I'd try setting the range to several cells, then setting the value of the range to an array. In case you guessed, I'm no excel expert. Hope this helps
  19. I belive what JABE was referring to was the practive of using singleton design patterns, which is designing your classes (i.e. forms) so that only a single instance exists, and there's some type of global access to the single instance. Though I'm not positive, I don't believe there are any Framework classes that are actually called "singleton". The only place I'm aware of that it's used to specify libraries as singleton for remoting purposes.
  20. Off the top of my head, you could do it a couple of different ways. If no one manually edits the spreadsheet outside of your app, just store a hidden value within the spreadsheet itself that contains the next blank row. Read this value before inserting new data, and increment it afterwords. If the excel spreadsheet is being used outside of your app, then I'd just try running a loop to read one or more values from each row until a blank row is found. Even with thousands of rows, you should be able to find the next blank in less than a couple of seconds. Hope this helps, Ben
  21. Not sure what this singleton stuff is, but you could basically just run a check each time you needed to create a form. There used to be a Forms collection in VB6 which kept track of all open forms, but I'm not sure if it still exist in .Net. However, you easily just maintain your own collection object. Before creating each form, iterate through the collection and check the name of each form. If you find a match, show the existing form, if not, create a new one and add it to the collection.
  22. You should be able to do something like this: CType(myMdiChildForm.MdiParent, MyMdiParentForm).MyStatusBar Where myMdiChildForm is an instance of any mdi child form (you could also use Me if you're calling this code from the child form), MyMdiParentForm is going to be the Name of you Mdi Parent Form Class, such as MainForm, and MyStatusBar is obviously the name of the status bar on your main form. Hope this helps, Ben
  23. Looks like a great tool, thanks for the help. I'll check it out and let you know. -Ben
  24. I'm a little confused about MSDE. It appears that the downloaded version of MSDE doesn't come with any of the supporting tools, such as Query Analyzer. However, the CD version of MSDE that ships with the full verions does. Most of my clients don't want to shell out the 1500 for the full version, and typically use the free MSDE. Since I deploy the database for my application by running several SQL scripts (typically through Query Analyzer), is there a workaround to this? Any help would be appreciated.
×
×
  • Create New...