|
Many thanks, Zac. I've downloaded it and I'll look at implementing it into the control I've been working on.
"I do not have to forgive my enemies, I have had them all shot." — Ramón Maria Narváez (1800-68).
"I don't need to shoot my enemies, I don't have any." - Me (2012).
|
|
|
|
|
No problem.
Bob Dole The internet is a great way to get on the net.
2.0.82.7292 SP6a
|
|
|
|
|
Zac, I ran into a problem which I'll explain. I downloaded the ColorDialogEx, unzipped it and loaded the solution in VS2012, compiled it, successful. There were a couple of minor warnings telling me == and != were implemented but no override for Object.Equals and Object.GetHashCode have been defined, but nothing serious.
I then created a new winform app in 2012 and I added the ColorDialogExe.dll to the General toolbox category. It added a few components. I selected the ColorPickerCombobox component and dropped it on the form. It shows correctly. I didn't change any of the properties, etc.
When I run the app it throws an exception in ImagesUtil's GetToolbarImageList. Here's an extract of the exception:
System.ArgumentException was unhandled
HResult=-2147024809
Message=Resource 'ColorPicker.Resources.popupcontainerbuttons.bmp' cannot be found in class 'resfinder'.
Source=System.Drawing
StackTrace:
at System.Drawing.Bitmap..ctor(Type type, String resource)
at ColorPicker.ImagesUtil.GetToolbarImageList(Type type, String resourceName, Size imageSize, Color transparentColor) in c:\Temp\ColorDialogEx\ColorDialogEx\Resources\Images.cs:line 13
at ColorPicker.PopupContainerImages.ImageList() in c:\Temp\ColorDialogEx\ColorDialogEx\Resources\Images.cs:line 63
at ColorPicker.PopupContainerImages.Image(eIndexes index) in c:\Temp\ColorDialogEx\ColorDialogEx\Resources\Images.cs:line 68
at ColorPicker.DropdownContainer`1.OnPaint(PaintEventArgs e) in c:\Temp\ColorDialogEx\ColorDialogEx\DropdownContainerControl.cs:line 335
at System.Windows.Forms.Control.PaintTransparentBackground(PaintEventArgs e, Rectangle rectangle, Region transparentRegion)
at System.Windows.Forms.Control.PaintBackground(PaintEventArgs e, Rectangle rectangle, Color backColor, Point scrollOffset)
at System.Windows.Forms.Control.PaintBackground(PaintEventArgs e, Rectangle rectangle)
Do you think I need to do something else before I can use it?
"I do not have to forgive my enemies, I have had them all shot." — Ramón Maria Narváez (1800-68).
"I don't need to shoot my enemies, I don't have any." - Me (2012).
|
|
|
|
|
Let me look at it again. I thought I fixed that.
Bob Dole The internet is a great way to get on the net.
2.0.82.7292 SP6a
|
|
|
|
|
Fixed it. Try downloading it again. Same link as before.
I forgot to modify one of the resource finder things.
Why the original author did not use the built in resource management and basically (and incorrectly) rebuilt it is beyond me.
Bob Dole The internet is a great way to get on the net.
2.0.82.7292 SP6a
|
|
|
|
|
Thank you, Mr. Speedy Zac. I will download it and try again.
"I do not have to forgive my enemies, I have had them all shot." — Ramón Maria Narváez (1800-68).
"I don't need to shoot my enemies, I don't have any." - Me (2012).
|
|
|
|
|
PHS241 wrote: Mr. Speedy Zac.
That's a first. I usually am called 'Slow' by people because I like to think things through before trying them. It usually works out better that way.
Bob Dole The internet is a great way to get on the net.
2.0.82.7292 SP6a
|
|
|
|
|
Here is my code:
class dbLocalDB : DataManager
{
private System.Data.Common.DbConnectionStringBuilder BldrLocalDB = new System.Data.Common.DbConnectionStringBuilder();
public System.Data.Common.DbConnectionStringBuilder ConnectionString
{
get { return BldrLocalDB; }
set
{
BldrLocalDB.ConnectionString = XenoManager.Properties.Settings.Default.csLocalDB;
}
}
}
public partial class Form1 : Form
{
dbLocalDB LocalDB = new dbLocalDB();
public Form1()
{
InitializeComponent();
try
{
tb_LocalDBServerURL.Text = LocalDB.ConnectionString["Data Source"].ToString();
tb_LocalDBDatabase.Text = LocalDB.ConnectionString["Initial Catalog"].ToString();
tb_LocalDBUsername.Text = LocalDB.ConnectionString["User ID"].ToString();
tb_LocalDBPassword.Text = LocalDB.ConnectionString["Password"].ToString();
}
catch (Exception ex)
{
textBox1.Text = ex.ToString();
}
}
}
I get the following error "System.ArgumentException: Keyword not supported: 'Data Source'. at System.Data.Common.DbConnectionStringBuilder.get_Item(String keyword)"
I think what's happening is BldrLocalDB.ConnectionString isn't being populated. If I had:
System.Data.Common.DbConnectionStringBuilder bldrLocalDB = new System.Data.Common.DbConnectionStringBuilder();
bldrLocalDB.ConnectionString = Properties.Settings.Default.csLocalDB;
in "public partial class Form1 : Form", it'll populate, but how do I populate it in the dbLocalDB class?
Thanks!
|
|
|
|
|
Not every connectionstring provides a datasource[^]; what does the actual string look like?
|
|
|
|
|
Hi,
Ive got a Treeview with scrollable enabled. On my developing PC everything works fine. When i resize my window, the scrollbar appears.
But when I run the .exe on another PC (even when its installed by an setup installer), there are no scrollbars! I've tried on 3 different PCs. All PCs are using Windows 7 and the required .Net4 is installed. I dont know whats the problem. Everything else works . Please help.
Edit: Okay, the Problem appears when i use the treeview in a SplitContainer. Is this a know issue and is there a workaround? i really need those splitcontainers.
Edit: Got it! Each Element within a splitcontainer panel has to have the dock property set to "Fill". Now it works .
Any ideas?
Thanks
|
|
|
|
|
I've done that, although it took me about 6 months to notice than anything was wrong!
|
|
|
|
|
Hi there!
I am trying to compare the rows of a Datagridview and that it removes the rows that are repeated.
I think that I´m doing something wrong, need some of help!!
my mind is not clear today! (maybe x-mas holyday! )
here´s the code:
public void Compare(DataGridView grv)
{
grv.Sort(grv.Columns[0],ListSortDirection.Ascending);
for ( int row = 0; row < grv.Rows.Count; row++)
{
for ( int col = 0; col < grv.Columns.Count; col++)
{
int rowx=1;
if (grv.Rows[row].Cells[col].Value != null && grv.Rows[row].Cells[col].Value.Equals(grv.Rows[rowx].Cells[col].Value))
{
if (col == grv.Columns.Count - 1)
{
grv.Rows.RemoveAt(row);
grv.Sort(grv.Columns[0], ListSortDirection.Descending);
}
}
else
{
grv.FirstDisplayedScrollingRowIndex = grv.RowCount - 1;
grv.Rows[grv.RowCount - 1].Selected = true;
}
}
}
}
|
|
|
|
|
hi,
you forgot the a counter if all cols in a row are equal to the ones in rowx? in this case you would delete the row always if the last col is equal. Maybe thats it?
cu
|
|
|
|
|
Hi all,
Adding an optional field to my class instantly prevents older versions from being deserialized:
[OptionalField]
public Aurigma.GraphicsMill.Bitmap origStaticImage = null;
This is baffling; optional fields are supposed to PREVENT this! The [NonSerialized] attribute produces the same behavior. I have many other optional fields in this class that have been added over the years, and they work perfectly. If I remove the field, I can again deserialize older versions.
Any suggestions how to get around this? Thanks!
====================
Solved it; an exception was being thrown in my RunAfterDeserialization method, making it appear that deserialization had failed. Doh!
"Microsoft -- Adding unnecessary complexity to your work since 1987!"
modified 6-Dec-12 11:50am.
|
|
|
|
|
Hi thanks in advance,
I really need to know is how to expose a layer of memory data on data tables that can be updated from time to time and who are available for consultation in memory for faster access and query the database to each time.
|
|
|
|
|
RICARDOR270874 wrote: I really need to know is how to expose a layer of memory data on data tables that can be updated from time to time and who are available for consultation in memory for faster access and query the database to each time.
Memory is a volatile space; loose power to the PC, you loose data.
If your database "feels" slow, I suggest you first look at the structure, rethink the indexes, partitioning. Reading data from a harddisk (not even talking SSD) is very fast, and unlikely to be the bottleneck.
If you "want" an in-memory-database, take a look at TimesTen[^].
|
|
|
|
|
I have the need to localize the ColorDialog at runtime. I know it grabs its culture from the version of Windows running on the machine.
I have an app that I allow switching the language through its configuration and it works fine to set the strings using ResourceManager class. I would like to do something similar with the ColorDialog also.
Is there any way to do it easily? I am using C# for my app.
|
|
|
|
|
I don't think there is an easy way for doing that. What I am doing is hosting this control[^] in a custom dialog and localizing that dialog.
I am sure searching this site will bring up some more information, but I am too tired to do anything else right now.
Hope this helps!
Bob Dole The internet is a great way to get on the net.
2.0.82.7292 SP6a
|
|
|
|
|
I have an enum definition that I wanted to put in my interface, but I'm getting a compilation error:
Mode: interfaces cannot declare types
public enum Mode
{
Off = 0,
On1 = 1,
On2 = 2
}
and the interface has a method in it that classes implementing it must define, where I want to pass the mode as a param:
int ProcessTWrit(ref Byte[] wDat, ref Byte[] sDat, ref Byte[] dataCk, int theMode);
So, I had to put separate definitions of the enum in both my El.cs and the class that it's calling through the interface.
I have my El.cs that I have also defined the enum above and want to call the above method:
result = cr.ProcessTWrit(ref wDat, ref sDat, ref dataCk, (int)Mode.On1);
My question is, is there a way that I can put my Mode enum in the interface so that the calling class and the receiving class can pass/use the enum values, so I don't have to have multiple definitions of the enum? There doesn't seem to be any other class that it would make sense for me to put the Mode definition in. This is a factory implementation. It looks like this:
El.cs =======> iCR.cs ==========================> CR5.cs
..........calls................ ProcessTWrit()................................................................ ProcessTWrit(){}
with multiple definitions of Mode in El.cs and CR5.cs. The three classes discussed above are in separate Visual Studio projects, if it makes a difference.
|
|
|
|
|
If the existing projects don't reference each other then the only other way is to create another common project (dll class library), put any common objects in there and reference the new project (after building) in the existing ones
|
|
|
|
|
MichCl wrote: class ... to put the Mode definition in
An enumeration is a type and doesn't need to be in a class. You could put the enumeration and interface definition in their own project/DLL and reference it from the others, but generally a DLL should hold more than just those two things.
|
|
|
|
|
i want to develop a small communication apps like there will be one wcf service hosted in server and one desktop client would be there. suppose two people interact in each other through wcf service. when client1 will send data to client2 then data will go to wcf service and wcf service will push the data to client2. developing basic communication application with the help of wcf service easy. i want to add one utility into our apps called screen sharing.
client1 will send his desktop screen to client2. i know it is very easy to capture desktop image and convert the whole image to byte array and then pass the byte array to client2 and client2 can convert the byte array to image and set the image to his picturebox.if i send the whole image over the network every time then performance will be bad and slow. so i need to know how people develop apps to share their screen with other and how they send minimum data over the network. i search google a lot to get actual standard though but got none.
so i request every one of this forum please discuss this issue in detail with real life concept.
My Points are
----------------
1) just tell me how could i send the difference only between two images over the network instead of sending whole image again & again. lots of image processing library available which can be use to get the difference between two images but i do not know which one is the best and would be very faster....just take few ms to get the difference between two images.
2) after extarcting difference between two images i can send the difference over the network but on the client2 side how can i apply the difference on the present image. this is very important.
3) when picturebox will be updated frequently at client2 then a flicker may be noticable. how could i avoid this flicker rather how could i achieve the smooth change over of the images on client2 side.
the way i need the help like if it would be possible then please suggest me library with code snippet which i can use to extract the difference between two images.
also tell me what routine i can use to apply the diff on the current image at client2 side.
again tell me how could i achieve the smooth change over of the images on client2 side without flickering.
lots of scholar person visit this forum every second so i would expect good discusion in detail with pesudo code in c#. thanks
tbhattacharjee
|
|
|
|
|
Tridip Bhattacharjee wrote: 1) just tell me how could i send the difference only between two images over the network instead of sending whole image again & again. lots of image processing library available which can be use to get the difference between two images but i do not know which one is the best and would be very faster....just take few ms to get the difference between two images.
Getting the "difference" could be done by comparing each pixel, and making a list of all the pixels that aren't equal. Knowing which pixels differ is not enough to recreate the second image based on the original and the differences - you'd need to know their "new" values. See here[^].
AFAIK, there's no "competition" where the graphics-libraries are compared to each other objectively. I've heard some good things on the AForge.NET open source framework[^] on the forums here, but still, you'd have to try and experiment.
Alternatively, you could do a binary diff, comparing the raw data. An image is an array of bytes after all, and comparing those might be faster.
Tridip Bhattacharjee wrote: 2) after extarcting difference between two images i can send the difference over the network but on the client2 side how can i apply the difference on the present image. this is very important.
That's the reason why most screen-sharing applications do not "send images" back and forth.
Tridip Bhattacharjee wrote: 3) when picturebox will be updated frequently at client2 then a flicker may be noticable. how could i avoid this flicker rather how could i achieve the smooth change over of the images on client2 side.
Set double buffering on.
Tridip Bhattacharjee wrote: lots of scholar person visit this forum every second so i would expect good discusion in detail with pesudo code in c#. thanks
I'm not a scholar, but I suggest you look into the RDP-protocol.
|
|
|
|
|
thanks for your discussion. you said two things very briefly which is not very clear to me.
you said
"Alternatively, you could do a binary diff, comparing the raw data. An image is an array of bytes after all, and comparing those might be faster."
can you drive me to few sample code or article from where i can know how to do binary diff on image and get the difference.
you said
"That's the reason why most screen-sharing applications do not "send images" back and forth."
if any screen sharing apps do not send image then how they send change to other end. please tell me in details whatever you know about how screen sharing apps send change to other end again and again.
i would expect good discussion on the above 2 points. thanks a lot.
tbhattacharjee
|
|
|
|
|
Tridip Bhattacharjee wrote: can you drive me to few sample code or article from where i can know how to do binary diff on image and get the difference.
Binary diff is simple to explain; you calculate the difference between two arrays of byte.
Tridip Bhattacharjee wrote: please tell me in details whatever you know about how screen sharing apps send change to other end again and again.
http://en.wikipedia.org/wiki/Remote_Desktop_Protocol[^]
Tridip Bhattacharjee wrote: i would expect good discussion on the above 2 points.
Why?
|
|
|
|