|
Hope I have not misread what you are after, as what I think you are after is really easy
On you form you have a label called lblMessage that says "hello" and a button called butChange
add the method
private void butChange_Click(object sender, System.EventArgs e)
{
lblMessage.Text = "new text" ;
}
hope this helps and sorry if i missed the point
Reiss
|
|
|
|
|
When you have executed your applications code within the .NET IDE why is it that the properties window cannot be accessed until the code has been closed and re-opened within the IDE?
Has anyone come accross a solution to enable you to see the properties window again even after executing the code?
|
|
|
|
|
Hit F4 or go to View|Properties Window
Hawaian shirts and shorts work too in Summer.
People assume you're either a complete nut (in which case not a worthy target) or so damn good you don't need to worry about camouflage...
-Anna-Jayne Metcalfe on Paintballing
|
|
|
|
|
David Stone wrote:
Hit F4 or go to View|Properties Window
No, this won't help. It's a very annoying bug on the VS.NET IDE, and MS recognized it on their top VS.NET bugs page, and only occurs when the Properties Window is at some specific positions.
It's not the fall that kills you: it's the sudden stop - Down by Law, Jim Jamursch (1986)
|
|
|
|
|
That normally ends up with VS.NET running into some infinite loop, having to close it via the TaskManager.
I rated this article 2 by mistake. It deserves more. I wanted to get to the second page... - vjedlicka 3:33 25 Nov '02
|
|
|
|
|
I want to refresh a treeview just by WinForm's handle,please help me.
my code is (in another class) :
.....
public void RefreshTreeView(IntPtr frmHandle)
{
Form Frm = (Form)Control.FromHandle(myHandle);
// it is wrong with this code in runtime
foreach(Control ctrl in Frm.Controls)
{
Type myType = ctrl.GetType();
...
}
}
.....
How can I do? Help !
kingdom
|
|
|
|
|
I am trying to deploy IDocHostUIHandler:GetExternal in a C# application. However all of the documentation I find is a C++ example to return the IDispatch handle to the caller. Would returning (this) actually handle this or is there something else I have to do ?
_____________________________________________
The world is a dangerous place. Not because of those that do evil, but because of those who look on and do nothing.
|
|
|
|
|
public void GetExternal([MarshalAs(UnmanagedType.IDispatch)]<br />
out object ppDispatch) {<br />
ppDispatch= (IYourInterface)this;<br />
}
regards,
Bog
"Outside of a dog, a book is Man’s best friend. And inside of a dog, it’s too dark to read."
-Groucho Marx
|
|
|
|
|
|
Yes - check out the DLLImport attribute from System.Marshal
(Don't know the C# syntax I'm afraid but theres a VB example in my "Monitoring the printer in VB.Net" article)
'--8<------------------------
Ex Datis:
Duncan Jones
Merrion Computing Ltd
|
|
|
|
|
if you want to check out all the win32 API for reference then check the following site,
http://www.codeproject.com/system/hooksys.asp
http://leb.net/wine/WinDoc/funcIndex-local.html

|
|
|
|
|
Michel, here's an example for you.
You can group the import specs as shown here, or interspersed through your code...
class Win32
{
[DllImport("kernel32.dll")]
public static extern bool Beep(int freq,
int duration);
[DllImport("kernel32.dll")]
public static extern void SleepEx(int imeinms,
int alert);
[DllImport("kernel32.dll")]
public static extern int WinExec(string pgmname,
int hideorshow);
[DllImport("kernel32.dll")]
public static extern void ExitProcess(uint
exitCode);
[DllImport("winmm.dll")]
public static extern bool PlaySound(string
pszSound, int hmod, uint fdwSound);
[DllImport("kernel32.dll")]
public static extern uint GetCurrentProcess();
[DllImport("kernel32.dll")]
public static extern bool TerminateProcess(uint
hndl, uint exitcode);
}
call the functions from your code (say the Beep function)
as:
Win32.Beep(freq,duration);
Hope this helps.
Spolia Opima
|
|
|
|
|
Tx exactly what I was looking for.
|
|
|
|
|
Look at this code...
==============================================================================
string strClaim = "BER";
Regex objNaturalPattern = new Regex("[Bb][Ee][Rr]|[Tt][Ww][Oo]|[Ss][Tt][Oo]");
objNaturalPattern.IsMatch(strClaim);
==============================================================================
ok the return value to "objNaturalPattern.IsMatch(strClaim);" will be true as it matches [Bb][Ee][Rr]. Now what I might want to do and it needn't only apply to this example is know which Regular expression ([Bb][Ee][Rr]|[Tt][Ww][Oo]|[Ss][Tt][Oo])the string matched.
Is there any possible way to get some kinda of return value to say which one was matched?
as in a string matching [Bb][Ee][Rr] would return 0
as in a string matching [Tt][Ww][Oo] would return 1
as in a string matching [Ss][Tt][Oo] would return 2
no match could return -1
Is this posible? Is there a method that I have over looked?
elp!
Thomas
|
|
|
|
|
I might not follow you, but if you want to get the string that was matched, you
objNaturalPatter.Match(strClaim).Groups[0].Value
Bog
"Outside of a dog, a book is Man’s best friend. And inside of a dog, it’s too dark to read."
-Groucho Marx
|
|
|
|
|
Is there such a thing in C#?
|
|
|
|
|
Michel Prévost wrote:
Is there such a thing in C#?
Not in .NET 1.0, but 1.1 includes a Directory browser dialog. (or whatever its called, don't have a copy in front of me)
James
"It is self repeating, of unknown pattern"
Data - Star Trek: The Next Generation
|
|
|
|
|
Ohh...thats nice to know, of course now I will have to download and install it.
Hey don't worry, I can handle it. I took something. I can see things no one else can see. Why are you dressed like that?
- Jack Burton
|
|
|
|
|
Michel,
Using the .Net 1.1 SDK you can just use the
System.Windows.Forms.FolderBrowserDialog.
If you are using the 1.0 SDK you can inherit from
System.Windows.Forms.Design.FolderNameEditor.
This implementation will most likely require that you use a
FolderNameEditor.FolderBrowser.
I have a class already written that can do this job if you like.
Also, I think there is at least one implementation posted here on CP.
Hey don't worry, I can handle it. I took something. I can see things no one else can see. Why are you dressed like that?
- Jack Burton
|
|
|
|
|
if you aren't aware then check out
MSDN for .NET 1.1 which includes Browse Folder also.
and lots more 
|
|
|
|
|
I may need to upgrade to .NET 1.1. Is it released?
|
|
|
|
|
Hi,
Does anyone use anr O/R mapping tool for .NET platform. I searched the Internet and found two tools only" ObjectZ (www.mooongoose.com) and PORT (www.potis.com.pl). Do you have any experience in using any of them ?
Ava
|
|
|
|
|
Avaril wrote:
Does anyone use anr O/R mapping tool for .NET platform.
There is also EntityBroker from http://www.thona-consulting.com/[^]. It isn't released yet but work progresses fairly fast.
Documentation is a bit thin, especially when trying to figure out how you need to set up the database (the version I used didn't create the tables for you, I think it still doesn't).
James
"It is self repeating, of unknown pattern"
Data - Star Trek: The Next Generation
|
|
|
|
|
Thanks. I have already found two other tools. Objectz (http://www.mongoosesolutions.com/mg/products.asp) and Port (www.potis.com.pl).
Ava
|
|
|
|
|