|
key strokes as in the key's ASCII code>? oops forget the
|
|
|
|
|
Can anybody explain or point me to some sample code how to use the NotifyIcon class in C#? My main goal is to get my dialog app to minimize to the systray. The documentation in the SDK shows *no* sample code that I can find.
__________________________
do {
cout << "I will never use = when I mean == " << endl;
cout << "I will never use = when I mean == " << endl;
} while (i = 1)
|
|
|
|
|
Here are a few examples that use the system tray:
http://www.gotdotnet.com/userarea/keywordsrch.aspx?keyword=system%20tray
|
|
|
|
|
Thanks Eric. Finding good C# help in forums is pretty difficult. The documentation is great for most things but its hard to piece things together sometimes. The gotdotnet.com site has been the best thing that I have found so far.
Still wish I knew of a forum that was pretty active.
__________________________
do {
cout << "I will never use = when I mean == " << endl;
} while (i = 1)
|
|
|
|
|
Hey all!
I have background in VB6, Visual C++, Java, some COM, ASP + ADODB, some XML, and the such.
I would like to jump into the .NET water! I'm a very quick learner, but since I don't have a lot of free time on my hands, I would like a few pointers before I start learning .NET.
I want to be able to develop dynamic websites using ASP.NET as quickly as possible - and then move on to Web services and applcation programming.
For those purposes, should I really concentrate on C#? I understood that I can program ASP.NET with VB.NET as well as with C#. What would I like better? Is any of the two objectively better from some aspects? As I understood they're both object oriented, and both compile into managed code, so I guess there would be no performance nor OO difference...
And anyway, since I'm a bit overwhelemed by all those different options and technologies, I'm really interested in stories of people who have "been there", and chose their direction in exploring the .NET world... If you could tell me why you chose this or that way, it would be great
Thanks a lot!
|
|
|
|
|
Bottom line answer:
If you have VB skills already then go with VB.NET.
If you have C++ or Java skills, go with C#.
For webapplications I would say that the C# vs. VB.NET arguement is a much of a muchness i.e. not much in it either way.
I personally decided to go with C# simply because from what I have read it is a great language and I have found some spare time to learn it. So far I have been very happy with the choice and, being a VB programmer, found the language easy to pick up but very powerful.
regards,
Paul Watson
Bluegrass
Cape Town, South Africa
"We would accomplish many more things if we did not think of them as impossible."
- Chretien Malesherbes
|
|
|
|
|
Well, what I am doing is learning all the languages at once...it has been a hell of a lot of fun. BUT as time progresses, i see myself also leaning into more and more C#...I dont know what it is, maybe its the fact that I like VB but wunna learn C++ or maybe that im taking a C++ course at school...or maybe its the devil pushing me into hell...i dunno what it is but I LOVE C SHARP!! haha, go with C# man, it is easy to learn and takes skillz of both VB and C++...
btw, id like to state that i am learning
C++ 6.0
C#
VB 6.0
VB.NET and
Flash
ALL AT THE SAME TIME!! lol its soo much fun, but hard!
|
|
|
|
|
I want to convert a color bitmap to black an white. I attempted to create a graphics object from an image with 1 bit per pixel color depth, and then used graphics.drawimage(image iColorImage) to draw the color image onto the b/w graphics object. This results in an out of memory error. Does anyone have a snippet of code that does this?
Thanks
|
|
|
|
|
Joe, if you're talking about going from Color to GreyScale, I have a bit of code that does exactly that. Drop me an email if you'd like it.
|
|
|
|
|
Hello,
In my usercontrol I have a Image defined. In the property window at
design time I get the image editor without doing anything. However, it
is just a little different compared to the image editor used by the base
properties like BackgroundImage. If you have assigned a bitmap to the
property but want to remove it, you get a RESET menucommand if you go
over to the BackgroundImage property. However, my property does not have
the RESET command and thereby it is not possible to remove the picture
from the property.
What should I do???
stefan@devosoft.com
|
|
|
|
|
Hi everyone,
I was wondering if anyone's worked with the WebBrowser control and the MSHTML library using element events. I'm trying to hook an HTMLElement onclick event after a document page loads but I can't seem to figure out what c# expects us to do.
I tried this to no avail along with a couple of other approaches
using MSHTML;
class
{
...
protected IHTMLElement elem;
protected bool OnHtmlElementClick(IHTMLEventObj sender)
{
MessageBox.Show("Got it!!");
return true;
}
webcontrol_NavigateComplete2()
{
elem = GetElementFromDocument();
elem.onclick =
new HTMLElementEvents2_onclickEventHandler(this.OnHtmlElementClick);
elem.click(); // force a test
}
}
Steve A
B.Eng, MCSD, MCSE, MCDBA
Senior Software Developer
Optimal Robotics Corporation
|
|
|
|
|
Hi ,
do you have the answer ??
|
|
|
|
|
Sorry for the cross post but I cant get much of a response from the C# forums that I know about. Heres the copy and paste from the codeguru forum:
Has anybody seen an example of this or any of the other C# encryption classes? The documentation seems to assume you are familiar with the topics and never lists an example.
Basically I'm looking for an algorithm that will generate a key based on a password and user id. It doesnt have to be the best security but I would rather use a built in algorithm rather than constructing my own.
TIA
|
|
|
|
|
i want to get file information such as it's icon,size,path etc.
i don't how to get the icon information,i think should use
import shell32.dll to do it,because there is a SHGetFileInfo
Function which can Get the file's Icon Information,but I don't
know how to invoke it,if you could do it,please don't hesitate
to help me,thanks
i need an example code of how to use SHGetFileInfo in c#,thanks
|
|
|
|
|
Hi,
I'm trying to write something like a "pipe" function for some streaming code I'm writing. What I want to write is a function that can "preview" a stream, making a new one if necessary. It'll have to return the same type as it takes. e.g. for a function:
bool Something( StreamReader r ) { ... }
I could call it as either:
Something( r );
Or (using the pipe command )
Something( CountStream( r ) );
I've written the following, but get an exception whilst trying to new up the "output" stream:
private static System.IO.Stream CountStream( System.IO.Stream r )
{
// Following give compile error
// System.IO.Stream w = new System.IO.Stream(r);
// Following give runtime error (and isn't exactly what I want)
System.IO.StreamReader w = new System.IO.StreamReader(r);
int nByte = r.ReadByte();
while ( nByte != -1 )
{
m_nCount++;
nByte = r.ReadByte();
}
return w.BaseStream;
}
I'm using "System.IO.Stream" since it forms the base class, ideally I'd like to be able to pass in any "System.IO.Stream" type.
Am I chasing up the wrong alley?
Regards,
Ray
|
|
|
|
|
I am programming in ASP.NET and C#. I was trying to retrieve the event log information from a remote machine in my code using the EventLog class from .NET Framework. It throws an Unauthorized access exception when I try to get event log information of any remote computer. Though, I am able to access these event logs through Event Viewer. I was researching on the web and I read that I need registry rights to that remote machine. Does anyone know about this or has anyone tried this before?
|
|
|
|
|
I'm working on a project now that does that and I'm able to do it. The domain account I'm using to access the remote computer is a member of the Administrator group on the remote machine. I don't know what registry rights are but I assume Admin rights cover that.
Maybe you have some kind of read-only rights to the remote registry? I haven't seen this problem before so I don't know what would cause it.
Craig Dodge
A catchy signature should appear here.
|
|
|
|
|
But, you didn't wrote, how you achieve your work...
Thanks,
Chintan(India)
|
|
|
|
|
Hi,
on my textBox1_KeyUp event i only want to accept numeric keys, i.e., i'll only accept 0,1,2,...9. Letters and others keys will not be accepted.
Example: supose tha i wrote 123asd
i want that
textBox1.Text = 123 instead of textBox1.Text = 123asd.
My problem is that i can't do e.KeyValue = 0 ,because e.KeyValues is readonly. To e.KeyCode and e.KeyData it's the same.
Anyone knows how to solve this problem??
Thanks
Carlos Lopes
|
|
|
|
|
Is it possble to instantiate a COM object written in C# from a standard MFC app written in VC6?
ps I have only been C# for 1 day - and I have managed to implement a plugin interface that I use for VB and ATL objects and I was investigating whether we could also use C# et al
Holy Handgrenade of Antioch instructions
|
|
|
|
|
Hi CodeProject,
I have created a form with a datagrid, my requirement is that when
the user clicks "F5" I want to update a certain column with the current
time.
I defined a DataGridTableStyle and a DataGridTextBoxColumn object. I
attached an event handler to the DataGridTextBoxColumn.TextBox.KeyUp
property.
So now when I hit "F5" the column is updated, but alas, as soon as I
navigate to a different line, the row disappears! Am I doing something
wrong, or is this a bug? Maybe someone has an different way of doing this?
Anyways, this is my code for the KeyUp event:
private void dataGridColumn1_TextBox_KeyUp(object sender, KeyEventArgs kea)
{
if (kea.KeyCode == Keys.F5)
{
DataRowView drv = (DataRowView)dataGrid1.BindingContext
[dataGrid1.DataSource].Current;
drv["Col1"] = DateTime.Now.ToLongTimeString();
}
}
Thanks
|
|
|
|
|
Do you know where can I get a source code of any proxy server, working under Windows writen in C/C++??? I need it so!!! Thanks in advance.
|
|
|
|
|
System.winforms isn't there. I can access forms through System.Windows.Forms.Form but all the books I read and examples I see are using Winforms??? Is there something I am missing?
MS all the way!
|
|
|
|
|
System.winforms was renamed to System.Windows.Forms in Beta 2
Some of the examples haven't caught up yet...
|
|
|
|
|
Thanks...Does anyone know of a good reference online for the classes and what is in them?
|
|
|
|