|
|
Textbox txt=new Textbox();
Controls.Add(txt);
txt.show();//it wud display txt at top-left corner of the form
-- modified at 8:11 Thursday 7th June, 2007
Regards
Chintan
www.visharadsoft.com
(Nothing is so purify as KNOWLEDGE)
|
|
|
|
|
There is no reason to call method show.
Any control is shown up on the form at time it has been added to form's component container
P.S. Chintan.Desai, there were many syntax mistakes in you post
|
|
|
|
|
What did you mean: "dynamic text boxes"?
May be you wanted to say how to create text boxes dynamically?
There is the solution:
<br />
private void Form1_Load(object sender, EventArgs e)<br />
{<br />
TextBox myDynamicTextbox = new TextBox();<br />
myDynamicTextbox.Size = new Size(100, 20);<br />
myDynamicTextbox.Location = new System.Drawing.Point(10, 10);<br />
<br />
this.Controls.Add(myDynamicTextbox);<br />
}<br />
|
|
|
|
|
|
The trick is to use a Graphics object obtained from the Image and use that for drawing.
GraphicsPath gp = new GraphicsPath();
Bitmap bmp = new Bitmap(200, 200);
using (Graphics g = Graphics.FromImage(bmp))
{
System.Drawing.Pen pen = System.Drawing.SystemPens.InfoText;
g.DrawPath(pen, gp);
}
|
|
|
|
|
I'm attempting to set up a text input field so that keyboard entry is rejected, but barcode scanner via usb is accepted. How can I programmatically distinguish between the keyboard and a USB based bar code scanner?
|
|
|
|
|
Most of the time, a barcode scanner will supply the data it scans as keystrokes. There's no way to tell the difference between the two.
If the barcode scanner exposes an API, you'd have a much easier time with this since you get the data from the API.
But, disabling keyboard input on this field is a bad idea. What does the user do if the barcode scanner fails??
|
|
|
|
|
private void nPic_MouseDown(object sender, MouseEventArgs e)
{
MessageBox.Show("ok");
}
private void pnlMap_MouseClick(object sender, MouseEventArgs e)
{
nPic = new PictureBox();
nPic.Name = "test"
this.nPic.MouseDown += new System.EventHandler(this.nPic_MouseDown);
}
Error 9 No overload for 'nPic_MouseDown' matches delegate 'System.EventHandler'
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
Instead of System.EventHandler write System.Windows.Forms.MouseEventHandler (or probably just MouseEventHandler).
|
|
|
|
|
Good, thanks!
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
Hai Everybody,
I want to connect and work with the FileMaker applicaiton through ASP.net.
Can anyone give me a reference.
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
M. J. Jaya Chitra wrote: ...through ASP.net.
Can anyone give me a reference.
ASP.Net forum
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
Thank you for your valuable suggestions
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
Can you please tell me how to connect it with a .net application and also a reference site for the commands that can be user in filemaker
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
Sorry, I'm not into Asp and this's why I tried to suggest you the Asp.Net forum.. did you look through the software documentation??
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
Ok
Best Regards,
M. J. Jaya Chitra
|
|
|
|
|
Hi All,
I am been stuck with Drag-Drop operation in C#.I wanna to click on picture1,move it and dropped on picture2.but Drag_Enter event for picture2 does not fired at all. I have seek many topics but not got any any idea!!. I m bit confus with DoDragDrop().Pls tell something about e.Effect and e.Data.GetDataPresent(). I am been stuck with my project. from last 3 days. pls pls help me!!!
Regards
Chintan
www.visharadsoft.com
(Nothing is so purify as KNOWLEDGE)
|
|
|
|
|
1. Replace your PictureBox with a panel control and set it's background image to the picture you want.. "that should do the trick nicely!"
2. Enable the panel "Allow Drop" property by setting it to true ie. Panel1.AllowDrop = true;
3. Enable the destination's AllowDrop property as well.
4. In the destination's drag over, set the effect e.Effect = DragDropEffects.Move; Move/Copy/All/None.. etc.
5. If you want to say drag a file(s) use this:
private void listBox1_DragDrop(object sender, DragEventArgs e)
{
string[] files = (string[])e.Data.GetData(DataFormats.FileDrop);
foreach (string file in files)
{
try
{
if (!listBox1.Items.Contains(file))
listBox1.Items.Add(file);
listBox1.SelectedIndex = listBox1.Items.Count - 1;
}
catch (Exception ex)
{
MessageBox.Show("Cannot find "+file, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
}
}
}
Smile: A curve that can set a lot of things straight!
(\ /)
(O.o)
(><)
|
|
|
|
|
Thanks for ur reply,
i hav done the same thing as wht u tol,but friend when i click on dragged picture box (picturebox1)which i need to move,its not moving on MouseMove event(if i dont write DoDragDrop() in mouseMove it will work fine.I have written code to move picturebox1 according to mouse position).Only mouse get moved and then after taking mouse over panel1,Panel1_DragEnter is fired.But i want panel to know that it is picturebox1
my code snippet.it will give u some info.
private void picturebox1_MouseMove(object sender, MouseEventArgs e)
{
DagDropEffects ddEffect = picturebox1.DoDragDrop(picturebox1, DragDropEffects.Move);
if (ddEffect == DragDropEffects.Move)
{
//then move the mouse else dont move it
}
}
//Code in target picture box Drag_Enter event
private void picturebox2_DragEnter(object sender, DragEventArgs e)
{
if (e.Data.GetDataPresent(DataFormats.Bitmap))
//then it is valid control
else
//not valid so dont allow to drop on target picture box
}
pls reply
-- modified at 6:54 Thursday 7th June, 2007
Regards
Chintan
www.visharadsoft.com
(Nothing is so purify as KNOWLEDGE)
|
|
|
|
|
Hello!
All of a sudden I get this exception when I try to update my database:
Exception of type 'System.EnterpriseServices.TransactionProxyException' was thrown.<br />
<br />
The transaction has aborted.
I haven´t found any info on this error anywhere, does anyone know whats usually causing this type of error and what I should do / look for in order to fix it?
/regards
|
|
|
|
|
how to use array list in c#.net
|
|
|
|
|
It is as simple as using array in any language.Actually ArrayList is use to get Array of object(class,structure) also array of int,string...Just declare its object in one method,luk at following code snippet.
private void fun()
{
Arraylist aList=new ArrayList();
//Array of Picturebox object.
PictureBox[5] pic=new PictureBox();
Now loop it with for loop
aList.Add(pic[i]);
}
This way you can do as many operation with picture box object.such as count no. of item in array list and many more...
Hop i have solve ur doubt.
nJoy C#
Regards
Chintan
www.visharadsoft.com
(Nothing is so purify as KNOWLEDGE)
|
|
|
|
|
Hello,
Please click here[^]
Regards ,
Nishu
|
|
|
|
|
Allergic to documentation?
See here [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|