When i display a Cursor object in a property grid i get a dropdown menu with all the custom cursors and associated images. Is there a way to do this with a custom object so i can display custom images in the same format. I have found an article on this site that give a way to display little rectangle images in the property grid but the cursor images are different. with the cursor the images are larger and square they are also not shown when the dropdown list isnt shown. Can anyone tell me how i can imitate this effect with a custom object or maybe help me to modify the Cursor object to show custom txt and images.
viciouskinid
Posts
-
Images in property grid -
Hide subproperty in PropertyGridyeah I can do that but is there anyway i can hide it at runtime. so i can show it if a certain condition and hide not.
-
Hide subproperty in PropertyGridI am using the property grid and have it doing most things in need. the property grid is loaded with custom class and i have used ExpandableObjectConverter to display subproperties. I would like to know if there is a way to hide one or more of these subproperties at runtime. In the below link they are doing this with the standard font class. is there a way to do the same with a custom class instead of the font class. http://www.eggheadcafe.com/forumpost.aspx?redirect=forumpostsubmission&topicid=2&forumpostid=10158840#Post10158840[^] an example of my custom class is below: public class CustomClass { CustomClassSubProperty m_ccsp = new CustomClassSubProperty(); public CustomClassSubProperty M_ccsp { get { return m_ccsp ; } set { m_ccsp = value; } } } public class CustomClassSubProperty { string m_s = "Hide Me"; public string S { get { return m_s; } set { m_s = value; } } string m_a = "Show Me"; public string A { get { return m_a; } set { m_a = value; } } } Is there a way I can hide the sub property S in the property grid at runtime? Thanks for the help.
-
Network licencethanks very much for the links. I will have a look.
-
Network licenceI am developing some engineering software. It is going quite well and I want to implement network licencing as the copyright protection system for my program. this seems to be the standard for software in my industry basically I believe it works by giving the server a fixed number of licences and it dishes them out to users as required. A popular drafting program, autocad, works like this. My problem is that I have no idea how to implement this in my program. I am not experianced with dealing with servers and cannot find any example code to work with. I have found code that implements licenceing by handing out a key with the software but it isn't as secure as I would like. Can anyone help me out with some open source software? Would also be interested in commercial software. Thanks
-
Programs wont run at workI am sure this is an easy fix, I am not able to run any C# program, that i have compiled at home, on my work machine. I have previously been able to run them on other work computers but this one i cannot. It is a pretty crappy computer running XP. I am sure that it is just an update i am missing. It seems to have .Net 2.0. Can anyone help?
-
Scroll bar apperancegreat thanks!
-
Scroll bar apperanceI am writing a c# program that uses property grids. The problem is that for some reason they are displayed in the basic graphics version, the scroll bars are the standard old grey version. The version that you got in windows 95 (i think), or if you turn on the classic theme in windows. I beleve that the issue is with my current project because when i make a new project, and put a property grid on the form, its scroll bar are displayed correctly, in the current windows theme. does anyone know how to fix this for my current project?
-
Dll FileThanks anyway
-
Dll Filedont really know the difference. All I know is that it is packaged with the program and it contains catalogue data .
-
Dll Fileyeah ok thanks, but I am really looking for an easier solution.
-
Dll FileThere is a dll file in a program I use that contains product information for the program to use. I was wondering is there any way I can gain access to the data in the dll file in a C# project. The file dosent contain anything that I shouldnt have, it is just catalogue information. I have never accessed data from a dll file before and I dont know where to start. I can access the data using Resource hacker but when I tried to add it as a reference to my C# project in Visual studio it gave an error saying that the file isnt a valid com component. I am sure that this is obvious to anyone that has a clue about this, but as you can tell i dont. Can anyone help me access the data in the dll file?
-
UI Delay [modified]I am having some trouble when I try to load some UI. If you can download my code http://www.2shared.com/file/6531405/908ada48/Delay.html[^] and then click on the new file icon the graphics will show. I have 2 issues. firstly the panels, treview and property grids have a small but noticeable delay when they are being shown. You can see the controls incomplete as they are being drawn, it looks really messy. Is there a way to remove this delay? Second, as you can see in the code I have a border around my UI. I dont think just drawing it is the best way to do it because when I resize the main window the refreshing causes the line to flicker. I have resulted in just turning it off when resizing. I think that it is possible to make a custom panel control and have this border drawn onto that. If so, and if it will solve the problem, can someone help me create this control. Thanks As requested my code is below.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;using MyShapesCollection;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
panel1.Visible = false;
}private void toolStripButtonNew\_Click(object sender, EventArgs e) { this.SuspendLayout(); panel1.Visible = true; Paint1(); this.ResumeLayout(); } private void Form1\_Load(object sender, EventArgs e) { } private void panelMB\_Paint(object sender, PaintEventArgs e) { int \_ShadowDistance = -11; Shapes shapes = new Shapes(); Color Main = Color.FromArgb(105, 161, 191); Color Border = Color.FromArgb(210, 230, 250); Color Shine = Color.White; Color Centre = Color.White; shapes.Draw.ShadowedBorder(panelMB, e, \_ShadowDistance, Main, Shine, Centre, Border); } private void toolStripButtonOpen\_Click(object sender, EventArgs e) { panel1.Visible = false; } private void toolStripButtonSave\_Click(object sender, EventArgs
-
Gap detectionI have a big ogg file that contains words in a foreign language one after another with a small but noticeable gap between them. I want to be able to detect this gap and record the time in which it occurs. Is there a way to do this in c#? or could this data be somehow stored in the ogg file itself?
-
File typesThanks for all your help. I was able to get the code for a c# hex editor and it helped me figure it out.
-
File typesI really have no idea. Do you think you would be able to get it to work and share the code with me?
-
File typesno that doesnt work either. is this correct in my code? byte[] st=r.ReadBytes(8);
-
File typesok still no luck I tried the code below: OpenFileDialog fd = new OpenFileDialog(); if (fd.ShowDialog() == DialogResult.OK) { // fd.FileName; // FileStream streamR = new FileStream(fd.FileName, FileMode.Open); BinaryReader r = new BinaryReader(streamR); int count=0; while (true) {byte[] st=r.ReadBytes(8); if ((count > 374855) && (Encoding.UTF8.GetString(st)!=string.Empty)) MessageBox.Show(count + "|" + Encoding.UTF8.GetString(st) + "|"); count++; } } I used UTF8 because there wasnt a UTF16.
-
File typesi am trying to with the following code: OpenFileDialog fd = new OpenFileDialog(); if (fd.ShowDialog() == DialogResult.OK) { FileStream streamR = new FileStream(fd.FileName, FileMode.Open); BinaryReader r = new BinaryReader(streamR); int count=0; while (true) {string st=r.ReadString(); if ((count > 374855)&&(st != string.Empty)) MessageBox.Show(count+"|"+st+"|"); count++; } } I am not getting anything i can read. Any ideas?
-
File typessorry I meant c# not paint. dont know why i wrote that! Can you give me an idea how I can read the data with C#? or is there a way to output to a format that I can use with c#? Regarding the other question. I have a simple datatable that I want to save to a file. How should I do this. Thanks for the help.