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
R

realmontanakid

@realmontanakid
About
Posts
52
Topics
31
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • ADO.NET Entity Framework and create entities at runntime
    R realmontanakid

    Hi, thank u for your reply. Some things can't be changed at this time. However, is there an answer to my question? Kind regards

    Database question csharp database design

  • ADO.NET Entity Framework and create entities at runntime
    R realmontanakid

    Hi, I'm currently working with the ADO.NET Entity Framework. The database design gots a anomaly with its tables. The application design is a little bit awful. The user can login with different companies. So, USER1 logged in on company one, USER2 on company two and so on. For each company exists a copy of each table which can be identified via a prefix. If USER1 is logged in on company one his working tables got the prefix XXA_TableName. If USER2 is logged in on company two his working tables got the prefix XXB_TableName and so on. You don't have to tell me that this is a very dirty database design because i know that (it was not my brainchild). What i need is to create entities at runtime because on design time i don't know on which company the user will log in. If the user log in on company one i have to create an entity for the table XXA_TableName. I hope this is coherent... So, how can i create entities on runtime with the ADO.NET Entity Framework? Kind regards realmontanakid

    Database question csharp database design

  • Catch Dr.Watson Window
    R realmontanakid

    Hi, is it possible to catch the handle of the Dr.Watson dump??? I will start mt.exe (Process.Start) from out a queue to embed a manifest on many .exe files. On some exe files mt.exe don't work and gives an Watson Window. I want to cancel the Watson window so my app don't still stand. I can't catch an Exception on Process.Start(); Thanks

    C# data-structures question

  • Change GUI Style Setup and Deployment
    R realmontanakid

    Hi, is it possible to change the whole style of the user interfaces in an setup and deployment project using VS 2005? I mean to change the font, font-size, background-color and so on... there are no properties available or i don't find them... Best regards

    C# visual-studio sysadmin question workspace

  • NT Service, Assembly Security, Permissions
    R realmontanakid

    Hi @all, i'm realy distressed so i hope someone can help me... What i want ist to call a native function declared in an API dll from a 3rd party application. Ok, it's not hard to do that. The method construction looks like that : BOOL WINAPI theFunc(SomeNotToDescribeObject *pObject, /*out*/LPTSTR szPath)... This method gets an object, generate a file from that and put it in the TEMP folder of the current context. The OUT argument gives me the path where the file have been stored in. That's it. My call: [System.Runtime.InteropServices.DllImport("mydll.dll")] static extern unsafe bool theFunc([MarshalAs(UnmanagedType.Interface)] SomeNotToDescribeObject obj, StringBuilder buffer); StringBuilder buffer = new StringBuilder(260); try { bRet = teFunc(obj, buffer); }... That works... Ok, and where is my problem??? It works just in an windows forms application [with 2003 and 2005]. Not in an C# Windows Service under VS2005. The strange thing with it is that it works on .NET 1.1 service with VS.NET 2003 but not in 2.0 VS2005. I don't understand that yet. The service [2005] i write runs under local system. So, my thought was that the function try to write the filoe into the %userprofile%Temp folder and the service got no rights to write into that folder. So i bending my environment variables for the temp folder [uservariables for the current user] all to c:\windows\temp. The same effect.. It won't work. Then i try to run the service under the local user account, with c:\windows\temp and %userprofile%temp, combined with allow interaction with desktop and so on... Nothing works... The strange thing is that it works in an Windows Forms application under .NET 2.0 on the same machine. I don't think that it is the call that fails. It have to be something with the assembly permissions or whatever... So what is the main difference between an Windows Forms application and an NT service under .NET? I temped to change Service properties like them in the Windows Forms application. Or what is the diffrence between an NT Service written with VS2003 and VS2005? What can i do to call my needed method from my windows service? Regards

    C# csharp help question c++ visual-studio

  • pinvoke COM function and damaged memory [modified]
    R realmontanakid

    Hi, no the first argument is not the problem. I'm testing with a StringBuilder with a capacity from up to 10240 to ensure there is enough space.. but it don't work. That makes me crazy. So, i got a little Form Application with one button, on button click event i call the function and it works. When i do it in a ConsoleApp or a service it will not work. I don't think that my code is ugly.. i think here is something wrong with the hole frame. Is ther probably not enough or to much time between call and passing the function? Or could it be a Thread Problem?

    C# csharp com json performance help

  • pinvoke COM function and damaged memory [modified]
    R realmontanakid

    I can do it with a StringBuilder or like this, byte[] buffer = new byte[512]; unsafe { fixed (byte* pBuffer = buffer) { ret = theFunc(_o, pBuffer); } } The second Parameter is an out param, it gives me a path to a file. If i do it with a StringBuilder or with a pointer to a buffer, it is the same result. In a Windows Forms Application, the buffer is NOT empty, in a Windows Service the buffer IS empty.. I try it on different machines and with different user accounts (Local System, User etc.). In a service it won't work.The com interface is marshalled correct. Attempted to read or write protected memory. This is often an indication that other memory is corrupt." -- modified at 17:29 Monday 16th April, 2007

    C# csharp com json performance help

  • pinvoke COM function and damaged memory [modified]
    R realmontanakid

    Hello, i pinvoke a function from an com api. The function needs two parameters, an com interface and one out parameter. The prototype from the function is BOOL WINAPI theFunc(theObject* pObject, LPTSTR szName); My Call [System.Runtime.InteropServices.DllImport("mydll.dll")] static extern unsafe bool theFunc([MarshalAs(UnmanagedType.Interface)] theItem item, StringBuilder buffer); StringBuilder buffer = new StringBuilder(1024); try { bRet = teFunc(_o, buffer); }... In a normal Windows Application there is no error. The error occured only when i use the code in a c# Windows service. The exception is that the memory might be damaged... AccessViolationException Any ideas? -- modified at 14:54 Monday 16th April, 2007

    C# csharp com json performance help

  • change WindowsForm
    R realmontanakid

    Hi I want to know how to change the skin of a Windows Form. How can I change replace the MaximizeBox of a Windows Form as example. I don't want to use third party components. I just want to write my own stuff. But yet, i don't know how. Can anyone shortly explain how to make my own Windows Form or to replace the header with a grphic.. Thx

    C# tutorial question

  • Convert .png to .gif
    R realmontanakid

    Hi I got an .png Image and want to convert it in an .gif file. When i try to show the .png file in an img tag the backround color of the image is grey. I heard Inetrnet Explorer can't show transparent .png files. So i want to convert it in an .gif file. But after that the background of my .gif file is black.. String gifFilePath2 = System.IO.Path.Combine(path, fileName + "_scaled.png"); String gifFilePath3 = System.IO.Path.Combine(path, fileName + "_scaled.gif"); System.Drawing.Image imgGIF = System.Drawing.Image.FromFile(gifFilePath2); Bitmap bmpGIF = new Bitmap(imgGIF, size); bmpGIF.Save(gifFilePath3, System.Drawing.Imaging.ImageFormat.Gif);

    C# graphics

  • Scale Microsoft.Ink
    R realmontanakid

    Hi I have a problem that realy brings me down. I'm using the Microsoft.Ink SDK in a usercontrol project. Here i implement some functions and push the .dll file in an object tag to a asp.net site. In javascript i call the inner functions of the .dll and get a 64BitString that i save in a hidden field on the asp.net Site. From the 64BitString i create an .gif Image and save this file in the filesystem. I need the .gif in 300 x 300 px but the file that i got have the dimensions of the ink. When i draw just a point of 2 x 2 px the .gif file got the same size. How can i get a .gif file that got the exactly dimensions of the box i'm painting in? My Control where i can paint something got the size of 300 x 300 px. I need exactly that as gif file. Please help.. Best Regards

    C# help question csharp javascript asp-net

  • Convert Ink Data
    R realmontanakid

    Hi I work on a ASP.net Webapplication where a user can interact with the Microsoft.Ink. I push a Windows.Forms.Control on the client. In this control i implement some methods. On the client i can use them by using javascript. I got the following problem. This is the Method in the UserControl that gives me a Base64String.. protected String SerializeInkData() { if(inko.Ink.Strokes.Count > 0) { byte[] inkDataBytes = inko.Ink.Save(PersistenceFormat.Gif); return Convert.ToBase64String(inkDataBytes); } return String.Empty; } And then give it back.. public string InkData { get { if (inko.Enabled) { return SerializeInkData(); } else { return String.Empty; } } } Ok.. on the client I call the InkData Method by using javascript and save the Data into a hidden field. The client app is a asp.net site. While the site is post back to the server i read the content of the hidden field and try to save it in a database. The Column is from datatype IMAGE. But it don't work. I think that i have to convert the string of the hidden field into an byte[] Array.. But how? SqlConnection conn = new SqlConnection(connStr); conn.Open(); string img = this.BodyInkData.Value; //string tmp = this.byteLen.Value.ToString(); string insert = "INSERT INTO TestTable (Image) VALUES ('" + img + "')"; SqlCommand cmd = new SqlCommand(insert,conn); cmd.ExecuteNonQuery(); conn.Close(); How can I convert the string to a byte[] and save as BLOB into the Database? Greeting from Germany -- modified at 3:43 Wednesday 8th February, 2006

    C# question csharp javascript asp-net database

  • Ink with inkobj.dll and classic ASP
    R realmontanakid

    Hi I try to write an Web Application on wich you can draw some lines using the inkobj.dll. In ASP.net, no Problem. You have to create an Windows.Forms.Control wich you can call from an Tag in your ASP.net Webapp. I just want to know if it's possible to draw some lines using classic ASP and the COM Object. Some Code: var oInkColl = Server.CreateObject("MSINKAUT.InkCollector"); oInkColl.hWnd = //HOW?// I think hWnd needs an Form Object.. How can I say that the Window is the IE? I that possible?

    COM question csharp asp-net com sysadmin

  • Microsoft.Ink in an Asp.net or classic Asp App
    R realmontanakid

    got it..

    ASP.NET question csharp asp-net mobile json

  • Microsoft.Ink in an Asp.net or classic Asp App
    R realmontanakid

    Hi Me again. I try Goooogle and found this article.. http://www.code-magazine.com/article.aspx?quickid=0512062&page=1 I think that's it but there is one thing that i don't understand. In the article.. --- Start by creating a new Windows Control Library project and add a reference to the Microsoft Tablet PC API. Then you will Ink-enable the entire surface of the new User Control just the way you would in a Windows Forms application, with just one twist. When you instantiate the InkOverlay object, one of the overrides in the constructor is to hook it up with a control, rather than a Windows handle. Public Sub InkOverlay(ByVal attachedControl As _ Control) This is one of the most important things to remember for using this control in a Web application. You must attach the InkOverlay object to the control itself, not its handle. --- I don't understand this.. Can anyone help me with this.. My Code for the Control looks like this.. namespace INK { public class UserControl1 : System.Windows.Forms.UserControl { private InkOverlay inko; private System.ComponentModel.Container components = null; public void InkOverlay(Control attachedControl) { } private void InkControl_Load(object sender, System.EventArgs e) { inko = new InkOverlay(this); inko.Enabled = true; } public UserControl1() { InitializeComponent(); } protected override void Dispose( bool disposing ) { if( disposing ) { if( components != null ) components.Dispose(); } base.Dispose( disposing ); } } } -- modified at 6:00 Tuesday 31st January, 2006

    ASP.NET question csharp asp-net mobile json

  • Microsoft.Ink in an Asp.net or classic Asp App
    R realmontanakid

    Hi Short Question. Is it possible to work with Microsoft.Ink on Asp or Asp.net? After adding the Tablet PC Api to my Asp.net Project i try to create an instance of Microsoft.Ink.InkPicture. But it seems that it's working only with Windows.Forms.. Is there any other Way to write with a Pen on a Screen using a Webbased Application? Greetings from Germany

    ASP.NET question csharp asp-net mobile json

  • Delete Temporary Internet Files using c#
    R realmontanakid

    Hi It's an account where the User is in the administrator group.

    C# csharp help workspace

  • Delete Temporary Internet Files using c#
    R realmontanakid

    Hi I try to delete my Temporary Internet Files using C# Code. I thought.. no problem, but the only file that was found is the desktop.ini... No other files in that Directory.. private void button1_Click(object sender, EventArgs e) { string dir= Environment.GetFolderPath(Environment.SpecialFolder.InternetCache); foreach (string fileName in Directory.GetFiles(dir)) { File.Delete(fileName); } }

    C# csharp help workspace

  • Working with Byte-Array
    R realmontanakid

    got it.. Thanks a lot

    Managed C++/CLI csharp c++ visual-studio data-structures help

  • Working with Byte-Array
    R realmontanakid

    By using this following error... array ^buffer = gcnew array[1024]; Error 1 error C2065: 'byte' : undeclared identifier Error 2 error C2728: 'cli::array' : a native array cannot contain this managed type Error 3 error C2512: 'cli::array::array' : no appropriate default constructor available c++ is a little bit stranger then #:doh: -- modified at 3:49 Wednesday 28th December, 2005

    Managed C++/CLI csharp c++ visual-studio data-structures help
  • Login

  • Don't have an account? Register

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