|
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!!!
}
|
|
|
|
|
Hello everyone,
I am using C# and Visual Studio 2005 to develop a class library. I am wondering whether there are any built-in log component in C# so that I can utilize directly other than write from scratch?
I am also wondering if there does exist such log component, if multiple processes using the built-in log component to open the same log file to write log (in my application, I want all processes which loads the class library DLL to have a common log file), will there be any risk of racing condition (e.g. interlacing log of one process and another process)? Do we need any lock/synchronization approach?
thanks in advance,
George
|
|
|
|
|
George_George wrote: I am wondering whether there are any built-in log component in C# so that I can utilize directly other than write from scratch?
There are classes that allow you to write to the event log. However, if you want a proper log component you'll have to look for things like log4net or the Microsoft Enterprise Library Logging Application Block.
|
|
|
|
|
Seconded on log4net. Very easy to get up and running.... or logging.
|
|
|
|
|
Thanks Mark,
Microsoft has no built-in Log function?
regards,
George
|
|
|
|
|
Well we went with log4net because it had some features we wanted to use in the future. Firstly we had it logging to SQL server, but then we got it to shoot out UDP packets for high priority log entries to a remote console (in another country)!
You can log to the windows event log using (it think) classes in System.Diagnostics, thats quite easy to get working.
|
|
|
|
|
Thanks Mark,
What means *shoot out UDP packets for high priority log entries*? Why using UDP for high priority? What packages do you use for normal priority log -- TCP?
regards,
George
|
|
|
|
|
Ah sorry to be confusing. We log everything to SQL server. High priority messages (non sensitive) get stuffed in a UDP packet (theres a UDP log appender for log4net) and sent to my laptop. I run a program on my laptop that pops up - so if anything serious is going on then I know about it.
As for UDP/TCP... UDP is a little more convenient than TCP, as there is no connection setup. You can just stick a packet with a destination address out on the wire and it will (probably) get to the destination
|
|
|
|