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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
J

jjvainav

@jjvainav
About
Posts
4
Topics
3
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • ActiveX in C#
    J jjvainav

    I have a windows control that I need to show in a web browser. I know that you can load a control in a browser using this method: However, the control I need to show, isn't very small and I noticed that the clients machine doesn't save a copy of the control on their computer (only as a temp file). I would like the control to act like an ActiveX where the control gets downloaded on the clients machine once, and not everytime the user browses to site. I have also tried exposing the control for COM and tried (as you can see, I compressed the control in a CAB file): Using this method the control gets downloaded to the clients machine, it is still a .NET assembly it doesn't get registered on the client machine, and thus doesn't get envoked. Does anyone have any ideas, or am I missing something? Thanks in advance Jeremy

    C# csharp com question

  • Font Kerning
    J jjvainav

    I am trying to accomplish Kerning, so far I have it somewhat working. By using the win32 function [DllImport("gdi32.dll", EntryPoint= "SetTextCharacterExtra")] public static extern int SetTextCharacterExtra(IntPtr hdc, int nCharExtra); I am getting spacing between characters. The issue is no matter what value I put for the nCharExtra parameter the spacing is always the same. Here is how I am trying to do it. win32.SetTextCharacterExtra(g.Graphics.GetHdc(), horizontalSpacing); g.ReleaseHdc(); g.DrawString(holdText, this.Font, new SolidBrush(this.ForeColor), 0, 2); I have also tried doing IntPtr hdc = e.Graphics.GetHdc(); Rect bounds = new Rect(e.ClipRectangle); win32.SetTextCharacterExtra(hdc, horizontalSpacing); win32.SetBkMode(hdc, win32.TRANSPARENT); win32.SetBkColor(hdc, ColorTranslator.ToWin32(Color.Black)); win32.DrawText(hdc, holdText, holdText.Length, ref bounds, win32.DT_LEFT); Does anyone know a solution to this issue, or another way in which I can accomplish Kerning? Thanks, Jeremy

    C# graphics help question

  • Problem opening and reading file [modified]
    J jjvainav

    It doesn't even make it that far. The error is thrown when I try opening the stream.

    C# help csharp

  • Problem opening and reading file [modified]
    J jjvainav

    I am trying to read text from a file, however, I keep getting "The process cannot access the file ... because it is being used by another process." The issue is, I know that another process has the file open, but I need to be able to read the file without closing that process. The weird thing is, I can open and edit the text file with notepad, but all the methods I have tried thus far in C# keep throwing the access error. Here is one of the ways I am trying to open the file: FileStream file; TextReader reader; try { file = new FileStream("C:\\file.log", FileMode.Open, FileAccess.Read, FileShare.Read); reader = new StreamReader(file); string test = reader.ReadLine(); MessageBox.Show(test); } catch(Exception ex) { MessageBox.Show(ex.ToString()); } -- modified at 11:55 Friday 16th June, 2006

    C# help csharp
  • Login

  • Don't have an account? Register

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