|
Read about the tlbimp[^] tool. It generates a wrapper around the COM object, that is callable from any .NET language.
|
|
|
|
|
Hi!
I hv to fix the image button & label box into the Datagrid.,
In that imgbtn & lblbox i hv to display dynamic values retrieves frm
DB., I am using c# coding how can we do this one..?
T.Prabu
|
|
|
|
|
Hi,
ASP.NET Datagrid has an event known as ItemDataBound event. Basically this event will get fired when each row is binding to the datagrid.
So for displaying the image button and label, you can itemtemplate of the datagrid and for databinding to these controls, you can use ItemDataBound event
The syntax of ItemDataBound event is given below
private void YourDataGridName_ItemDataBound(object sender, System.Web.UI.WebControls.DataGridItemEventArgs e)
{
//Here you should get the dynamic data from Database/file system etc. and bind to the controls
}
--Rakheesh
|
|
|
|
|
Hi all,
we have a singleton class which has some functions used to do testing a harware.
Our main Exe will create an object for that singleton class(which opens Com1 port and communicate with hardware). so the Exe will do communication test with hardware it is working well. We are using one testing tool (teststand)(a COM EXE)to do various testing with hardware, Testing tool provided some class libraries to execute test profiles . Main exe will use these libraries to execute tests when the user clicks Testbutton. after that testing tool(teststand) try to create an object for that singleton but it returns new object not the existing one which is created by EXE. So it throwing me exeception "Com1 port access denied." (since we created object for signleton class @ very first in EXE)
My question is Since that testing tool runs in a separate Appdoamin will the singlton class create separate object for different appdomain? if so is there any solution to reslove this?
Hope i clearly explained my probs.
Thanks in advance
Srini
|
|
|
|
|
The library is loaded separately for each application, so you can't share a singleton between applications.
---
b { font-weight: normal; }
|
|
|
|
|
I need convert byte[] to system.Drawing.Image
This code Download Image from URI , i need put image in pictureBox after Downloaded .
WebDownload webDL = new WebDownload();
byte[] downloadedData = webDL.Download(DownloadUrl, ProgressCallback );
CompleteCallback( downloadedData );
ImageDisplay ds = new ImageDisplay();
ds.pictureBox1.Image = (Image)downloadedData;
help me ...
-- modified at 2:00 Wednesday 9th August, 2006
|
|
|
|
|
How about this:
byte[] data = new byte[5] {1, 2, 3, 4, 5};
MemoryStream memoryStream = new MemoryStream(data);
Image img = Image.FromStream(memoryStream);
|
|
|
|
|
thank you Man , I love you
|
|
|
|
|
hi all ,
there are 4 field (name , family name , ave , stNumber )in my table . for this , in my form(form1) I've 4 CheckBox Control . I want to take a report whenever the user select one or two or ... of them . for example , if the user checked CheckBox1(for the name field ) and CheckBox2(for the family field) , In outpout report show , name and family . how can i dot with crystal report ?
plz help me .
s_mostafa_h
|
|
|
|
|
my table?
if you user datagrid,maybe it's easy to do
|
|
|
|
|
can you more explain or give a sample or ...
regards,
|
|
|
|
|
rainfeet: if you user datagrid,maybe it's easy to do
How ?
-- modified at 8:06 Wednesday 9th August, 2006
s_mostafa_h
|
|
|
|
|
Hi all,
I had SQL Server 2005 EXPRESS installed in my Computer (WIN XP) and I have just got SQL SERVER 2005 Enterprize edition. Now, I wanted to install SQL ENTERPRIZE but I got message that, a SQL Server instance is running so .etc.. and failed. So My point is, I want to develop Windows application using SQL Server Express 2005 so that it is easy to ship and free to distribute. But I want to have SQL Server Enterprize for Web Development purpose and other reasearch work. Is it not possible to keep both of them at the same time ?
AND .. CAN I USE SQLEXPRESS WITH VISUAL STUDIO 2005 PROFESSIONAL ?
Thanks
EMRAN
-- modified at 23:34 Tuesday 8th August, 2006
|
|
|
|
|
Hello
emran834 wrote: Is it not possible to keep both of them at the same time ?
As far as I know it's possible. You can install multiple SQL servers on a single machine using different instance names. Maye you should post the whole error message. And of course I don't think I have to remind you that you should close Visual studio and/or any other program using SQL server.
emran834 wrote: CAN I USE SQLEXPRESS WITH VISUAL STUDIO 2005 PROFESSIONAL ?
Sure!! Why not?? I do it all the time
Regards
|
|
|
|
|
how to retrieve motherboard serial number of own machine?
|
|
|
|
|
That depends on if the manufacturer provided WMI classes to supply this information. Most don't. On top of that, the information has to be provided by the motherboard. Again, most don't provide this.
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hello
Retrieving such information can not be done using C# usually. You'll have to either use interrupts - eg. INT21H- or access BIOS directly. Both of which requires good knowledge of assembly language, and a hardware background. Also if it's possible in one motherboard, it could be not in another, ie. it's a hardware specific procedure with quite some variations.
Regards
|
|
|
|
|
|
Hai Friends
Is there any sample/ Open source or Article that decribes how to code ISO 8583 Formatter in C#.
Please help me . its so urgent.
Thanks in advance
|
|
|
|
|
The above code (C#)works as fare as the MessageBox.Show("The name of the second column is " + colSecond.ColumnName); can answer the question so the connection to the database is okay .. But no data are shown in the datagrid..
Whats wrong.. guess its something to do with the databinding ??
MySqlConnection cnnVideos = new MySqlConnection("Database=tiebreak;Data Source=localhost;User Id=root;Password=test");
cnnVideos.Open();
string strVideos = "SELECT * from member;";
MySqlCommand cmdVideos = new MySqlCommand(strVideos, cnnVideos);
MySqlDataAdapter dadVideoCollection = new MySqlDataAdapter(cmdVideos);
DataSet setVideos = new DataSet("member");
dadVideoCollection.Fill(setVideos);
dataGrid1.DataSource = setVideos;
dataGrid1.DataMember = setVideos.Tables[0].TableName;
dataGrid1.SetDataBinding(setVideos, "member");
DataColumn colSecond = setVideos.Tables[0].Columns[2];
MessageBox.Show("The name of the second column is " + colSecond.ColumnName);
cnnVideos.Close();
-- modified at 20:26 Tuesday 8th August, 2006
|
|
|
|
|
dataGrid1.SetDataBinding(setVideos, "member");
see !you can chang the sequence like dataGrid1.SetDataBinding("member",setVideos);
|
|
|
|
|
Hmm excuse me, but I didn't understand your reply ..
First of all, I currently had it like dataGrid1.SetDataBinding(setVideos, "member"); .. And no I cant change the order, it will give compile errors.. ? what where the problems that you saw ?
|
|
|
|
|
Tried to add the following:
DataSet setVideos = new DataSet("setVideos");
setVideos.Tables.add(new DataTable("name"));
setVideos.Tables.add(new DataTable("adress"));
but it returns the following error:
System.Data.DataTableCollection' does not contain a definition for 'add'
|
|
|
|
|
Hi,
I just know this is a dumb simple question BUT I can't figure it out .
I'm trying to break my code into several codefiles to make it easier to follow. I thought all you had to do was use the same namespace declaration in each of them and then the code/methods in those *.cs files would be freely "interchangeable" and usable.
I've added codefiles using the add to project options in Solution Explorer, used the same namespace in the new codefile but I can't use a method in the main code file that is located in the other codefile.
When I reference the method I keep getting the error "The name 'getYMDHMS' does not exist in the current context".
Can someone be kind enough to put me out of my misery and tell me what I'm doing wrong .
Thanks,
Glen Harvy
|
|
|
|
|
Hmm, when you say you can't use a method in the main code file that is located in another codefile, do you mean that you can't use the class that contains the method in one file in another file?
Let's say you have a file in your project called Program.cs. I'm assuming that we're creating a console application program. Here is what the Program.cs file looks like:
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
}
}
}
Now, let's add a second file, actually we'll be adding a second class that will be contained in a second file. We'll call it MyClass.
Go to Project->Add New Item
Choose Class, and type MyClass in the edit box. Then press the Add button.
Visual studio has created a second file for use called MyClass.cs. It looks like this:
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication1
{
class MyClass
{
}
}
Let's add a static method to MyClass that we can call from the Main method in the Program class:
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication1
{
class MyClass
{
public static void PrintHello()
{
Console.WriteLine("Hello!");
}
}
}
Change the Main method in the Program class located in the Program.cs file to look like this:
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
MyClass.PrintHello();
Console.Read();
}
}
}
Run the program.
To review: We've created a console application and added a second class called MyClass contained in a second file called MyClass.cs. We called a static method in MyClass from the Main method in the Program class.
Does this example help?
If you need more information, let me know.
|
|
|
|