|
Hi all,
Are there any notification class in C# which can be used to program user notification event or system notification event ?
Thanks
|
|
|
|
|
You can write to the Windows-System Eventlogs using System.Diagnostics.EventLog.
That way, you can create your own log or use one of the existing logs or even write to a remote log (log on another computer).
To notify a user of some problem, try using System.Windows.Forms.MessageBox.Show()
|
|
|
|
|
;PI want write a windows application that regularly polls a specific folder to see if any new files have been placed there. If a file is found, it must be displayed in a list within the program. The user then has the ability to select the new files one at a time and provide three text descriptions for them (e.g. Department to which the document must go, Recipient, and Description). These descriptions must be placed into an XML file with the same name as the original file (but with an .xml extension), and this XML file, together with the original file, must be moved to a new directory and removed from the list.
Lonwabo South africa
|
|
|
|
|
You gave a nice description of your task, but what do you expect from us; what are your problems with this task?
If it's only the polling of folders as the subject implicates you should take a look at the FileSystemWatcher Class, which listens to the file system change notifications and raises events when a directory, or file in a directory, changes.
www.troschuetz.de
|
|
|
|
|
i have string that have some problems with characters....i need to change this character to the right format...
//worng string encoding unknown...
string str1="=E7gs=F6si"
i need to convert str1 to str2....
//correct string with encoding windows-1254
string str2="çğşöı"
how can i do that?....
hi all friends!!
piece in home,piece in world!
|
|
|
|
|
the first string seems to be Base64-Encoded.
Look up Base64 in the MSDN, .NET has special classes to deal with this encoding. Try decoding the string using these classes.
|
|
|
|
|
Hi,
I want to start a process from my c# application for example
Process.Start("c:\Program Files\some_app.exe")
but Process.Start isn't supported in the compact framework, now I know you can use it by installing OpenNetCF but I don't want to do that.
Can anybody give me a good replacement for Process.Start?
Thnx
Davy
|
|
|
|
|
Hi All
Is there any way to find the avilable COM ports in system ?
Pls reply ..
Thanks & Regards
Krishnan
If u can Dream... U can do it
|
|
|
|
|
the easiest way is to try to open any existing port. If the port exist but already in use, any attemt to open it will fail.
For more information about working with COM-ports make a search on MSDN looking for RS232 - a standard for serial communications.
"Absolution requires sacrifice" -- Dan Brown 'The Da Vinci code'
|
|
|
|
|
DropDownList1.Items.Add ( "One" );
DropDownList1.Items.Add ( "Two" );
DropDownList1.SelectedIndex = -1;
why I still got One in my DropDown? I want got no selection.
Is there any property in dropdownlist muse be set?
Thankx
|
|
|
|
|
DropDownList1.Items.Add ( "" );
DropDownList1.Items.Add ( "One" );
DropDownList1.Items.Add ( "Two" );
DropDownList1.SelectedIndex = -1;
and after you have to call explicitly an event procedure for SelectedIndexChanged event because server-side event procedures requre a round trip to the Web server which doesn't happen if you change SelectedIndex value programmatically.
"Absolution requires sacrifice" -- Dan Brown 'The Da Vinci code'
|
|
|
|
|
hello mr
simply add
DropDownList1.Items.Add("")
DropDownList1.Items.Add("one")
.........
|
|
|
|
|
Hi,
plz plz help me i am struggling to display image in a picture box.. i am developing applicaiton where i have to call VC++ dll function to display image in picturebox of C# form.For that I should pass device context of picture box where i have to display image.But the problem is there is no device context for the picturebox....
I tried various method by converting picturebox to graphics object, and getting deivice context (objGfx.GetHdc()) and also pinvoke GetDC() (from user32.dll ) but to make my life miserable both are not working or I am making some silly mistake. Some sample code or link to the article where above problem is explaned will be helpful.
handle123
|
|
|
|
|
Try passing the device context of the image:
<br />
Image img = picturebox.Image;<br />
Graphics graphics = Graphics.FromImage(img);<br />
IntPtr hdc = graphics.GetHdc();<br />
<br />
<br />
graphics.ReleaseHdc(hdc);<br />
graphics.Dispose();<br />
<br />
picturebox.Refresh();<br />
_________________________________
nur Idioten brauchen einen Führer
|
|
|
|
|
thanks for reply... I tried as you told but program is crashing at line
Graphics graphics = Graphics.FromImage(img);
because 'img' is undefined value and not set to anything because picturebox is empty initialy. )
|
|
|
|
|
Do you know the expected dimensions of the image?
<br />
picturebox.Image = new Bitmap(width, height);<br />
_________________________________
nur Idioten brauchen einen Führer
|
|
|
|
|
I think i can use width and hieght of the picturebox.... i did the same but it is still not showing any image in picturebox... I am sending you the code snippet i have written.I am wiriting this code in the wndproc of the form ... I am not writing OnPaint()... ???
pictureBox1.Image = new Bitmap(pictureBox1.Height,pictureBox1.Width);
Image image = pictureBox1.Image;
gfx = Graphics.FromImage(image);
objFusion.m_hdc = gfx.GetHdc();
Int32 a = DrawLiveImage(objFusion.ConHandle,3,objFusion.m_hdc,ref rect);
if(a !=0)
{
MessageBox.Show(a.ToString());
}
gfx.ReleaseHdc(objFusion.m_hdc);
gfx.Dispose();
pictureBox1.Refresh();
here objFusion is the object where other VC++ dll calls are done and DVRDrawLiveImage is the function in a dll, this dll we are using to draw images in picture box which we are getting from Digital Video recorder.We get video image frames and we need to draw that in a picturebox.
|
|
|
|
|
good day.. jz wna know how i can show the list of tables in a database using listbox?? and once i click on a specific table, its contents will be shown on a datagrid.. btw, m using sql server.. thanks in advance!!
|
|
|
|
|
|
Hi,
Can we embedd the windows application created in C# .NET in MFC ActiveX Container application.
Thanks
TusharM.
|
|
|
|
|
does anyone know the function for the system beep? i would appreciate the help, thx in advance
IM PROUD TO BE A GMAIL;
|
|
|
|
|
|
thx
IM PROUD TO BE A GMAIL;
|
|
|
|
|
hello mr
like c and c++ , an 'escape sequences' available in c#.for instance
"\n" represents 'new line' that means it creates a new empty line and make cursor wait at starting of next line.
like wise in c# for beep u need to send an escape sequence for beep
in c#
console.writeline("this is beep" + "\t");
the beep sound can be heard after the message appeared
in vb.net
console.writeline("this is beep")
beep
|
|
|
|
|
im using whidbey and i found a function...
console.beep();
'and i thought it was \a for the beep
IM PROUD TO BE A GMAIL;
|
|
|
|