|
I think it should look like this:
<br />
ListOfMyType.InvokeMember("Add", BindingFlags.Public | BindingFlags.InvokeMethod, null, myObject, new object[] { myType1 } );<br />
|
|
|
|
|
Ah didn`t created instance of class .... everything works now thanks !
|
|
|
|
|
You are welcome
|
|
|
|
|
//code is like this...
[XmlRoot("AutoupData")]
public class AutoupData
{
private ArrayList VersionArray;
public AutoupData()
{
VersionArray = new ArrayList();
}
[System.Xml.Serialization.XmlElement("versionInfo")]
public VersionC[] VersionInfos
{
get
{
VersionC[] VersionInfos = new VersionC[VersionArray.Count];
VersionArray.CopyTo(VersionInfos);
return VersionInfos;
}
set
{
if (value == null) return;
VersionC[] VersionInfos = (VersionC[])value;
VersionArray.Clear();
foreach (VersionC Versioninfo in VersionInfos)
VersionArray.Add(Versioninfo);
}
}
public int AddItem(VersionC VersionInfo)
{
return VersionArray.Add(VersionInfo);
}
}
public class VersionC
{
[XmlAttribute("version")]
public float version;
public VersionC()
{
}
public VersionC(float Version)
{
version = Version;
}
}
//code end...
is this using boxing and unboxing?
if it does then how can I convert this code to generic one?
I'm trying hard but the concept is so difficult to me.
please help me.
thanks.
|
|
|
|
|
arbrsoft wrote: is this using boxing and unboxing?
No. VersionC is a class . Only struct s cause boxing and unboxing.
arbrsoft wrote: if it does then how can I convert this code to generic one?
If you are using .NET 2.0 you should look at the Collection classes and then return a ReadOnlyCollection rather than copy arrays around. It might improve your design.
|
|
|
|
|
Hello everyone,
Can someone tell me little about streaming Media Files (Movie) over network using .Net Frame work?
I would like to make am Windows Application with can be used to receive and play movie files in the user application. Right now I am reading about DirectShow but I cannot find anything on sending and receiving media files (Audio/Video) over Network.
Any help to put me in the right direction will be great. Thank you very much and have a great day.
Khoramdin
|
|
|
|
|
there is an ole field in the database , now i want that pic to show in the c# form.
How can i do it?
Soniagupta1@yahoo.co.in
|
|
|
|
|
do u want to show pic in the windows imahe control of windows form.
Hello Forum
Always be in touch to help about the topic ASP.NET
|
|
|
|
|
yes sir
Soniagupta1@yahoo.co.in
|
|
|
|
|
What strikes in my mind about ur problem is that u try to save path of image u want to display and than using pic control in windows u can dynamically set the property of path of control to image from database.
reply me if found any confussion or i am understanding mistaken.
Hello Forum
Always be in touch to help about the topic ASP.NET
|
|
|
|
|
sir i am not storing the image path in the database , there exist an ole type column there i am saving the image.
Soniagupta1@yahoo.co.in
|
|
|
|
|
may i know what exact the functionality is there are many possible ways to resolve the same.
Hello Forum
Always be in touch to help about the topic ASP.NET
|
|
|
|
|
sir, all i want to do is to show the pic in the image control (the pic which is stored in the database in the ole type).
Soniagupta1@yahoo.co.in
|
|
|
|
|
are u able to retrive image from data base in correct format.
Hello Forum
Always be in touch to help about the topic ASP.NET
|
|
|
|
|
this is the problem i am not being able to retrieve the image and i am not being able to show the image in the c# form.
Soniagupta1@yahoo.co.in
|
|
|
|
|
commandbutton1.Picture = LoadPicture(recordset !Olefieldname)
OR
Drawing.ImageConverter.ConvertFrom(object)
Try this... i am not sire but i hope from Drawing class the object of ole is get converted to image type and assign to pic control.
Hello Forum
Always be in touch to help about the topic ASP.NET
|
|
|
|
|
|
Hi all,
I want to change the property of button on one page "A" from other page "B"
Please suggest me how to do same with out search control.
Hello Forum
Always be in touch to help about the topic ASP.NET
|
|
|
|
|
sulabh2020 wrote: I want to change the property of button on one page "A" from other page "B"
Please suggest me how to do same with out search control.
I think this article[^] will help you. Since changing a property is just sending it a new value the concept given in the article will work.
However, I'm not sure what you mean by a "search control". There is no search control in .NET.
Sorry, I misread the original post. I thought you were talking about Winforms application as this wasn't in the ASP.NET forum.
-- modified at 6:48 Saturday 15th September, 2007
|
|
|
|
|
If it's a server control on a web page, then you can't do it. The server controls only exist while the page is being created, and only one page at a time is created for each user. The controls never exist at the same time.
If it's an element on a web page, you have to use Javascript.
If it a control on a form in a program, you need a reference to the form where the control is that you want to change.
---
single minded; short sighted; long gone;
|
|
|
|
|
Hi!
I want to create file updater but i want to see the progress in the form (by text labels).
in which Event should i start the application so the Form will be loaded and visible on the screen?
(I have tried Form_Load,Form_Shown,Form_Activated and they all run the application before the form is visible)
maybe the application is fast then how can i wait for the Form to Load and then run the application, should i use theards?How?
I am trying to run this from the Main of the Form but i can not run this because i get that my main function needs to be with an Object Reference.
how can i run it?
Thanks
-- modified at 5:57 Saturday 15th September, 2007
|
|
|
|
|
According to MSDN Shown event occurs whenever the form is first displayed so it should meet your needs.
|
|
|
|
|
I saw it too, but it does not, i have an image on the form and so i see only the frame and not the form it self 
|
|
|
|
|
Can you post the code snippet?
|
|
|
|
|
This is the main function:
public void Form1_Main()
{
if (copyBool)
{
//Find if Application is running
copyBool = false;
// int window = FindWindow("Virtual DJ", true);
// if(window == 0)
// this.Close();
int window = 1;
if (window != 0)
{
string FolderPath = null;
TreeNode tr = null;
Diractory_Path dp = new Diractory_Path();
dp.GetFolderMusicPath();
FolderPath = dp.GetPathString();
if (FolderPath == "")
{
MessageBox.Show("The Path is empty, the program ended!!!");
this.Close();
}
label1.Text = "The Files are being transfared!!!";
///This is The copy files function!!!
CopyFolderData(FolderPath, ref tr);
///This is the Uodate XML section.
label1.Text = "The XML are being Updated!!!";
XML_Handle xml_h = new XML_Handle();
xml_h.XMLHandleMain();
if (xml_h.GetXMLFile() == " ")
this.Close();
xml_h.HandleXMLData();
///This is the Playlists creation.
label1.Text = "The PlayLists are being created!!!";
PlayList playList = new PlayList();
playList.PlayListHandleMain(tr);
label1.Text = "Test Was Finished!!!";
System.Threading.Thread.Sleep(2000);
this.Close();
}
}
}
This is the call:
static void Main()
{
Application.Run(new Form1());
this.Form1_Main();
///The installation project starts here!!!
}
|
|
|
|