|
Use 01-Jan-1982 as date.
---
Eat Bytes Everyday
Zakaria Bin Abdur Rouf
zakaria7@gmail.com
|
|
|
|
|
Hi all,
How can I write a hook to detect screen updates using C#?
What I'm trying to get is how to use SetWindowsHookEx to grab all paint messages that occur on-screen, so that I can then grab the update rectangle.
Thanks in advance,
Razi
|
|
|
|
|
I can I write on a label that was created in C#?
I can I simulate a handdrawing of the letter A, for example, in C#?
bybete
|
|
|
|
|
bybete wrote: I can I write on a label that was created in C#?
If you are referring to a Label control you can set its Text property to what ever string you want.
bybete wrote: I can I simulate a handdrawing of the letter A, for example, in C#?
You can draw what ever you want also as GDI is wrapped up in the System.Drawing[^] namespace
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
My: Website | Blog
|
|
|
|
|
Hi, how I can acces properties of component I created:
I create 2 label in my form1, and later I want to get text from each of those labels
I think it should look like this
foreach(Label l in Form1.label)
{
console.write(l.text);
}
but I`m wrong...
|
|
|
|
|
Try this code:
foreach(Control ctrl in form1.Controls)
{
if (ctrl is Label)
{
console.write(((Label)ctrl).Text);
}
}
Best regards, Alexey.
|
|
|
|
|
First of all thank you for your answer, but I get this error
An object reference is required for the nonstatic field, method, or property 'System.Windows.Forms.Control.Controls.get'
|
|
|
|
|
Sorry everything is now working thank you very much
|
|
|
|
|
can somebody give me some knowledge about common language runtime and microsoft intermediate language
Thank You
Pankaj Garg
|
|
|
|
|
Such as?? Your question is way to general to answer with anything other than a link to the Develpmer's Guide[^].
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Hey guys, I have alot of data and I want to move them from my Excel file to my access Database, So I wouldn't Have to do any Data Entery !
Is there any way I can do it By C# or the fact that both are part of Microsoft Office, there is a way to do such a thing ?!!
can you help me out plz !?!
|
|
|
|
|
create blank database in access,
then use Insert>Table Import Table wizard.
Shajeel
|
|
|
|
|
How can I check string is it valid date using Regular Expression
|
|
|
|
|
|
Hi everyone,
I have a problem re: DataBindings. I binded a textbox with a database in which I would like to show the date in it, but unfortunately I can't remove the time, so that in the textbox the date only is shown. How can I do it? The following is the code I used for databinding.
this.txtDOB.DataBindings.Add("Text", DBHandler.DS, "UserLogInsteacher.DateOfBirth");
Thanks a lot!!
|
|
|
|
|
The Add call returns a Binding[^] object which has a Format[^] event. Use it to format your data.
|
|
|
|
|
I didn't understand you quite well. How can I do that?
|
|
|
|
|
Something like this (not tested):
Binding binding = this.txtDOB.DataBindings.Add("Text", DBHandler.DS, "UserLogInsteacher.DateOfBirth");
binding.Format += new ConvertEventHandler(binding_Format);
and
private void binding_Format(object sender, ConvertEventArgs e)
{
DateTime dt = (DateTime)e.Value;
e.Value = dt.ToShortDateString();
}
Some error handling etc should be added (like checking for DbNull etc.)
|
|
|
|
|
Hi,
i'm trying to create a dialog in c#, that populates a listbox with built-in users, on an xp, yet it should allow the user to browse for users from active direcotry outside their local machine.
actually i'm trying to mimic a dialog that shows in:
SQLServer2000 Enterprise Manager/security/logins/new login/browse button (...)
please advice, and many thanks in advace.
|
|
|
|
|
hi eyad do want to retrive the onfo. about users in the active directory domain.
|
|
|
|
|
i think this code will help you ;
but first you should sign on the domain as a administrator
then add the active directory refference to the code below:
////
//
//
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.DirectoryServices;// the active dirctory library
namespace abdallah1
{
///
/// Summary description for WebForm1.
///
public class WebForm1 : System.Web.UI.Page
{
protected System.Web.UI.WebControls.Label Label1;
protected System.Web.UI.WebControls.Button Button1;
protected System.Web.UI.WebControls.ListBox ListBox1;
private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
}
private void retrivedata(string strDoamin)
{
DirectoryEntry obDirEntry = null;
try
{
obDirEntry = new DirectoryEntry("WinNT://" + strDoamin);
DirectoryEntries entries = obDirEntry.Children;
foreach (DirectoryEntry chil in entries )
{
if ( chil.SchemaClassName =="User")// to retrive the user only
{
ListBox1.Items.Add( chil.Name + "//" +chil.SchemaClassName);
}
}
}
catch (Exception ex)
{
Trace.Warn(ex.Message);
}
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}
///
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
///
private void InitializeComponent()
{
this.Button1.Click += new System.EventHandler(this.Button1_Click);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
private void Button1_Click(object sender, System.EventArgs e)
{
retrivedata ("nwtraders");
Label1.Text="Data retrived sucssfully";
}
}
}
////////
|
|
|
|
|
Thanks alot abdallah for your help, it worked great.
|
|
|
|
|
:->hi every one ,
i need some info. about rational rose model , its related with softwear eng.
so any info. will be usful for me .
my best Regards for all.
abdallah zaid
|
|
|
|
|
|
:->thx for your help alexey ,
my regards.
abdallah ziad
|
|
|
|