|
I wonder if it is possible to show more than one image in a picturebox.
In Java for example it is easy to display multiple images at specific coordinates in the same box at the same time.
|
|
|
|
|
No the normal PictureBox shows only one image. If you need this you will have to do it yourself. But its easier as you might think. Just create a new class inheriting from control, override the OnPaint method and draw your stuff:
public class MultiImageControl : Control {
private Image[] _images;
private Point[] _points;
public MultiImageControl(Image[] images, Point[] points) {
_images = images;
_points = points;
}
protected override OnPaint(PaintEventArgs pea) {
for (int i = 0; i < _images.Length; i++)
pea.DrawImageUnscaled(_images[i], _positions[i]);
}
}
Note that this will not be accessible in the designer. For this some more work is needed.
|
|
|
|
|
I need a concept about developing web MP3 web application (Play sound.rm.wav online with secure way..)
respectfully yours...
Ameen Abudbush
|
|
|
|
|
i try to request a page with posting some html code but it always throws System.Web.HttpRequestValidationException
with the message "A potentially dangerous Request.Form value was detected from the client (UEventHtmlFrameworkAdmin1:txtarHTML="
|
|
|
|
|
Getting the following error when trying to switch from Code to Designer for any smart device project:
Unable to cast COM object of type 'Microsoft.VisualStudio.DeviceConnectivity.Interop.ConManClass' to interface type 'Microsoft.VisualStudio.DeviceConnectivity.Interop.ICcServer'. This operation failed because the QueryInterface call on the COM component for the interface with IID '{EA537AF4-2226-4D26-BBC0-9CF3A82749A5}' failed with HRESULT: 0x80004002 (No such interface supported (Exception from HRESULT: 0x80004002 (E_NOINTERFACE))).
Any help appreciated.
|
|
|
|
|
|
Thanks LongHC - although I sense it has something to do with my configuration of VS2005, I reported it as a bug.
|
|
|
|
|
hi when i open the source code linkit will not save the program on myy computer plzz tell me why
|
|
|
|
|
|
When you click the link for the source code, click Save, not Open!! Save the .ZIP file somewhere, then open that saved file.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi
I am currently writting a program that read a file which contains some information. I will enter a loop that will loop 10000 or even 25000 times(depending on the number of lines)to enter these information.
Now, is it a good practice to open the connection to the database and close it within the loop.So it will be opened and closed each loop.If not, what is the best solution?!
I mean, will it affect the time performance??
My database is MS Access 2003
Thanks
|
|
|
|
|
I think it would. I'd just open the connection right before you start the loop and close it afterwards.
|
|
|
|
|
Thanks I will try
Q:Where can I find a reference that shows me when I should use the executeQueri() method and when I shold use the execute() method of the database?
regards
|
|
|
|
|
Sorry I dont know what exactly you mean. Do you refer to the different Execute functions the IDbCommand interface has? If yes then look here.
|
|
|
|
|
hi,
i want know how to work wit my mail server programmatically
like adding new mail domain,deleting a mail domain and so on?
|
|
|
|
|
It's impossible to tell you anything without knowing which mail server your using! They're not all the same you know...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
thanks,
so i have to negotiate with my administrator inorder to make my job,i thought all the servers have the same rules,if not tell me about it?
|
|
|
|
|
All POP3 and SMTP servers have to follow the same mail encoding and transfer protocol rules. Most of them do, but there are no specifications to follow when your talking about administering, or management, or a mail server. They all have different interfaces, configurations, management tools.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I have been trying to Manipulate INPUT TYPE=File Value
in a web page through automation of the internet explorer using c#.Net but i don,t seem to get it write.
If any one out there has an idea on how to go about it, will be grateful
|
|
|
|
|
|
hi
see different web servers generate different format log files like IIS,W3C Extended,NCSA they all generate log files having different formats. i hav 2 make one standard format ofcourse of my own choice and then i hav 2 parse tht standardised file.the prob is i dont kno C# at all but i hav 2 do it in C#.kindly if any one can tell me tht which of related material to my work shud i study (means which classes as reading C# as whole is pretty time taking) and also do tell me some good book of C#.plz help me soon.
|
|
|
|
|
The question is a bit general. You will have to look at the System.IO namespace. The classes FileStream and TextWriter/Reader are probably important in this case. You will need many string operations and the RegEx class might also be of use (but beware: regular expressions is a science by itself ).
|
|
|
|
|
Lets say we have an interface 'IControl'.
public interface IControl
{
ControlType Type
{
get;
}
int XPos
{
get;
set;
}
int YPos
{
get;
set;
}
}
Lets say we have a baseclass 'ControlBase : IControl'.
public abstract class ControlBase : IControl
{
int _xPos = 0;
int _yPos = 0;
public ControlBase() {}
public ControlBase(int xPos)
{
_xPos = xPos;
}
public ControlBase(int xPos, int yPos)
{
_xPos = xPos;
_yPos = yPos;
}
public int XPos
{
return _xPos;
}
public int YPos
{
return _yPos;
}
}
Lets say we have a baseclass 'ButtonBase : ControlBase'.
public abstract class ButtonBase : ControlBase
{
public override ControlType Type
{
get
{
return ControlType.Button;
}
}
}
}
The only constructor available in ButtonBase is the default constuctor:
ButtonBase button = new ButtonBase();
What I want to do is inherit the ButtonBase(x) and ButtonBase(x, y) constuctor from the ControlBase baseclass whithout writing new code. In other words I want to use ControlBase as a foundation for other classes, using the baseclass as a template.
In the end I'd like to call 'new ButtonBase(10,100)' in my source-code to create a new instance of ControlBase(10, 100) without adding new (Constuctor-) methods to ControlBase.
How can I do this?
Greetzzz miggro
|
|
|
|
|
You need to do this:
public ControlBase(int xPos, int yPos) : base()
Or if you want to select a base constructor that takes some or all of your parameters, you'd do this:
public ControlBase(int xPos, int yPos, object forBase) : base(forBase)
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I'm afraid that's not possible. You have to explicitly define a constructor in ButtonBase, even if it does nothing but call the base class's constructor.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|