|
Sorry for the late response, but I have been working on it.
What you send is not realy what I need, that is basically built to read messages of .NET components. What I need is to read messages of any program that is running.
Through my long research I discovered Windows does not realy allow this on an easy and efficient way. You have to inject your DLL into the program in order to make it work right.
This is too much work for me...
But for me, the problem was something else, it was Visual Studio 2008.
There is a setting called "Enable the Visual Studio hosting process". This must be turned of in order to make this work. This setting can be found at:
Project >> [project name] Properties... >> Debug >> Enable Debuggers
Thank you for your information, but now I'm just working with Low Level hooks and reading from what program the message comes.
|
|
|
|
|
|
Jamie1985 wrote: CREATE PROCEDURE create_temp_itemschedule AS
CREATE TABLE temp_itemschedules (
Item_Schedule_ID int,
Item_Ref nvarchar (10),
room_code nvarchar (14),
instance_variant int,
ignore_flag nvarchar (1),
Qty_New int,
ADB19_2_Qty int,
Qty_Trans int,
Revision_Version nvarchar (50),
Revision_By nvarchar (50),
Revision_Date smalldate (4),
Revision_Source Ntext,
Notes Ntext)
GO
Jamie - the way to test something like this is to take the statements out and attempt them by yourself in SQL Server. If you had done this, you would have found the reason in a matter of seconds, namely that there is no smalldate datatype in SQL Server (and you need to remove the size of the same field as well - if it's a date it doesn't need a size specifying).
|
|
|
|
|
Don't delete posts when someone replies.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
hi all
i have two forms FORM1 and FORM2.and form1 has two buttons.
when buttons B1,B2 is clicked in FORM1, FORM2 should appear,
but i need to trace which button is clicked .so that i want to display dfferent controls in FORM2 accordin to button click.
Any body give some tips
I am trying to trace the "event e" in the FORM2 's load event.
pls help
senthil
|
|
|
|
|
You can either have two event handlers for your two buttons to distinguish which one was pressed or you can examine the sender property by casting it to appropriate type
|
|
|
|
|
if the event handler is same then use this:
Button b = (Button)sender;
now you can indentify the button by "Name", "Text" or any other property
Becoming Programmer...
|
|
|
|
|
I want to create nullable combobox whuch stores null to datasource when Text
is empty and null value is not in ComboBox Item list.
I tried the code below but null is not stored to s.CustId.
How to change this code so that null is stored to s.CustId ?
It it possible to store null without adding null entity to Customer class ?
I have generic ComboBox which allows to select foreign keys from Customer,
Product etc.
lists.
Generic code to instantiate and add null Id to every such objects seems to
be compilated.
In every list Id and Name propetries have different names, eq. names may be
productname, customername, productcode, customervatno etc.
So I must use CreateInstance to create empty entity object and then use
reflection to set id property to null and foreign key property to empty
string.
This seems to be complicated. So I'm looking for a simpler way to allow
Combobox natively support this.
Andrus.
using System.Windows.Forms;<br />
using System.Collections.Generic;<br />
using System.ComponentModel;<br />
<br />
class testForm : Form {<br />
<br />
Storage s = new Storage();<br />
<br />
testForm() {<br />
<br />
Customer c = new Customer();<br />
c.Id = "J";<br />
c.Name = "John";<br />
List<Customer> l = new List<Customer>();<br />
l.Add(c);<br />
<br />
NullableComBobox cm = new NullableComBobox();<br />
cm.DisplayMember = "Name";<br />
cm.ValueMember = "Id";<br />
cm.DataSource = l;<br />
<br />
s.CustId = "J";<br />
cm.DataBindings.Add("SelectedValue", s, "CustId");<br />
<br />
Controls.Add(cm);<br />
Button b = new Button();<br />
b.Top = 80;<br />
b.Click += new System.EventHandler(b_Click);<br />
Controls.Add(b);<br />
}<br />
<br />
void b_Click(object sender, System.EventArgs e) {<br />
<br />
if (s.CustId == null)<br />
MessageBox.Show("Value is null");<br />
else<br />
MessageBox.Show("Value is NOT null "+s.CustId.ToString());<br />
}<br />
<br />
class Customer {<br />
public string Id { get; set; }<br />
public string Name { get; set; }<br />
}<br />
<br />
class Storage {<br />
public string CustId { get; set; }<br />
}<br />
<br />
static void Main() {<br />
Application.Run(new testForm());<br />
}<br />
}<br />
<br />
public class NullableComBobox : ComboBox {<br />
<br />
protected override void OnValidating(CancelEventArgs e) {<br />
<br />
if (Text.Trim().Length == 0) {<br />
SelectedIndex = -1;<br />
base.OnValidating(e);<br />
return;<br />
}<br />
<br />
int pos = FindString(Text.Trim());<br />
<br />
if (pos >= 0) {<br />
SelectedIndex = pos;<br />
base.OnValidating(e);<br />
return;<br />
}<br />
<br />
e.Cancel = true;<br />
MessageBox.Show("Invalid entry");<br />
base.OnValidating(e);<br />
}<br />
}
Andrus
|
|
|
|
|
hi
I am using Textbox contrl which is disabled for some conditions.
I would like to make the Textboxes back color as white as it looks when it is enabled? Can u pls help how to change its back color?
Thank u
senthil
|
|
|
|
|
Please don't repost a question just to push it back to the top of the forums. This isn't good.
|
|
|
|
|
sorry i actually never meant to repost to make it visible at top!
it was my net problem. since when processing slowed i pressed the post button twice.
kssk
senthil
|
|
|
|
|
kssknov wrote: it was my net problem. since when processing slowed i pressed the post button twice.
Hey, it happens
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Probably the easiest way to do this is for you to derive your own control from the textbox and handle the different background colour in there.
|
|
|
|
|
Not sure if this is an option for your particular situation or not.
When I need behavior like this I set the textbox to readonly instead of disabled. That way I can modify the backcolor.
txtBox.ReadOnly = true;
txtBox.BackColor = System.Drawing.Color.White;
Hope this helps.
|
|
|
|
|
man, it quite easy, just change backcolor to White from Windows
Becoming Programmer...
|
|
|
|
|
I thought you could set a textbox to ReadOnly and Enabled .
ReadOnly would leave the BackColor to white, while Enabled would set it gray.
you can always set the BackColor to virtually any Color you want after you've set it ReadOnly or Enabled
Hope this helps.
|
|
|
|
|
IIRC read only allows you to select text, disabled does not.
Otherwise [Microsoft is] toast in the long term no matter how much money they've got. They would be already if the Linux community didn't have it's head so firmly up it's own command line buffer that it looks like taking 15 years to find the desktop.
-- Matthew Faithfull
|
|
|
|
|
HI
Can any one kindly let me know, how the array list has been implmented in .Net frame work, i have heard it has been implemented as link list at the back end, kindly let me know asap, thankx in advance,
regards,
|
|
|
|
|
You can use Reflector for .NET to see how it is implemented or wait until the source code is released publicly by Microsoft.
|
|
|
|
|
Hi,
I have a MIB file, here's a piece:
nlmLogVariableOpaqueVal OBJECT-TYPE<br />
SYNTAX Opaque<br />
MAX-ACCESS read-only<br />
STATUS current<br />
DESCRIPTION<br />
"The value when nlmLogVariableType is 'opaque'."<br />
::= { nlmLogVariableEntry 12 }<br />
<br />
<br />
--<br />
-- Conformance<br />
--<br />
<br />
notificationLogMIBConformance OBJECT IDENTIFIER ::=<br />
{ notificationLogMIB 3 }<br />
notificationLogMIBCompliances OBJECT IDENTIFIER ::=<br />
{ notificationLogMIBConformance 1 }<br />
notificationLogMIBGroups OBJECT IDENTIFIER ::=<br />
{ notificationLogMIBConformance 2 }<br />
<br />
-- Compliance
How can I get every occurence of OBJECT IDENTIFIER? I do something like this:
Regex objIdentifiers = new Regex(@"(?<name>[a-z][\d\w0-9-]*).*(\n|\s|\t)*OBJECT IDENTIFIER.*(\s|\t|\n)*::=(\s|\t)*{(\s|\t)*(?<enterprise>[\d\w0-9-]*)(\s|\t)*(?<number>[0-9])(\s|\t)*}");<br />
<br />
MatchCollection matches = objIdentifiers.Matches(s);</number></enterprise></name>
But this doesn't work. I should mention that those definitions sometimes look like this:
notificationLogMIBGroups OBJECT IDENTIFIER ::=<br />
-- Comment<br />
{ notificationLogMIBConformance 2 }
Thanks in advance!
Greetings.
ps. after quotation marks are group names, but I don't know why won't show them in this post :/
|
|
|
|
|
hi i want to i have 100 user name in a data table and want to show them in multiple coulmn in Crystal report means that fir 25 in firsy column then 25 to 50 in second columns and the 50 to 75 in thrid Column and remaining in fourt coulmn how i can do this
wasim khan
|
|
|
|
|
How to write/add/change a EnterpriseCustomFlield (Name: CRFNAME Type: Text Readonly :false) by adding a Taks to a new Project.
How to Change this EnterpriseCustomFlield (Name: CRFNAME Type: Text Readonly :false) at ChangeProjectTaskEntrys?
How to get EnterpriseCustomFlield (Name: CRFNAME Type: Text Readonly :false) value at ReadProjectTaskEntrys?
Anybody a Idea? The MSDN helps me NOT.
THX 4 Help
thx Robert
|
|
|
|
|
Have you googled around or looked deeper in MSDN?
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|
|
Yes, but all what you find is not that i need or it is unter diskussion . Project Server 2007 is totaly new.
thx Robert
|
|
|
|
|
RobertSoelner wrote: Project Server 2007 is totaly new.
I would be interested in seeing stuff on Project Server 2007. If it is totally new, then information out there is going to be limited until people start writing and telling others about it. Sounds like good Code Project article material if you ask me.
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
|
|
|
|