|
Loveday78 wrote:
see the movement on the caller application
Could you explain it a bit more?
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Sorry, i'll try:
when i move notepad's window i see as if there were many windows; a sort of tail stating from the original location and ending in the new location of the window. This only on the screen's region over the "parent" application (the one that started the process).
I have no problem if i don't use WaitForExit (but i need to).
Better?
-- modified at 2:44 Friday 2nd September, 2005
|
|
|
|
|
Use threading to start notepad on a new thread.
www.lovethosetrains.com
|
|
|
|
|
Hi!
I'm trying to copy data from Oracle to Access 2000. For this project, I'm not allowed to use ADO.NET 2.0 unfortunately (BulkCopy would really help me), so I'm trying to do it by myself. My idea is to create a DataSet with the data of Oracle, and to push it in my Access database. For this I use the "DataSet.Merge" method and then the "DataAdapter.Update" method to write down the data. I don't have any error coming out, but nothing is written in the Acces DB.
Has someone met the same problems??
Has someone a better solution??
Many thanks in advance.
I join a copy of my code too :
using System;
using System.Data;
using System.Data.Odbc;
namespace consoOracle
{
///
/// Test connexion à Oracle
///
class afficheData
{
private OdbcDataAdapter da;
private DataSet ds;
int scr_no = 905;
public afficheData()
{
lireDataDsOracle();
ecrireDataDsAccess();
}
public void lireDataDsOracle()
{
//1. connexion à Oracle
System.Data.Odbc.OdbcConnection connOra;
connOra = new System.Data.Odbc.OdbcConnection();
connOra.ConnectionString = "DSN=ORA;Uid=uid;Pwd=pwd;";
try
{
//2. préparer une requète
string rqt = "Select LOC_C_LIBELLE_LONG As LOC_C_NOMLOCAL, "
+ "LOC_C_LIBELLE_COURT As LOC_C_NOMLOCALABREGE "
+ "From GEVI_T_LOCAL "
+ "Where LOC_SCR_N_ID = "+scr_no;
OdbcCommand cmd = new OdbcCommand(rqt, connOra);
da = new OdbcDataAdapter();
da.SelectCommand = cmd;
//3. ouvrir la connexion
connOra.Open();
//4. remplir le DataSet
ds = new DataSet();
da.Fill(ds, "Locaux");
// Console.WriteLine(ds.GetXml());
Console.WriteLine("C'est lu");
}
finally
{
//6. fermer tout
connOra.Close();
}
} //lireDataDsOracle()
public void ecrireDataDsAccess()
{
//1. connexion à Access
System.Data.Odbc.OdbcConnection connAcc;
connAcc = new System.Data.Odbc.OdbcConnection();
connAcc.ConnectionString = "DSN=ACC";
try
{
//2. préparer une requète
string rqt = "Select LOC_C_NOMLOCAL, "
+"LOC_C_NOMLOCALABREGE "
+"From GIDE_T_LOCAUX";
OdbcCommand cmd = new OdbcCommand(rqt, connAcc);
OdbcDataAdapter daAcc;
DataSet dsAcc;
daAcc = new OdbcDataAdapter();
daAcc.SelectCommand = cmd;
//3. ouvrir la connexion
connAcc.Open();
//4. remplir le DataSet
dsAcc = new DataSet();
daAcc.Fill(dsAcc, "Locaux");
//5. Merge
dsAcc.Merge(ds);
dsAcc.AcceptChanges();
//6. Ecriture
rqt = "Insert Into GIDE_T_LOCAUX ("
+"LOC_C_NOMLOCAL, "
+"LOC_C_NOMLOCALABREGE) "
+"Values ('@nom', '@nomAbrege'"
+")";
cmd = new OdbcCommand(rqt, connAcc);
cmd.Parameters.Add("@nom", OdbcType.NVarChar, 22, "LOC_C_NOMLOCAL");
cmd.Parameters.Add("@nomAbrege", OdbcType.NVarChar, 22, "LOC_C_NOMLOCALABREGE");
daAcc.InsertCommand = cmd;
try
{
daAcc.Update(dsAcc,"Locaux");
Console.WriteLine("Insertion OK");
}
catch(Exception e)
{
Console.WriteLine(e.ToString());
}
Console.WriteLine(dsAcc.GetXml());
Console.WriteLine("C'est fini");
}
finally
{
//6. fermer tout
connAcc.Close();
}
} //ecrireDataDsAccess()
[STAThread]
static void Main()
{
new afficheData();
} //Main
}
}
|
|
|
|
|
I have a simple combobox that is populated with an array of items. How can I bind alternative data to each item? I am not trying to bring in a datagrid or anything. It isn't that complex. I simply want to choose an "item" within the combobox and when it is chosen display ANOTHER value that is binded to it within a textbox or something. Thanks in Advance.
Dizzle
|
|
|
|
|
If you wan your combobox item have many data you can create custom class and add it to to combo box item collection
public class ComboItemEx
{
private int id;
private string name;
private string address;
public int ID
{
get
{
return id;
}
set
{
id=value;
}
}
public string Name
{
get
{
return name ;
}
set
{
name=value;
}
}
public string Address
{
return address;
}
set
{
address=value;
}
public override ToString()
{
return name;
}
}
and some where you can add it
CombobItemEx cbi=new CombobItemEx();
cbi.ID=44;
cbi.Name="my name";
cbi.Address="my address"
comboBox1.Items.Add(cbi)
MCAD
-- modified at 14:21 Thursday 1st September, 2005
|
|
|
|
|
Thanks for the response, however, it doesn't seem to be working properly. This is my code:
public class ComboItemEx
{
private int id;
private string name;
public int ID
{
get
{
return id;
}
set
{
id=value;
}
}
public string Name
{
get
{
return name ;
}
set
{
name=value;
}
}
}
private void Form1_Load(object sender, System.EventArgs e)
{
comboBox1.SelectedValue = PurchaseOrderStatus.Finalizing;
ComboItemEx cbi=new ComboItemEx();
cbi.ID=44;
cbi.Name="my name";
comboBox14.Items.Add(cbi);
}
This is what it displays in the combobox:
MH53MPreconditions.Form1+ComboItemEx
Isn't there an easier way to do this? Possibly through enumeration? Thanks again.
Dizzle
|
|
|
|
|
Hi!
The ComboBox just shows what an item's ToString() method returns, so just overwrite ToString() to return what you want, for example, the name.
Regards,
mav
|
|
|
|
|
Sorry for that i forget to mention that you must override
ToString() as above response told you
I modified the original post
MCAD
-- modified at 14:24 Thursday 1st September, 2005
|
|
|
|
|
Hi,
I am drawing a line and I would like to draw an arc on the line based on the input angle given. The start point and the end point of the arc should be between the lines. The bubble should be bulgy as and when the degrees increases.
Advance Thanks to everyone.
|
|
|
|
|
Hello
After some methematics recall here is the code:
int length = int.Parse(lengthBox.Text);
float angleDeg = Math.Max(0.0f, Math.Min(90.0f, float.Parse(angleBox.Text)));
float angleRad = angleDeg * (float)(Math.PI / 180);
Graphics g = this.CreateGraphics();
Pen pen = new Pen(Color.Red, 1);
int x = 10;
int y = 150;
g.DrawLine(pen, x, y, x + length, y);
int r = (int) (((double) length / 2) / Math.Sin(angleRad));
int h = (int) (Math.Cos(angleRad) * r);
g.DrawArc(pen, x - (r - length / 2), y - (r - h), r * 2, r * 2, -90 + angleDeg, -2 * angleDeg);
pen.Dispose();
g.Dispose();
With best regards,
Andrew
|
|
|
|
|
Thanks Andrew. Excellent formula.
|
|
|
|
|
Thanx Andrew for the help u have provided.
|
|
|
|
|
how i use interbase database in .net window programing
i need tutoria l of this database..
Never Think That You Have Failed Instead Always Think That u hav Better Chance Next Time...
|
|
|
|
|
Hi,
I have one dataset with two tables, in these tables parent table is related with child table by one column.
I have defined DataRelation object for binding data from these tables into datagrid.
When I bind a dataset with datagrid, the relations between tables are visible as links, on clicking link we can see child table's record. I don't want to display links of datarelations in datagrid.
AllowNavigation property of datagrid doen't work.
Can some one tell the solution?
Thanks
|
|
|
|
|
I have a DataView (dvUnsorted) and I want to sort it by the values in an integerlist(iSortedList), witch responds with the values in the Column "itemID" in dvUsorted.
My idëe is to create a new Column (colSort), and ad the apropiaded value of the items index
in that cell.
So if I have a int[] list = {4,2,66,7}
My dvUnsorted will look someting like this
itemID col1 col2
66 ..
2 ...
7 ..
4 ..
dvUnsorted with the added column "colSort" will lock something like this.
itemID col1 col2 colSort
66 .. 3
2 ... 2
7 .. 4
4 .. 1
and then I youst sort the dvUnsorted by
dvUnsorted.Sort = "colSort ASC";
My code locks something like this
<br />
private DataView dvSortedItems(int[] iSortedList, DataView dvUnsorted)<br />
{<br />
dvUnsorted.Table.Columns.Add("colSort");<br />
for(int i = 0; i < iSortedList.Length; i++)<br />
{<br />
}<br />
dvUnsorted.Sort = "colSort ASC";<br />
return dvUnsorted;<br />
} <br />
So what I need is to find the row where "itemID" = iSortedList[i]
How Can I find that row in the DataList?
If theres someone with a better idëe to sort a DataView by an int[], I would be happy to know.
Thanks
Thomas
|
|
|
|
|
I've found a way
<br />
private DataView dvSortedItems(int[] iSortedList, DataView dvUnsorted)<br />
{<br />
dvUnsorted.Table.Columns.Add("colSort");<br />
for(int i = 0; i < iSortedList.Length; i++)<br />
{<br />
foreach(DataRowView drv in dvUnsorted)<br />
{<br />
if(drv.Row["itemID"].ToString() == iSortedList[i].ToString())<br />
{<br />
drv.Row["colSort"] = i;<br />
break;<br />
}<br />
} <br />
}<br />
dvUnsorted.Sort = "colSort ASC";<br />
return dvUnsorted;<br />
}<br />
|
|
|
|
|
dear helper.
i wrote an ms word Add-in with C#.(comman bar addin)
after installation it work well in my compuer.
but when i want to install this addin in another system with .net framework 1.1 isn't work (maybe it install truly but there isn't any item added to the msword Command bar).
what's the problem.(how can i solve this problem.)
tank's in advance.
rashidi.
|
|
|
|
|
hi!
I want to link every item in listbox to a picturebox in my database,so that items of my listbox are fields in table of my database that have addresses in other column. I build a dataset for listbox with this instruction:
select [temp name] from temp where [temp type]='page'
How can I read contains of address field in my table ?
when I use this code:
dataset.temp.address_column.tostring()
don't resd contains of my address field and yhis string be "address".
please help me,by the way what event can I use for listbox to show pictures
and my table fields are (temp name,temp type,address);
tanx.
Leila Azizkhani
-- modified at 3:10 Thursday 1st September, 2005
|
|
|
|
|
i got a project with a lot of forms.I want this forms to be childs of a parent form.How can I do this thing .Actually I want to transform my project in a MDI..Tank you
|
|
|
|
|
|
Hi,
Anyone knows if there're any sample applications using H.263 or H.323 for audio streaming? Appreciate your help... Thanks!
Cheezo =)
|
|
|
|
|
Greetings,
I'm a classic ASP developer of some years, but a C# noob. I've got a wild hair to write a windows app. I'm trying to convert the code in the excellent "managed shell link" article here:
http://www.codeproject.com/useritems/managed_shell_link.asp
to work with URL links. I've created a copy of the code, and made some changes...namespace to Pvax.URL, class name URLLink, and changed the CLSID_ShellLink line to:
private static readonly Guid CLSID_InternetShortcut = new Guid(0xFBF23B40, 0xE3F0, 0x101B, 0x84, 0x88, 0x00, 0xAA, 0x00, 0x3E, 0x56, 0xF8);
and updated the two references to CLSID_ShellLink to the new constant. But it's not working. Are the IShellLinkA/W calls invalid for URL links? MSDN indicates that internet shortcuts implement the IShellLink interface. Any suggestions?
ehollar
|
|
|
|
|
Hi,
I'm trying to create a simple framework to handle standard DialogBox display, I wish to be able to lock control on the form to avoid moving of the control at design time of course this functionality should work with visual inheritance. At one point a was looking to put these controls private on the base form but I don’t think this is a useful solution since I will need to do more work to publish useful property and reroute event handling properly.
So I have tried to override the fallowing function:
new public Point Location
protected override void OnLocationChanged(EventArgs e)
protected override void OnMove(EventArgs e)
Without success.
Any one as any clue or direction I could try to solve this problem.
Oh yes, you may also think that I’m a bit crazy to do thing like that, yeah maybe but the fact is that we have more than 15 developers that are creating dialog box for a really big application and they have not bean able to get the exact same sizing and behaviour for each of their dialog box and that fact cost us a lot of maintenance for all kind of little stupid thing.
Thanks.
(define Email (lambda ()
elacroix@devmesh.com))
Im not a church numeral im a free variable
|
|
|
|
|
I've had VB .NET classes, but I'm trying to learn C#. Apparently C# doesn't have an inputbox. I added a reference to Microsoft.VisualBasic.dll and tried to use the inputbox from there, but I have a couple of problems.
I get this:
Some code.
It doesn't matter what I've tried to do, I even tried the prompt, title, and default value. I always get no overload method for inputbox takes "n" arguments. Please help.
|
|
|
|