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
C

Chrispie123

@Chrispie123
About
Posts
33
Topics
22
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Coverting MP3's to MP3 Pro VBR
    C Chrispie123

    Hello Everyone, I am making use of podcast's very often. And in some versions of the podcast the quality is very low and have some scratching sounds in them. And I do not like to listen to them like that. So I started to play with different file formats. I have a very old music match version that converts from MP3 to MP3 Pro VBR file format. In this format the scratches is hardly noticeable. But I do not like Music Match on my system as it has plenty of bugs and known problems with vista onwards - or at least my version that i should have chucked 100 years ago - Don't get me wrong Music Match is great :) Not trying to make the product bad. But anyhow... Does anyone know of any open source library that I can embed in a C# project to convert the files to the same file format? I would really appreciate it :) Thanks, Chrispie

    C# csharp regex question announcement

  • Improve on finding solutions or expandable solutions
    C Chrispie123

    Hello, I am 25 yrs old. I have knowledge in Magic, C#, VB.NET and currently studying Java/JSP. I have worked on MS SQL Server ’05 & ’08 and oracle (mostly from a developer perspective e.g. writing stored procedures and table design). There is so many ways to improve your programming concepts and I will be honest I do not know half of the ‘stuff’ out there. But I want to improve my knowledge of logic design. Sometimes you have scenario A (because that is that the business requirement states) but solution A may be extended to have a more general design and more expandable solution. I do believe that I need to improve on that. Can anyone recommend a good book for solutions or even a forum that I can get involved in to help my ‘best practices’ to improve. I love development. So many of my fellow developers move to BA positions or … . I see myself as a senior developer, as I do not want to do anything else in the future. It is not that I do not have ambition. I just love coding. {hehe} Might do the solutions architect thing… Thanks, Chrispie

    IT & Infrastructure csharp java database sql-server

  • Unable to cast COM object of type 'magic.magicClass' to interface type 'magic.Dmagic'.
    C Chrispie123

    Hi Everyone, I need help. My deadline is tomorrow and I have been at this for almost 2 weeks now. I need to call a com object from a C# or VB.NET dll that is called by a third party app (TIPCO). The com object takes in a string and returns a string. I have the following: 1. A .net dll that calls the com (my wrapper) 2. A .net dll that calls my wrapper dll and this is the entry point for calling applications (basically .net is my intermediary) (Please not when referring to a dll I am referring to a class library object) My Code looks as follows My C# dll that calls the com object (wrapper) I have a C# wrapper that calls the com object

    Public Class Class1
    Public Sub callMagicDLL(ByRef input As Integer, ByRef output As Integer)
    Dim myownClass As New CallWithMain()
    myownClass.Main()
    End Sub
    End Class

    Imports System.Runtime.CompilerServices
    Imports System.Runtime.InteropServices

    Public Class CallWithMain

    Dim a As Integer
    Dim b As Integer
    
    <STAThread()> \_
    Sub Main()
        Dim mymagicdll As New magic.magic       'Com object
        Dim a As Integer = 1
        Dim b As Integer = 1
        mymagicdll.magicdll(a, b)
    End Sub
    

    End Class

    Then another C# dll project to call the dll above, that consists of an interface and a class that implement it

    Option Strict Off
    Option Explicit On

    Imports com.tibco.matrix.clr
    Imports System
    Imports System.ComponentModel
    Imports System.Diagnostics
    Imports System.Web.Services
    Imports System.Xml.Serialization

    Namespace www.example.com.com.tibco.amx.sample.helloworld.simple.java.soa

    '''<remarks/>
    <System.CodeDom.Compiler.GeneratedCodeAttribute("System.Web.Services", "2.0.50727.1433"), \_
     WebServiceInterface(MethodParameters:="InputMsg", PortTypeName:="HelloWorldPT", PortTypeNamespace:="http://www.example.com/com.tibco.amx.sample.helloworld.simple.java.soa/", WSDLLocation:="HelloWorld\_HelloWorldPT.wsdl")> \_
    Public Interface IHelloWorldPT
    
        '''<remarks/>    
        <System.Web.Services.WebMethodAttribute()> \_
        Function sayHello(<System.Xml.Serialization.XmlElementAttribute(\[Namespace\]:="http://ns.tibco.com/Hello/")> ByVal HelloRequest As String) As String
    End Interface
    

    End Namespace

    And then the class that implements the interface

    Imports com.tibco.matrix.clr

    Namespace ActiveMatrixComponent1
    <ServiceImplementation()> Public Class HelloWorld_HelloWorldPTImpl

    COM csharp java dotnet wcf

  • Calling Com object From C# to add 2 numbers
    C Chrispie123

    Ok so I tried to do the same thing in VB.NET. I usally work in a console application for ease and once I have succeded I will convert or redo what every I have to do. The console application in VB.NET is by default in a module. If I do the following in VB.NET from the module

    Console.WriteLine("Start")
    Dim dllRef As New sumdll.sumdll() //Only this one method is available… It is indicated as an interface

        Dim a As Integer = 10
        Dim b As Integer = 18
        Dim c As Integer = 0
        Dim d As Double = 0.0
    
        d = dllRef.sumdll(a, b, c)
    
        Console.WriteLine("Done")
        Console.WriteLine(a)
        Console.WriteLine(b)
        Console.WriteLine(c)
        Console.WriteLine(d)
    

    Console.Read() But if I move the same code to a class I still get the same error as before. Why can’t this be called from a class? If I can get this to run from a class I am sure I will be able to call this from C#. Thanks, Christiaan

    COM csharp visual-studio com help tutorial

  • ASP.NET Provider and DAL
    C Chrispie123

    Hi I agree that placing connection strings in the UI's config in not a very good practice to persue. My project currently is small and it is only me that develops it. But over time it can grew to a couple of 1000 users and we will have to get in other developers. The whole membership works cool with roles and everything. I will appreciate the articles. Thanks

    ASP.NET csharp question asp-net database help

  • Calling Com object From C# to add 2 numbers
    C Chrispie123

    Good Morning, I need to call a dll from C# that was generated by magic edeveloper. I think it is a C dll. It is a program that takes in 3 parameters all integers. Adds the first to and pass the sum to the 3rd parameter. I have registered the dll in windows and I can add a reference in visual studio via the Project  Add Reference menu. I have the following code in my project

    int a = 5;
    int b = 6;
    int sum = 0;
    double sumDouble = 0;
    sumdll.sumdllClass sdc = new sumdll.sumdllClass();
    sumDouble = sdc2.sumdll(ref a, ref b, ref sum);

    But if I run it I get the error

    Unable to cast COM object of type 'sumdll.sumdllClass' to interface type 'sumdll.Dsumdll'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{3DC9FCBA-9E72-49AA-B597-F9B2603D5EEA}' failed due to the following error: No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE)).

    the following is available from the intellisense

    sumdll.sumdllClass sdc = new sumdll.
    Dsumdll which is an interface
    Sumdll which is an interface
    sumdllClas which is a class

    And in the line

    sumDouble = sdc2.sumdll(
    ref int input1, ref int input2, ref @input)

    Does anyone know I am getting this error? Or how to call the dll correctly. Regards, Christiaan Pieters

    COM csharp visual-studio com help tutorial

  • ASP.NET Provider and DAL
    C Chrispie123

    I have searched the web for articles on how to create a custom membership and provider to move this to the DAL layer and have only find articles that do something simular for legacy programs. Is this not the right patht to go along anymmore?

    ASP.NET csharp question asp-net database help

  • ASP.NET Login
    C Chrispie123

    Good Morning, Space (actual width and hight) on my screen is an issue and we need to keep it to the bare minimum. I am using normal login controls. I have come accross a site where the label in front of the edit box... e.g. "User name" and "Password" is inside the box where you type when it is empty and as soon as you start typing the values disappear. if you clear what you inserted and tab of it sets the values back. It is like the null value is set. Does anyone know how i should do that? Thanks Christiaan

    ASP.NET csharp asp-net help question

  • ASP.NET Membership
    C Chrispie123

    Good Morning, My web site is hosted by a web hosting company. How do I access the ASP.NET configuration to setup roles etc.... Normally I would go to tools and then ASP.... in visual studio from my PC. Regards, Chris

    ASP.NET csharp workspace asp-net visual-studio hosting

  • Running ASP.NET from your flash like apache
    C Chrispie123

    Hi I will rephrase the question. What I mean is is it possible to host a web site from your flash drive or memory stick with ASP.NET as you can with appache? Thanks Christiaan

    ASP.NET csharp asp-net apache adobe question

  • ASP.NET Provider and DAL
    C Chrispie123

    Hi Thanks for your input. :) Is it really worth going through all the trouble to implement a DAL layer? What is the cons of creating your own role-based security model? And how much work are we talking about. I am fairly new to ASP.NET. Coded alot in VB.NET and C#. When you did this how many stops did you find along the way? Thanks Christiaan

    ASP.NET csharp question asp-net database help

  • DB access password
    C Chrispie123

    Hi What I dont understand is if I were to make it the DB owner. What prevents someone from getting that login and password onto my database and change data? can the config file be access from the outside word? Many Thanks, Chris

    ASP.NET database architecture question workspace

  • ASP.NET Provider and DAL
    C Chrispie123

    Good Afternoon, I am new to ASP.NET. I am used to C# windows delveloper. In all my previous projects we had a seperate solution to handle the Data Access Layer. This layer had all the logic for logging in and communicating with the database. How do I move the Login (currently I am using Memberships that is setup in my config file) to the DAL layer? Should it be in the DAL layer? Thanks for all your help. Chris

    ASP.NET csharp question asp-net database help

  • DB access password
    C Chrispie123

    Hi Abhishek Thanks for your reply. Currently I have the SA user in the config file for testing. ...Which earns me a BAD award :( ...but it is only on my local PC. :) If I were to create a new user to use what rights and roles should I grant the user? Thanks for your reply, Chris

    ASP.NET database architecture question workspace

  • Running ASP.NET from your flash like apache
    C Chrispie123

    Good Afternoon, I know it is possible to host a site from your flash using apache. Is it possible doing the same with ASP.NET? Thanks in advance, Chris

    ASP.NET csharp asp-net apache adobe question

  • DB access password
    C Chrispie123

    Good Afternoon, Can someone please point to me how the architecture of a web site where database access is required should be used… I have a site that connects to a SQL express database and I have a provider setup in the web config file to access the database. If a user logs into the site they will use this username and password to access data and determine if it is a valid user. (This password is at this time unencrypted) If someone should get hold of this password they can have access to the database and do what they want to. Is this correct? Or should I do something else? Also what roles should this common user have? Thanks, Chris

    ASP.NET database architecture question workspace

  • WPF vs....
    C Chrispie123

    Hi Everyone, I am developing a web site that will be commercial but i want a really nice look and feel it. What will be the best to use? Is WPF a good approach? If so where may I find good look and feel of existing web sites to show to my customer? How easy is it to maintain? I also heard that search engines are capable of getting all keywords if you use Silverlight/WPF. How true is that and would you recommend WPF? Thanks Chris

    WPF csharp visual-studio wpf sales question

  • Datagridview Cellformatting
    C Chrispie123

    Hi I need help regarding the cell formatting event for the datagridview control in windows forms. I looked on the web and I cannot seem to find a perfect solution for this. I am using VS 2008 and code in VB.NET. I have a datagridview with many fields amongst which I have an Effective from date. If the effective from date is smaller than today’s date certain fields should be disabled and made a funny color.

    Private Sub DGV1_CellFormatting(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellFormattingEventArgs) Handles DGV1.CellFormatting
    Try
    If e.RowIndex >= -1 And e.RowIndex <= DGV1.RowCount Then 'Basic index validation
    If Not ((DGV1 Is Nothing) OrElse (DGV1.Rows(e.RowIndex) Is Nothing) OrElse (DGV1.Rows(e.RowIndex).DataBoundItem Is Nothing)) Then

    		Dim dgvRowState As DataRowState = DirectCast(DGV1.Rows(e.RowIndex).DataBoundItem, DataRowView).Row.RowState
    		
    		'The idea here is to check that it is only for Non Added/Detatched rows where the Effective From Date is smaller than today
    		If Not (dgvRowState = DataRowState.Added OrElse dgvRowState = DataRowState.Detached) \_
    		   AndAlso e.ColumnIndex = EffectFromDataGridViewTextBoxColumn.Index AndAlso CDate(e.Value).Date < Date.Now.Date Then
    			e.CellStyle.BackColor = My.Settings.ReadOnlyColor
    			DGV1.Rows(e.RowIndex).Cells(e.ColumnIndex).ReadOnly = True
    			DGV1.Rows(e.RowIndex).Cells(Field1.Index).ReadOnly = True
    			DGV1.Rows(e.RowIndex).Cells(Field2.Index).ReadOnly = True				
    
    			DGV1.Rows(e.RowIndex).Cells(Field1.Index).Style.BackColor = My.Settings.ReadOnlyColor                            
    			DGV1.Rows(e.RowIndex).Cells(Field2.Index).Style.BackColor = My.Settings.ReadOnlyColor
    			DGV1.Rows(e.RowIndex).Cells(e.ColumnIndex).Style.BackColor = My.Settings.ReadOnlyColor
    			
    		End If
    	End If
    End If
    

    Catch ex As IndexOutOfRangeException
    Exit Sub 'Exception added to aviod the following behaviour... When the user adds a new line enters a value and use the mouse to
    ' navigate to another line, the current new row will be cleared and the cellEndEdit event will be fired. inwhich case the DGV contains
    ' a blank row that is not dirty. The row "DGV1.Rows(RowIndex).DataBoundItem" part gives an exception for this row
    End Try

    This works well… But the problem I am having is when I go to a row where the Effective from date is greater than today and where cells is not read only and change the effective from date to the past that row also changes. I don’t want this to h

    Visual Basic help csharp database visual-studio

  • Combobox in DataGridView
    C Chrispie123

    Good Morning I am having a common problem I suppose but it seems I cannot find a solution... Don't know if I am searching for the correct thing.... If you know of a place to look please let me know... In my DataGridView if I park on a new line and hit F2 (or ALT+Down) and hit enter to go to the next row... It doesn't select the value that is selected. I have to go up and down (choose another and the first selected one again) for the value in the combo to update the value in the grid. Should I update the value manually on the Combo OnLeave or something like that... Thanks for your help, Christiaan

    Visual Basic help css algorithms announcement

  • Bindingsource Filter help please?
    C Chrispie123

    Hi Everyone Sorry for the delay but I was on leave for 2 days. For some reason when I apply the filter on the bindingsource it changes my data. I did look at all the original / current / proposed values and they are all the same.... Don't know why this happens. The work around that I did was, after I apply the filter, I Accept the changes. Thanks for your help... Christaan

    Visual Basic help debugging tutorial 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