|
Hi,
you can set the TickStyle property to None.
|
|
|
|
|
Hey all,
After installing the latest version of the Symbol SDK it seems to have setup a requirement to install the framework on each deploy so debugging is becoming a pain especially when I have to cancel the installation on the handheld each debug.
If you hadn't already guessed, i'm using VS 2003 and I cannot find anywhere that states where these files are, although I know "where" they are, and I have deleted them. But now I receive an error on each deploy stating it cannot find these files.
Sooooo, does anyone know where the hell these files are referenced?
TIA
Gav
|
|
|
|
|
hi all,
there is 2 table (maintable[numdoc_id,...]) and(subtable[id,numdoc_id,...])and there is a one to many relation between 2 table .
in the MainForm :
...<br />
private int get_num_ID;<br />
...<br />
private int NUM_MY_ID(out int MY_ID)<br />
{<br />
...<br />
strFindID = "SELECT MAX(numdoc_id) as numdoc_id FROM MainTable";<br />
...<br />
MY_ID = Int32.Parse(ds.Tables[0].Rows[0][0].ToString());<br />
MY_ID++;<br />
return MY_ID;<br />
}
and for Insert Function in MainForm for subtable :
private void ADD_INTO_SubTable()<br />
{<br />
...<br />
try{<br />
strSQL_P = "insert into subtable(numdoc_id,...)";<br />
strSQL_P +="value('"+txtnumdoc_id.Text+"',...)";<br />
...<br />
}...<br />
}
and for Update Function in MainForm for subtable :
private void Update_INTO_SubTable()<br />
{<br />
...<br />
NUM_MY_ID(out get_num_ID);<br />
try{<br />
strSQL_P = "update payment set numdoc_id='"+get_num_ID+"'";<br />
strSQL_P += ... where numdoc_id=" + get_num_ID;<br />
...<br />
}...<br />
}
txtnumdoc_id control is in MainForm(for maintable), but sometimes when I click the save button in main form ,the first numdoc_id row in maintable(e.g. '1') is added to the last row for subtable in numdoc_id field . I don't know where is my wrong .
Regards ,
s_mostafa_h
|
|
|
|
|
I don't even know what is wrong. What are you trying to do?
---
b { font-weight: normal; }
|
|
|
|
|
hi there !
when I Insert a record in the MainTable , at the same time a record must be added to the subtable with the same Id(numdoc_id) , (there is a relation one to many between them )but sometimes , it doesn't happen . and the only the first id of the maintable is added to the last record of the subtable .
Is it clear or not ?
Regards ,
s_mostafa_h
|
|
|
|
|
Hi,
I have the following class definiton with methods:
public class CategoryGroupDA
{
// All other code has been ommitted
public static int InsertCategoryGroup(CategoryGroup objCategoryGroup)
{
// All code necessary for database is ommitted
try
{
// All code necessary for database is ommitted
}
catch (SQLException ex)
{
// Here I want to have a method that handles this exception
// Something like:
HandleSQLError(ex, strSProc);
}
}
private static void HandleSQLError(SqlException ex, string strSProc)
{
string strException = "Error executing stored procedure " + strSProc + ": \r\n Error is " + ex.Message;
throw new Exception(strException, ex);
}
}
Is this the correct way to do it? I only want this method accessable to this class, that was why I made it private, but because it's private, then it can't be statis? It complains. When I make it public, then I can't use something like this.HandleSQLError(ex, strSProc);
Please can someone explain my confusion.
Regards,
ma se
|
|
|
|
|
Surely a method can be private static.
The only thing I noticed in this code is that you wrote SqlException in two different ways (Sql <-> SQL) and that you didn't declare the strSProc parameter and don't have a return statement in InsertCategroyGroup.
|
|
|
|
|
Something can't be right here. There's nothing wrong with private static....
Regards,
Rob Philpott.
|
|
|
|
|
I'm not sure whether I understand correctly. Anyway, I believe that Static method, just like static member, can only be accessed via a class. Here, you can access the static class using "CategoryGroupDA.HandleSQLError(ex, strSProc)". And if you make a method dynamic (no "static" keyword), you need to create an instance of the class first and call the method via the instance.
KiT
|
|
|
|
|
I'm trying to serialize an instance of a class with members of type bool, string, double[], double, int and an enumeration declared serializable. The class is marked [Serializable()] and doesn't have any child objects aside from the primitives mentioned. Also, it doesn't extend any other class: It's declared:
[Serializable()]
public sealed class EQband
While serializing the object I get an error:
System.Runtime.Serialization.SerializationException: Type 'CtlEQ.CtlEQ' in Assembly 'bla, Version=2.0.2386.18258, Culture=neutral, PublicKeyToken=null' is not marked as serializable.
I can't figure out why an attempt is made to serialize some instance of the CtlEQ class.
The class I'm serializing is declared within the same namespace and is used by the CtlEQ.CtlEQ class (CtlEQ holds a refference to EQBand), but is no member of it.
Does anyone know why this attempt is made and how I can prevent this from happening?
|
|
|
|
|
Just a wild guess: Do you have an event in EQband which CtlEQ listens to?
|
|
|
|
|
Errr. Yes... Does this matter?
|
|
|
|
|
Well if you bind an event of class A from class B then internally you are setting a reference from A to B.
Add the following to not serialize your event:
[field:NonSerializedAttribute()]
public event EventHandler FooEvent;
|
|
|
|
|
Allright, I had already set a method on [OnSerializing()] to set the event to null, following your last post. That worked, but I can see this is more graceful. Thanks for the help!
|
|
|
|
|
How to get notification if one particular file size Exceeds 10 MB. i tried FileSystemWatcher class but it giving Changed event which occur for every change. i want an event to be raise only if file size exceeds some mentioned amount. any help on this.
Thanks
srini
|
|
|
|
|
You can use FileInfo to get the length of the file. If FileInfo.Length bigger then 10MB then you must do something. Otherwise ignore it.
|
|
|
|
|
engsrini wrote: want an event to be raise only if file size exceeds some mentioned amount.
Then you need to create your own component to do this. A good starting place is to wrap a FileSystemWatcher, listen to its events, and when a particular one occurs (in your case a file being created/modified and its size being greater than 10Mb) fire your own event.
---
How to get answers to your questions[^]
|
|
|
|
|
Hi,
I'm trying to overlay some text onto a picture. Because the picture is a real scene, I don't know it's precise colour balance so i cannot pick a colour for the text which can always be seen.
so, i'd like to write text in black with a white border. that is, draw the text in white, then slightly smaller in black, on top of it.
But i cannot find a way of adjusting the font spacing in GDI+. I'm sure it's there, i just don't know where.
Without that, my two draws of text don't align properly.
Anyone know how to do this? or has done it before? or know a better way?
Thanks
Jon
using System.Beer;
|
|
|
|
|
Probably this site can help you:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/_gdiplus_obtaining_font_metrics_usecsharp.asp
|
|
|
|
|
Hi,
I'm just adding halo effects to one of my articles. This is the way to go:
protected override void OnPaint(PaintEventArgs e)
{
base.OnPaint (e);
e.Graphics.SmoothingMode = SmoothingMode.AntiAlias;
GraphicsPath path = new GraphicsPath();
path.AddString("Sample text", base.Font.FontFamily, (int)base.Font.Style,
base.Font.Size * 3, new PointF(10, 10), new StringFormat());
using (Pen pen = new Pen(Color.White, 3))
{
e.Graphics.DrawPath(pen, path);
}
using (SolidBrush brush = new SolidBrush(Color.Red))
{
e.Graphics.FillPath(brush, path);
}
}
|
|
|
|
|
Hi,
I am facing a problem in my web application while i am trying to print an html page, whose url is specified in a textbox, using axWebBrowser component. I am getting an error "Exception of type InvalidActiveXStateException was thrown", at axW.Navigate statement. Please help me to rectify this problem.
private void Button1_Click(object sender, System.EventArgs e)<br />
{<br />
try<br />
{<br />
object empty= null;<br />
System.Resources.ResourceManager resources = new System.Resources.ResourceManager(typeof(WebForm1));<br />
AxWebBrowser axW=new AxWebBrowser();<br />
axW.Enabled=true;<br />
axW.Visible=false;<br />
axW.OcxState = (System.Windows.Forms.AxHost.State)(resources.GetObject("axW.OcxState"));<br />
axW.Navigate(TextBox1.Text,ref empty,ref empty,ref empty,ref empty);<br />
axW.ExecWB(SHDocVw.OLECMDID.OLECMDID_PRINT,SHDocVw.OLECMDEXECOPT.OLECMDEXECOPT_DONTPROMPTUSER ,ref empty,ref empty);<br />
}<br />
catch(Exception Ex)<br />
{<br />
Response.Write(Ex.Message.ToString());<br />
} <br />
}
This application is a web application and I want the print at the server end since the server is the user in our case.
If it is not possible to print with this control in a web application, Is there any other way to print an html page without loading it and not to show any print dialog at the user end.
Please help me with this case.
Thanks in advance,
Sai.
|
|
|
|
|
Please don't cross post.
---
b { font-weight: normal; }
|
|
|
|
|
onload in page write
It may help
vijay jain
|
|
|
|
|
i have 6 textboxes in my form
how will i check if these textboxes doesn't have same inputted values?
i have my own solution but seems to me that my could is quite long.
please help
thanks
|
|
|
|
|
private bool CheckTextBoxes()
{
foreach(Control control in this.Controls)
{
TextBox textBox = control as TextBox;
if(textBox != null)
{
foreach(Control otherControl in this.Controls)
{
TextBox otherTextBox = otherControl as TextBox;
if(otherTextBox != null)
{
if(!otherTextBox.Equals(textBox))
{
if(otherTextBox.Text == textBox.Text)
{
return false;
}
}
}
}
}
}
return true;
}
|
|
|
|