Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
K

Knoen

@Knoen
About
Posts
12
Topics
8
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • LINQ + Combobox
    K Knoen

    Im haveing a little trouble with one combobox. I have a table with two fields. One with codes and one descriptions of the code. Now, i also have a customers table wich has one code atached to it. I want to populate the combobox with all the codes from the first table and then select the code from the current customer in the customers table. Im trying but i cant seem to get it right. Further i want to be able to change the item in the combobox so that it writes the code that i change back to the customers row in the customers table. How is this done? Thanx

    LINQ csharp linq sales question

  • Custom classes and linq + databinding
    K Knoen

    Im makeing a customer textbox for handling updates to db. I have never got the regular databinding to update my db when the "lost focus" event runs. So ive made up my mind to create a custom class for it. class CustomerTextBox : TextBox { protected override void OnLeave(EventArgs e) { Binding TextProperty = this.DataBindings["Text"]; Binding TagProperty = this.DataBindings["Tag"]; } } When focus is lost then this method runs. Now, how can i add support for all possible bindings so that i dont need to make a customer textbox class for handeling Customer updates, anohter for handling Reservation updates and so on. I can get the fields of the binding itself by looking at the TextProperty.BindingMemberInfo property. But how do i for example handle the fact that this fields sometimes are bound to Reservations table, and another textbox is bound to the Customers table. I need to extract the type of the table, create a new instance of that object. Retrive the disierd row from the db and then update the field found in the TextProperty.BindingMemberInfo property. And this must work for all possible tables and field in the db. Any ideas? :) Tnx

    LINQ question csharp database wpf wcf

  • Problem with columns in DataGridView
    K Knoen

    Oh man! You where right, what a god damn rockie misstake :) In the database the columns name i CustomerID so naturaly i tryed that. But the true name was customerIDDataGridViewTextBoxColumn :(( Thanks for the help!

    C# database help question

  • Problem with columns in DataGridView
    K Knoen

    Yes but isnt it possible to access both like Columns[integer] and Columns[String]? Then i dont have to know the actual index for the column i seek. Thats the beauti :)

    C# database help question

  • Problem with columns in DataGridView
    K Knoen

    Im trying to access a certan column in a data bound DataGridView like this. int index = (int)dataGridView1.Columns["SomeColumn"].DisplayIndex; But some how i allways got the "dataGridView1.Columns["SomeColumn"]" to be null. That is it is not set to an object. But if i use the syntax int index = (int)dataGridView1.Columns[0].DisplayIndex it works fine! Any ideas? Ive got nothing :) Thankz

    C# database help question

  • EnumChildWindows
    K Knoen

    Thank you for that! It works lika clockwork now :)

    Visual Basic beta-testing performance help question code-review

  • EnumChildWindows
    K Knoen

    When i call it like this: Public Delegate Function EnumFuncDeleg(ByVal hwnd As Long, ByVal lParam As System.Text.StringBuilder) As Long Declare Function EnumChildWindows Lib "user32" (ByVal hWndParent As Long, ByVal lpEnumFunc As EnumFuncDeleg, ByVal lParam As Long) As Long ' ' ' Inside function EnumChildWindows(ProcessInfo.Handle, AddressOf EnumChildWindow, Nothing) I get an error saying that: System.AccessViolationException was unhandled Message="An atempt was made to read protected memory, this often inditaces that memory is corrupt." What could be wrong? It dosent mater what window i try to enum, i allways get the same results :( :( :( All feedback is welcome :) Thanks :)

    Visual Basic beta-testing performance help question code-review

  • EnumChildWindows?
    K Knoen

    Im trying to enum the childwindows of a application, but when i use the EnumChildWindows in the Windows 32 api i get "A protected area of the memory could not be read" How is it supposed to be done? This is what i have so far. ' Inside main function Call EnumChildWindows(ProcessInfo.Handle, AddressOf EnumFunc, 0) ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' The enum func Public Function EnumFunc(ByVal hwnd As Integer, ByVal lpData As Integer) As Integer Dim lResult As Integer Dim sWndName As String Dim szClassName As String EnumFunc = 1 szClassName = Space(MAX_PATH) sWndName = Space(MAX_PATH) lResult = GetClassName(hwnd, szClassName, MAX_PATH) szClassName = Left(szClassName, lResult) GetWindowText(hwnd, sWndName, MAX_PATH) sWndName = Left(sWndName, lResult) Debug.Print(sWndName + Chr(13)) End Function ' Deligate Public Delegate Function EnumFuncDeleg(ByVal hwnd As Integer, ByVal lpData As Integer) As Integer Any ideas? -Thanks

    Visual Basic debugging json performance question

  • DatagridView relations
    K Knoen

    I have a datagridview that have 7-8 columns. 3 of them is comboboxes with values that the user selects from. I need the second of the comboboxes to change it lists of values depending of the values in the first. The third must change its values depending on the two first. Anyone got any tip? :)

    Visual Basic question

  • Printing landscape pages not working
    K Knoen

    Im trying to print a document in landscape. But it seems my program only print in regular orientation, that is the on ive set in the printer driver under Start->Settings->Printer and faxes. Im using the QueryPageSettings sub when it prints and set e.PageSettings.Landscape = True but nothing happens. Anyone got same problems or have any ideas? Thanks

    Visual Basic question

  • Print pdf´s using acrobat
    K Knoen

    Hi, still does not work. If i use the set keyword it just goes away when i change the row with the marker.

    Jeremy Falcon wrote:

    You need to assign it using the Set keyword. Try this instead... Dim a As AcroPDFLib.AcroPDFClassSet a = CreateObject("AcroPDF.PDF.1")a.LoadFile("atmel_instruction_set.pdf")

    Visual Basic question

  • Print pdf´s using acrobat
    K Knoen

    Im trying to automat Acrobat Reader. I want to print pdf-files. I added a reference to AcroPDFLib and typed the following: Dim a As AcroPDFLib.AcroPDFClass a = CreateObject("AcroPDF.PDF.1") a.LoadFile("atmel_instruction_set.pdf") Now, the object creates itself ok (i think) at least when i check the windows task manager the AcroRd32.exe is running. But when the last line executes i get "Object reference not set to an instance of an object" What am i doing wrong? Thanks in advance

    Visual Basic question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups