Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. Ruffnekk

    Trying to get generic DataType class

    Yes that's correct. You can build on that base and expand the functionality. Regards, Ruffnekk --- Is it true that cannibals don't eat clowns because they taste funny?
  2. Ruffnekk

    Trying to get generic DataType class

    The following code will do what you want without casting at all. I have omitted all the "extra" code, just the necessary functionality. public abstract class DataType<T> { protected T _objCurrent; protected T _Data { get { return _objCurrent; }...
  3. Ruffnekk

    Trying to get generic DataType class

    You are using the Data field of the base class, where you should be using the TypedData field of the derived classes. In other words: s1.Data = "This is a test"; s2 = s1.TypedData; This should work (unverified). Regards, Ruffnekk --- Is it true that cannibals don't eat clowns because they...
  4. Ruffnekk

    Text on image - watermark - font size

    Here's some example code that you can tweak to suit your needs: // This is the method you were using, taking a string // and an image as arguments. private void addWatermark(string text, Image img) { // Get the Graphics object from the image Graphics G = Graphics.FromImage(img); // Set...
  5. Ruffnekk

    Retrieving Whole Number from a Decimal without Rounding?

    Dim sngl As Single = 3.959 Dim intgr As Integer = CInt((sngl Mod 1) * (10 ^ (Len(sngl.ToString) - 2))) ;P Only works if 0 < sngl < 10 Regards, Ruffnekk --- Is it true that cannibals don't eat clowns because they taste funny?
  6. Ruffnekk

    Saving form properties to XML (or some file format)

    You might want to look up Object Serialization. You can also start by looking at this page: http://www.codeproject.com/cs/miscctrl/ControlCloneTst.asp It will explain, with source code, how to serialize form controls and other objects. Regards, Ruffnekk --- Is it true that cannibals don't eat...
  7. Ruffnekk

    serialize documents to database?

    Either serialize only one document per stream or deserialize all documents and then write a method that selects a particular document. As far as I know you can't serialize a collection and then deserialize one item of that collection only. Regards, Ruffnekk --- Is it true that cannibals don't...
  8. Ruffnekk

    Multidimensional Array

    You must declare the array like: int[, ,] myArray = new int[,,] { { { 2, 3, 4 }, { 4, 5, 6 }, { 6, 7, 8} }, { { 6, 7, 8 }, { 8, 9, 10 }, { 10, 11, 12 } } }; I suggest to take a look at this MSDN tutorial about arrays in C#...
  9. Ruffnekk

    serialize documents to database?

    I wrote an article explaining a bit about serialization here: http://www.donationcoder.com/Forums/bb/index.php?topic=7274.0 I might be of use to you. Regards, Ruffnekk --- Is it true that cannibals don't eat clowns because they taste funny?
  10. Ruffnekk

    Treeview issue

    Yes I tried debugging it but I can't see any event being fired after I start editing the treenode label's text. Regards, Ruffnekk --- Is it true that cannibals don't eat clowns because they taste funny?
  11. Ruffnekk

    Treeview issue

    Hi all, I have an MDI parent form which has a Treeview control directly on it, docked left. The remaining space will have MDI child forms. When I (at runtime) add a node to the Treeview, I want the user to be able to edit the textlabel of the node immediately without interaction. The code I...
  12. Ruffnekk

    global variables not working in visual studio 2005!

    Is "GlobalDeclaration.vb" a module? If so, is the module itself declared Private? Regards, Ruffnekk --- Is it true that cannibals don't eat clowns because they taste funny?
  13. Ruffnekk

    Capture parameter passed to a program

    Start your application with a Sub Main from a module, and define Sub Main like this: Module Module1 Public Sub Main(args() As String) For Each arg As String In args 'Do something Next End Sub End Module The args() array is a String array containing all arguments passed...
  14. Ruffnekk

    TextBox column number

    Hi, I´m using VB .NET 2003 and I´m trying to accomplish the following: I want to be notified when a user scrolls the textbox horizontally.The TextBox is multi-line, no wordwrap and showing both scrollbars. The reason I want to do this is to update a ruler that indicates the column number in...
  15. Ruffnekk

    insertion in a database without repetition

    You are taking the wrong approach here. You loop through each existing datarow and check if the current term is different from the user entered term. If this is not so then the term is added. This means that a new term will be added every time an existing term is not the same, that is the reason...
  16. Ruffnekk

    Force overridden property to be updated

    Hi, I have a small problem which I can't seem to solve. I have made a UserControl, completely user drawn. I need to override the BackColor property. The problem that arises when I override it, is that whenever I change the backcolor of the control on a Windows Form, the property is not set in...
  17. Ruffnekk

    Grouping an Active Directory search

    If it's an ADO RecordSet you can populate a dataset with first: Dim myDA As OleDbDataAdapter = New OleDbDataAdapter Dim myDS As DataSet = New DataSet myDA.Fill(myDS, myRecordSet, "MyTable") Then you can use an SQL statement like: Dim myDRS As DataRow() =...
  18. Ruffnekk

    Excel SaveAs method - requires file format???

    xlDoc.SaveAs("c:\temp.csv", FileFormat:=Excel.XlFileFormat.xlCSVWindows, AddToMru:=False, TextVisualLayout:=Excel.XlTextVisualLayoutType.xlTextVisualLTR, CreateBackup:=True) xlDoc is an object of type Excel.Worksheet Intellisense *will* show you the enumeration possibilities. Just try it by...
  19. Ruffnekk

    Do somethong after ShowDialog

    What exactly are you trying to do? You can access all values on the form after creating a new instance and then showing it. After the dialog has closed you can still access all (changed) values untill you dispose it... Regards, Ruffnekk --- Is it true that cannibals don't eat clowns because...
  20. Ruffnekk

    Melding Tif's

    Here http://www.dotnet247.com/247reference/msgs/53/267819.aspx you can find a way to do it, but only with 1-bit (monochrome) uncompressed TIFF files. Regards, Ruffnekk --- Is it true that cannibals don't eat clowns because they taste funny?

Part and Inventory Search

Back
Top