|
Thanks for a very quick reply Giorgi. Let me go through it and write back to you if it works for me.
|
|
|
|
|
Wonderful . It worked!! Thanks again.
Syed Mehroz Alam
|
|
|
|
|
Glad to help you
Giorgi Dalakishvili
#region signature
my articles
#endregion
|
|
|
|
|
I have two questions
1.I have a 2 diffrent forms. From one form to another how can switch?
let say I have button control to go for it.
2.I have a Datatable and want show each row data on a different label control.
So each row shoul be displayed on o different group of label controls.
Can I bind in this way, how? Currently I am reading each row data and displaying
on label controls.
Thanks,
Muharrem
|
|
|
|
|
1 - Just show/hide it.
2 - One label for one row ? iterate through each row, create Label instance and add to the form.
|
|
|
|
|
1.) Use the Form.Show() and Form.Hide() methods.
2.) One thing you can do with your label instances is to organise them into a collection such as a list as List<Label>. Write some method that would retrieve the data from the database and fill the Labels' text. Do this on a timer tick if you need your form to reflect the changes done to your database dynamically.
|
|
|
|
|
I have a DataGridView which is binded to BindingSource that receive data from WCF service.
My problem is that I would like to sort data (rows).
Does anybody knows the way of sorting rows(DataGridView ) or BindingSource.
thnks
|
|
|
|
|
check out the DataView class, it might help
good luck
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
|
|
|
|
|
Can anyone specify a 3d geometry library with all functionalities.
|
|
|
|
|
OpenCASCADE. It's all in C++ but there are a few wrappers for C# floating about. Alternatively, you can purchase Eyeshot which looks pretty impressive. Hope this helps.
|
|
|
|
|
hi all,
I have a custom user control which will draw a grid as a background by using
Bitmap bit = new Bitmap(Width, Height, e.Graphics);<br />
Graphics gpb = Graphics.FromImage(bit);
and i have been override OnPaintBackground(PaintEventArgs e) to prevent paint background frequently.
My question is how to make a Drawline object like normally AutoCAD do .Example,user can select Drawline button and start to draw a line on the grid and allow to draw as many they want.(if possible,i would like to know the logic or concept behind).The purpose i separate the Drawline object with the background is to allow user to move or delete the certain line using mouse.
Any ideas ,tips or suggestion are welcome
note:i have an example of drawtools but i am confusing on it(it may too complicated to me )
http://www.codeproject.com/KB/graphics/drawtools.aspx[^]
http://www.codeproject.com/KB/graphics/OpenS-CAD.aspx[^]
Thanks in advance
cocoonwls
modified on Wednesday, July 2, 2008 3:50 AM
|
|
|
|
|
i sugest you make a double buffered panel fisrt, so that image doesnt flicker...
to create the doubleBufferPanel add this class to a .cs file in your project
namespace DoubleBufferPanelNameSpace
{
class DoubleBufferPanel : Panel
{
public DoubleBufferPanel()
{
this.SetStyle(ControlStyles.AllPaintingInWmPaint |
ControlStyles.UserPaint |
ControlStyles.DoubleBuffer |
ControlStyles.ResizeRedraw,
true);
this.UpdateStyles();
}
}
}
i had some issues with the designer generated code, that's why it has its own namespace.
compile the project, you'll see the double buffer panel show up in the toolBox. this is the object youll draw on.
youll be interected in the Panel_MouseClick event for its Args object which will give you the X Y coordinates of the mouse pointer which can be saved as a Point object for use in the Panel_Paint event.
hope this helps
good luck
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
|
|
|
|
|
Hi,
yes,i got your idea.But according to your suggestion,how can i put the onpaint method into each line object?Because i don't want all the line object repaint everytime when one of them changed(change location or line width). And the below description i was found is describe what i actually want..
store drawable objects in an array. Each drawable object knows how to draw itself.
On repaint, just iterate over the array of drawable objects.
So for a line, create a Line class that implements IDrawable.
Store the state of the line in the line object so that the line knows where it goes and
what it looks like. The OS clips the drawing to the dirty drawing rect so that
only the dirty portion of the screen is redrawn.
If you call invalidate the entire screen will be redrawn.
thanks in advance
regards
cocoonwls
|
|
|
|
|
ok, heres what im thinking...
youll have to create a class named line and you have to inherit it from IDrawable...
now what is a line? i line is two points and a point is two X Y coordinates, so your line object will have two Point objects with properties. In the constructor for the line object we will pass two points, for the lines starting position.
im not sure about the "Each drawable object knows how to draw itself" part but im thinking inheriting from the IDrawable interface gives you that functionality... so go google that interface
heres the basic idea for your line object...
class Line : IDrawable
{
public Line(Point startingPoint1, Point startingPoint2)
{
p1 = startingPoint1;
p2 = startingPoint2;
}
private Point p1;
public Point P1
{
get
{
return p1;
}
set
{
p1 = value;
}
}
private Point p2;
public Point P2
{
get
{
return p2;
}
set
{
p2 = value;
}
}
}
now in your main program you can create instances of these line objects and put them in a line array
hope this helps
good luck
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
you.suck = (you.passion != Programming)
|
|
|
|
|
Hi,
I am using c# and SAPI 5.1. Is it possible to use MS SAPI 5.1 for different languages like french, spanish.,
How to use the SAPI 5.1 to use multiple languages?
Thank you
Thanks & Regards,
Venkat
|
|
|
|
|
hi,
i am using windows application and my code behind is c#.....
i ma new to crystal report...
i have created crystal report ...... now i need to create dynamic font size tell me how to create it.....
regard's
vidhya.s
|
|
|
|
|
Try google?
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
i have tried but its like creating crystal report with dataset...
so i didnt get any artical related to my task...
thats y i am asking in ur forum..
|
|
|
|
|
|
Try this :
Bitmap bitmap = (Bitmap)Bitmap.FromFile(@"D:\colors.jpg");
bitmap.SetPixel(10, 10, Color.Yellow);
pictureBox1.Image = bitmap;
|
|
|
|
|
please help make barcode reader using c# languege
|
|
|
|
|
There's hundreds of examples starting right here on cp and on google. Good luck.
|
|
|
|
|
most barcode scanners i have used emulate keyboard input...
|
|
|
|
|
Hi,
Please refer to the below mentioned articles:
http://www.codeproject.com/KB/graphics/barcodeimaging2.aspx
Hope this helps.
Vinay
ComponentOne LLC.
www.componentone.com
|
|
|
|
|
I've uploaded my program through box.net, and i've sent it to two people, and they both say that it says "an error occured, and the program needs to close".
i've been giving it to them through this link: here.
is it working for you guys? i've told them to download this too, but they're still saying it's not working... what could be going on?
|
|
|
|