|
Try looking in the system tables on the Master database.
Roy.
|
|
|
|
|
I Managed to draw on the title bar of a form to give it customized look. Now i want to draw on the taskbar to reflect the same looks on the title bar. Basically i change fonts and draw the caption in different font.one thing to note i don't want to change the system settings. i just want to render the form i am working with.
|
|
|
|
|
By taskbar do you mean to say status bar?
If such is the case then simply define the font size color and style. You should beable to this in both the ide as well in the code.
and regarding the "drawing" do you refer to drawing the text, or drawing an image?
-
string Beautiful;
Beautiful = "ignorant";
label1.Text = "The world is full of " + Beautiful +" people.";
Why is common sense such an un-common comodity?
|
|
|
|
|
I think u know the difference b/n task bar and status bar , i think i made it clear i meant task bar. Sometimes it's better to say nothing than "NO-THING" !
|
|
|
|
|
Dear All,
Can I restore the SQL Datbase Backup through C#?
if yes I need some code for that
With Regards
|
|
|
|
|
Have you tried reading the sql Online Books? You should beable to find info on backing-up and restoring by use of a query...
You would just need to set in place a varible or paramater to read from your file input method(textbox entry of file path, etc)
string Beautiful;
Beautiful = "ignorant";
label1.Text = "The world is full of " + Beautiful +" people.";
Why is common sense such an un-common comodity?
|
|
|
|
|
I downloaded the software from MSDN Subscritpions
WinFX SDK - Community Technology Preview
1) winFx Runtime Components – September 2005 CTP(English)
2) winFx SDK for the WinFX Runtime components – September 2005 CTP( English)
I downloaded these two ,
First One contains Setup,when I run that one iam getting setup Error.
Iam getting the same error which is mentioned in this site(http://www.ureader.com/message/867599.aspx ) but they suggested to remove previous version of Indigo Beta( March CTP) but I havn't installed that one ,
directly I Installed the New CTP.
It would be a great help, if any one help me in solving this problem
Srinivas
|
|
|
|
|
Hello,
I am looking to find a way to retrieve the name of the method that called the current method. At first I thought there would be something within System.Reflection but unfortunately the only thing I can find is MethodInfo.GetCurrentMethod() which retrieves the name of the method I am currently in.
The reason for this is that I am in the process of creating a logging class, one of the logging functions allows the caller to log that a particular method has been called/exited. For ease and control I would prefer not to have to pass the function name/namespace as parameters. i.e.
private void MyFunction()
{
LogFunctionEntry(MethodInfo.GetCurrentMethod())
}
public static void FunctionEntry(MethodInfo mi)
{
string message = string.Format(
System.Globalization.CultureInfo.InvariantCulture,
"{0}.{1}",
mi.ReflectedType,
mi);
Console.WriteLine(message);
}
At the moment the only other way I think of doing this is to parse through Environment.StackTrace but to be honest this is something I would rather not do.
|
|
|
|
|
The information is in the call stack, so it's from there that you have to get it.
Perhaps there are some other methods that you can use that does some of the work for you. For an example, if you throw an exception and catch it, it will contain a stack trace. Throwing exceptions is quite expensive, though.
---
b { font-weight: normal; }
|
|
|
|
|
Typically I have found the answer to my question within minutes of making the post
Annoyingly it was right here on CP
http://www.codeproject.com/dotnet/MethodName.asp[^]
Solution:
StackTrace stackTrace = new StackTrace();
StackFrame stackFrame = stackTrace.GetFrame(1);
MethodBase methodBase = stackFrame.GetMethod();
string message = string.Format(
System.Globalization.CultureInfo.InvariantCulture,
"{0}|{1}",
methodBase.ReflectedType,
methodBase);
Console.WriteLine(message);
This will output
namespace.function(params)
MyNameSpace.Foo.Bar|MyFunction(object a, object b)
|
|
|
|
|
Aaah, thanks for sharing the info. I found it interesting too.
Did you vote for that kind soul's article?
Cheers,
Vikram. "When I read in books about a "base class", I figured this was the class that was at the bottom of the inheritence tree. It's the "base", right? Like the base of a pyramid." - Marc Clifton.
|
|
|
|
|
oh yes
Voting is good and I get to feel all warm and fluffy inside
|
|
|
|
|
|
This is very true, and a good piece of advice
These logging functions will only ever be called if the application is configured to output "uber developer debug logging"
|
|
|
|
|
This is what I got
[Conditional(<FONT color=maroon>"TRACE"</FONT>)]
<FONT color=blue>public static void</FONT> WriteLine(<FONT color=blue>string</FONT> category, <FONT color=blue>string</FONT> format, <FONT color=blue>params object</FONT><FONT color=darkblue>[]</FONT> args)
{
<FONT color=blue>if</FONT> (debugmode)
{
<FONT color=darkgreen>
StackTrace st = <FONT color=blue>new</FONT> StackTrace(<FONT color=blue>false</FONT>);
StackFrame sf = st.GetFrame(<FONT color=red>2</FONT>);
<FONT color=blue>string</FONT> msg = <FONT color=blue>string</FONT>.Format(<FONT color=maroon>"{0,-15}:{1,-60}:{2}"</FONT>, category,
sf.GetMethod(), <FONT color=blue>string</FONT>.Format(format, args).Replace(<FONT color=maroon>"\n"</FONT>, <FONT color=maroon>"\\n"</FONT>).Replace(<FONT color=maroon>"\t"</FONT>,<FONT color=maroon>"\\t"</FONT>));
System.Diagnostics.Trace.WriteLine(msg);
}
<FONT color=blue>else</FONT>
{
<FONT color=blue>string</FONT> msg = category + <FONT color=maroon>" : "</FONT> + <FONT color=blue>string</FONT>.Format(format, args);
System.Diagnostics.Trace.WriteLine(msg);
}
}
xacc.ide-0.1.1 released! :) Download and screenshots
|
|
|
|
|
Dear all
I have executable that can execute more than once in the same time (you 'll have more than window of it in the same it )how can i change the setting to make it make hin execute once
thx for helping
Best Regards
Charbel
|
|
|
|
|
Where does the first link lead you?[^]
Cheers,
Vikram. "When I read in books about a "base class", I figured this was the class that was at the bottom of the inheritence tree. It's the "base", right? Like the base of a pyramid." - Marc Clifton.
|
|
|
|
|
Where does the first link lead you?[^]
Cheers,
Vikram. "When I read in books about a "base class", I figured this was the class that was at the bottom of the inheritence tree. It's the "base", right? Like the base of a pyramid." - Marc Clifton.
|
|
|
|
|
I really like your "Where does the first link lead you?" response much more than my boring old "Google is your friend" response... Can I use it?
|
|
|
|
|
I didn't know I'd started a fad I would prefer you, as a token of appreciation for the idea, giving me half your salary and your firstborn.
Of course, use it by all means!
Cheers,
Vikram. "When I read in books about a "base class", I figured this was the class that was at the bottom of the inheritence tree. It's the "base", right? Like the base of a pyramid." - Marc Clifton.
|
|
|
|
|
Hi all,
I have a Page which contains 3 User Controls. (Navigation, Main Content, and Cart Preview)
How can I access a Page variable from these User Controls? Bearing in mind that multiple pages will need to include these User Controls.
For exmaple: I need them to all have access to a querystring.
Thanks,
Pete
|
|
|
|
|
Hi...
i want my GUI to look Kazaa-like...
i got my mainform , with Main Menu... and i got 4 or 5 forms..
i want the user to select a command from the main menu and then the requested form will be displayed at the same window as the mainmenu.! (Maybe some sort of container?)
currently , if the users selects one of the commands, a new window (not showed in the taskbar) is opened with the requested form.. but it's still 2 forms ( 1 mainmenu and 1 requested form) opened at the same time , and in the requested form , No Menu...
i hope that my explanation is good enough...
...Yosi..
|
|
|
|
|
have you tried using panels?
do you need separate forms? if not use panels.
try to set all your panels the same demenisons, then build them one on top the other. build your menu(main) to toggle between panel1.visible=true; or =false per each menuItem selection.
string Beautiful;
Beautiful = "ignorant";
label1.Text = "The world is full of " + Beautiful +" people.";
Why is common sense such an un-common comodity?
|
|
|
|
|
A function adds values in different combinations and returns the sum. Below is a list of values it uses. How do i extract the values that were added together? Example, say the function returns 10. Mentally i can extract the values 8 and 2, and figure out that 10 represents a "16bit" "WAV". How do i do the same in code?
int WAV = 8;
int 24bit = 4;
int 16bit = 2;
int 8bit = 1;
The above value list is hypothetical. The real numbers i am working with are like the ones below. They come from an open source project called libsndfile.
SF_FORMAT_WAV = 0x010000, // Microsoft WAV format (little endian):
SF_FORMAT_PCM_S8 = 0x0001, // Signed 8 bit data
SF_FORMAT_PCM_16 = 0x0002, // Signed 16 bit data
SF_FORMAT_PCM_24 = 0x0003, // Signed 24 bit data
SF_FORMAT_PCM_32 = 0x0004, // Signed 32 bit data
Happy Holidays
|
|
|
|
|
You can perform logical operators to the number you have. For example:
int Wav16bit = 10;
if ((Wav16bit & SF_FORMAT_WAV) != 0)
{
}
if ((Wav16bit & SF_FORMAT_PCM_16) != 0)
{
}
NOTE: There is only one ampersand.
What it does is look at the bits in the number and perform a logical and operation. So only where positions where the bits match will it be true
0001 & 0001 = 0001 // Both numbers match
0010 & 0001 = 0000 // Not matching bits
0100 & 0101 = 0100 // Only the second bit matches
There is another useful, similar, operator - the logical or operator and it is represented by a vertical bar | It says that if any bits are on on either side then that bit will be on in the result:
0001 | 0001 = 0001
0010 | 0001 = 0011
0100 | 0011 = 0111
Does this help?
My: Blog | Photos
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
-- modified at 5:03 Wednesday 21st December, 2005
|
|
|
|