|
|
did you look at the sample.
anchoring is not the problem here the problem is that the size changes when anchoring is set during build the size is back normal when you run the application.
if it where the anchoring i whould be glad but i also whould of found it by now then.
pls look at the sample if you want to help.
|
|
|
|
|
hi all
i am migrating to C# now , and kindly i have so many questions about using FCL instead of MFC
for example
how to Get and set desktop image in C#?
thx for ur interest in advance
|
|
|
|
|
This functionality is not exposed through the current .NET framework class library. Use P/Invoke to call the Win32 SystemParametersInfo API.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: He has a funny face. And he's my son.
Judah Himango
|
|
|
|
|
Hi
I am Converting a Vb.net code to c#. But i can't find an alternative for
FileGet( 1, TecFile) in C#.
Please help me.
Thanks & Regards,
Rathish
|
|
|
|
|
VB.NET
FileGet( 1, TecFile)
C#
int TecFile;<br />
<br />
using (BinaryReader file=new BinaryReader(new FileStream(filename, FileMode.Open, FileAccess.Read, FileShare.Read)))<br />
<br />
TecFile=file.ReadInt32();
Don't forget to implement System.IO
|
|
|
|
|
hi,
how do i add a table for the crystal report without using crystalreport expert
i have a blank report
pls help
sukanya
|
|
|
|
|
|
can anyone provide me some coding about printing out the datagrid after i had loaded the datagrid with the records in DataTable?ur help is greatly appreciated...
|
|
|
|
|
MJay, please use the "Search comments" link above to search for keywords like print DataGrid[^]. We have covered this topic several times in this forum.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
Hi,
I 've a function which takes 2 parameters, a dataset , path to XSD file. Based on contents of the xsd file i need to modify data in daatset to generate appropriate xml.How do I do this?
Thanks in advance
Priya
|
|
|
|
|
i know a webservices which has an methods that get back a some data
i wanna to know how to call this methods
note the webservice is on a website link while i am just online
|
|
|
|
|
If you're running VS.NET, simply right click on the Project file in Solution explorer and click "Add Web Reference". Give the URL (*.asmx file) and VS.NET automatically generates a proxy class that you can use in your application.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Ok, Ive have read many books and seen a lot of examples of how to bind a drop down list. So I am using VS .net and I use the IDE to create as much code as I can via the GUI. My problem is that the code generated does not match the code people use in examples of binding a dropdownlist. To be honest the examples I understand, the code generated by VS I don't understand but I want to. Any help appreciated.
Here is the code. I am new to this type of programming......be gentle with me!
public class SA_ArptSelNav : System.Web.UI.Page<br />
{<br />
protected System.Web.UI.WebControls.ImageButton ZoomInButton1;<br />
protected System.Web.UI.WebControls.ImageButton ZoomOutButton1;<br />
protected System.Web.UI.WebControls.ImageButton ZoomPrevButton1;<br />
protected System.Web.UI.WebControls.ImageButton ZoomExtButton1;<br />
protected System.Web.UI.WebControls.ImageButton PanButton1;<br />
protected System.Web.UI.WebControls.ImageButton PrintButton1;<br />
protected System.Web.UI.WebControls.DropDownList DropDownList1;<br />
protected System.Data.OleDb.OleDbDataAdapter oleDbDataAdapter1;<br />
protected System.Data.OleDb.OleDbCommand oleDbSelectCommand1;<br />
protected System.Data.OleDb.OleDbCommand oleDbInsertCommand1;<br />
protected System.Data.OleDb.OleDbCommand oleDbUpdateCommand1;<br />
protected System.Data.OleDb.OleDbCommand oleDbDeleteCommand1;<br />
protected System.Data.OleDb.OleDbConnection oleDbConnection1;<br />
protected dbListOfAirports dbListOfAirports1;<br />
protected System.Web.UI.WebControls.ImageButton CopyButton1;<br />
protected DataView dvAirportList;<br />
protected DataTable AirportList; <br />
<br />
private void Page_Load(object sender, System.EventArgs e)<br />
{<br />
if (!Page.IsPostBack) <br />
{<br />
AirportList = new DataTable(); <br />
dvAirportList = new DataView(AirportList); <br />
<br />
<br />
DropDownList1.DataBind();<br />
}<br />
}<br />
<br />
#region Web Form Designer generated code<br />
override protected void OnInit(EventArgs e)<br />
{<br />
InitializeComponent();<br />
base.OnInit(e);<br />
}<br />
<br />
private void InitializeComponent()<br />
{ <br />
this.oleDbDataAdapter1 = new System.Data.OleDb.OleDbDataAdapter();<br />
this.oleDbDeleteCommand1 = new System.Data.OleDb.OleDbCommand();<br />
this.oleDbConnection1 = new System.Data.OleDb.OleDbConnection();<br />
this.oleDbInsertCommand1 = new System.Data.OleDb.OleDbCommand();<br />
this.oleDbSelectCommand1 = new System.Data.OleDb.OleDbCommand();<br />
this.oleDbUpdateCommand1 = new System.Data.OleDb.OleDbCommand();<br />
this.dbListOfAirports1 = new dbListOfAirports();<br />
((System.ComponentModel.ISupportInitialize)(this.dbListOfAirports1)).BeginInit();<br />
this.DropDownList1.DataBinding += new System.EventHandler(this.Page_Load);<br />
this.oleDbDataAdapter1.DeleteCommand = this.oleDbDeleteCommand1;<br />
this.oleDbDataAdapter1.InsertCommand = this.oleDbInsertCommand1;<br />
this.oleDbDataAdapter1.SelectCommand = this.oleDbSelectCommand1;<br />
this.oleDbDataAdapter1.TableMappings.AddRange(new System.Data.Common.DataTableMapping[] {<br />
new System.Data.Common.DataTableMapping("Table", "tblAirport", new System.Data.Common.DataColumnMapping[] {<br />
new System.Data.Common.DataColumnMapping("AirportCode", "AirportCode"),<br />
new System.Data.Common.DataColumnMapping("AirportID", "AirportID"),<br />
new System.Data.Common.DataColumnMapping("AirportName", "AirportName"),<br />
new System.Data.Common.DataColumnMapping("City", "City"),<br />
new System.Data.Common.DataColumnMapping("Latitude", "Latitude"),<br />
new System.Data.Common.DataColumnMapping("Longitude", "Longitude"),<br />
new System.Data.Common.DataColumnMapping("State", "State")})});<br />
this.oleDbDataAdapter1.UpdateCommand = this.oleDbUpdateCommand1;<br />
this.oleDbDeleteCommand1.CommandText = "DELETE FROM tblAirport WHERE (AirportID = ?)";<br />
this.oleDbDeleteCommand1.Connection = this.oleDbConnection1;<br />
this.oleDbDeleteCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_AirportID", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "AirportID", System.Data.DataRowVersion.Original, null));<br />
this.oleDbConnection1.ConnectionString = @"Jet OLEDB:Global Partial Bulk Ops=2;Jet OLEDB:Registry Path=;Jet OLEDB:Database Locking Mode=0;Data Source=""D:\MGDevelopment\SIMDAC Viewer\DB\simdac_be.mdb"";Jet OLEDB:Engine Type=5;Provider=""Microsoft.Jet.OLEDB.4.0"";Jet OLEDB:System database=;Jet OLEDB:SFP=False;persist security info=False;Extended Properties=;Mode=Share Deny None;Jet OLEDB:Encrypt Database=False;Jet OLEDB:Create System Database=False;Jet OLEDB:Don't Copy Locale on Compact=False;Jet OLEDB:Compact Without Replica Repair=False;User ID=Admin;Jet OLEDB:Global Bulk Transactions=1";<br />
this.oleDbInsertCommand1.CommandText = "INSERT INTO tblAirport(AirportCode, AirportName, City, Latitude, Longitude, State" +<br />
") VALUES (?, ?, ?, ?, ?, ?)";<br />
this.oleDbInsertCommand1.Connection = this.oleDbConnection1;<br />
this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("AirportCode", System.Data.OleDb.OleDbType.VarWChar, 4, "AirportCode"));<br />
this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("AirportName", System.Data.OleDb.OleDbType.VarWChar, 50, "AirportName"));<br />
this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("City", System.Data.OleDb.OleDbType.VarWChar, 20, "City"));<br />
this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Latitude", System.Data.OleDb.OleDbType.VarWChar, 50, "Latitude"));<br />
this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Longitude", System.Data.OleDb.OleDbType.VarWChar, 50, "Longitude"));<br />
this.oleDbInsertCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("State", System.Data.OleDb.OleDbType.VarWChar, 2, "State"));<br />
this.oleDbSelectCommand1.CommandText = "SELECT AirportCode, AirportID, AirportName, City, Latitude, Longitude, State FROM" +<br />
" tblAirport";<br />
this.oleDbSelectCommand1.Connection = this.oleDbConnection1;<br />
this.oleDbUpdateCommand1.CommandText = "UPDATE tblAirport SET AirportCode = ?, AirportName = ?, City = ?, Latitude = ?, L" +<br />
"ongitude = ?, State = ? WHERE (AirportID = ?)";<br />
this.oleDbUpdateCommand1.Connection = this.oleDbConnection1;<br />
this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("AirportCode", System.Data.OleDb.OleDbType.VarWChar, 4, "AirportCode"));<br />
this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("AirportName", System.Data.OleDb.OleDbType.VarWChar, 50, "AirportName"));<br />
this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("City", System.Data.OleDb.OleDbType.VarWChar, 20, "City"));<br />
this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Latitude", System.Data.OleDb.OleDbType.VarWChar, 50, "Latitude"));<br />
this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Longitude", System.Data.OleDb.OleDbType.VarWChar, 50, "Longitude"));<br />
this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("State", System.Data.OleDb.OleDbType.VarWChar, 2, "State"));<br />
this.oleDbUpdateCommand1.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_AirportID", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, false, ((System.Byte)(0)), ((System.Byte)(0)), "AirportID", System.Data.DataRowVersion.Original, null));<br />
this.dbListOfAirports1.DataSetName = "dbListOfAirports";<br />
this.dbListOfAirports1.Locale = new System.Globalization.CultureInfo("en-US");<br />
((System.ComponentModel.ISupportInitialize)(this.dbListOfAirports1)).EndInit();<br />
<br />
}<br />
#endregion<br />
|
|
|
|
|
Hey, I need some help to finish a project I am working on
I have a function that filters a database I loaded into a data grid it works like this:
private void selectRecordsDV()
{
string sFilter;
sFilter = String.Format("SalesDate >= #{0}# AND SalesDate <= #{1}#",xtBxStartDate.Text,txtBxEndDate.Text);
try
{
dvABC.RowFilter = sFilter;
dtGrdSales.DataSource = dvABC;
updateSalesInfoDV();
}
catch(Exception err)
{
MessageBox.Show(err.Message);
}
}
in a data view. I need it to filter one more column in the database named CustNo but can't seem to make it happen. any suggestions?
|
|
|
|
|
First of all, why the # ? Is this something I don't know about SQL ?
Secondly, what's the error ? That would help a lot in working out the problem. Is the text that's coming out in the proper format ? It should be in YYYYMMDD:HHMMSSSS, from memory.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
As far as I am aware there is no simple way of changing the position of a tooltip in C#. By default it appears that the tooltip is painted below the control in question. I would like to be able to display it to the right of mouse pointer.
Tooltip appears to be sealed. Does anyone have any examples on how to hook the dll and inject this functionality? It's probably gonna be ugly -- but I don't think I have a choice
Cheers
|
|
|
|
|
|
Hey folks,
Do you guys know how to read the names of application pools in IIS? Which API should I call?
Thanks a bunch.
|
|
|
|
|
IIS exposes much of its functionality through the iis:// directory service, which you can access using classes defined under the System.DirectoryServices namespace. Start by reading the ADSI/WMI property documentation[^] for the AppPoolId property. See Creating Applications Pools using System.DirectoryServices[^] for a sample that is close to what you require.
This posting is provided "AS IS" with no warranties, and confers no rights.
Software Design Engineer
Developer Division Sustained Engineering
Microsoft
[My Articles] [My Blog]
|
|
|
|
|
I have built a custom component that I use rather extensively but it has a "feature" that is not correct but I haven't been able to determine why. I converted one my Delphi components and merged it with features from several contributors here. I would like to thank all of you.
The basis of the component is as follows:
using System;<br />
using System.Collections;<br />
using System.Windows.Forms;<br />
using System.ComponentModel;<br />
using System.Text.RegularExpressions;<br />
<br />
namespace MyComponents<br />
{<br />
public class myMaskedEdit : TextBox<br />
{<br />
public enum InputMaskType<br />
{ None, Dollars, Number, Integer, Percent, Phone, SSN, Zip, Custom }<br />
<br />
public myMaskedEdit()<br />
{ ... }<br />
<br />
... Other Methods ...<br />
<br />
}<br />
}
I drag the component onto my UserControl and it looks something like:
using System;<br />
using System.Collections;<br />
using System.ComponentModel;<br />
using System.Drawing;<br />
using System.Data;<br />
using System.Windows.Forms;<br />
<br />
namespace PARTS<br />
{<br />
public class ucRMAHeader : System.Windows.Forms.UserControl<br />
{<br />
public ucRMAHeader()<br />
{<br />
InitializeComponent();<br />
SetupForm();<br />
}<br />
<br />
... Other Methods ...<br />
<br />
#region Component Designer generated code<br />
private void InitializeComponent()<br />
{<br />
...<br />
this.myMaskedEdit1.ErrorInvalid = false;<br />
this.myMaskedEdit1.FormatText = true;<br />
this.myMaskedEdit1.Location = new System.Drawing.Point(8, 48);<br />
this.myMaskedEdit1.MaxLength = 0;<br />
this.myMaskedEdit1.Name = "myMaskedEdit1";<br />
this.myMaskedEdit1.Size = new System.Drawing.Size(108, 20);<br />
this.myMaskedEdit1.StdInputMask = MyComponents.myMaskedEdit.InputMaskType.Integer;<br />
this.myMaskedEdit1.TabIndex = 214;<br />
...<br />
}<br />
#endregion<br />
}<br />
}
I can set all the properties correctly and the program will compile and run as intended. The above code is how it is seen in the program.
I then close the window for maintaining the form. I reopen it and the StdInputMask property is now blank in the property editor. If I look at the code itself, the property is shown as it is above. But when I recompile, the property is saved as a blank and the line is removed.
While viewing the code the error message The variable 'InputMaskType' is either undeclared or was never assigned. is shown in the task list.
What I don't understand is that the enumerated type has the public attribute and it does execute as expected up until the time you reopen the form.
Can anyone identify what I missed?
Thanks.
|
|
|
|
|
I'm not sure why this question bothered someone to where they jest with their own version of it.
I guess the bottom line is that my understanding of the properties is that they are stored in the Component Designer section of the code. If I open the window again to maintain it, the Component Designer code should've repopulated the property editor...but it doesn't. Whether it is my component or not, I wouldn't think it would matter.
I don't believe my question is that far out of line.
|
|
|
|
|
hi, i've got a class which draws ball. i trigger it in window form by form1_MouseDown(object sender, System.Windows.Forms.MouseEventArgs e), indicating the points by doing this:
obj.Position = new Point(e.X, e.Y);
now i wanna draw the very same image by triggering a button from another form onto form1. how should i indicate the Points?
Thanks..
Chris
|
|
|
|
|
However you like. You're not saying where you want the ball drawn. As you have no real candidate for the 'right' place to draw a ball, the three likely scenarios to me are:
1. Draw it always in the same place
2. Make a random point every time
3. Make a set of points, and iterate through them
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
i need to create a program to open and view 3d models so that they can be viewed in wire frame and shaded mode using either Direct X or OpenGL in C#
can you help me???
|
|
|
|
|