|
Try typeing "Wine Win32" into Yahoo or Google.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Why the hell does prefixing a number with 0 not change a number to octal? I ran into a problem where I'd defined a enum with what I thought were octal constants, but the compiler takes them as decimal?
Regards
Senthil
|
|
|
|
|
Your point being....? I take it your coming from a Java background?
Because octal literals are deprecated? And, I don't remember seeing any documentation that C# ever supported them.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
My point being that C# being a language from C/C++/Java background, with the same syntax for representing hex numbers, should have had support for octal numbers. At least, the compiler should have given me a warning when I prefixed a 0..
Octal literals are available in C and C++, not just Java.
Octal literals deprecated? Why would they do that? I must admit I've never read the standard completely, but then, I didn't need to read the standard to know to prefix 0x for hex numbers either..
Regards
Senthil
|
|
|
|
|
Since C# does recognize Octal literals, prefixing a 0 just makes it a decimal number. The compiler won't generate a warning based on some other languages syntax rules.
Why? Because it's not used often enough to justify the expense of adding support for it? I don't know - ask Microsoft. They've removed Octal literals from their own JScript.NET too...
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I want to scroll a text box using a label, don't ask why I just need to :P... How can I scroll the caret through the textbox so that I can use ScrollToCaret() ?
If this is impossible, is there a way to edit the scroll bar colors just for this program??
Thanks,
Sub
|
|
|
|
|
Use the TextBox SelectionStart property to put the caret at end the end of the text. You can then use ScrollToCaret() to make sure it's visible in the TextBox. There is a drawback to using ScrollToCaret though. The TextBox must have the focus in order for it to work.
TextBox1.SelectionStart = TextBox1.TextLength;
TextBox1.Focus();
TextBox1.ScrollToCaret();
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Does anyone know how i would i play wav sounds in my web forms?. I'd like to play the sound when the form loads and keep playing until i have moved to another form.
Thanks in advance,
Alexander
|
|
|
|
|
DirectShow/WindowsMediaPlayer, or there's a playsound API, I think, you can interop it.
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
Christian Graus wrote:
or there's a playsound API, I think, you can interop it.
In a WEB form? I don't think so.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Oops - missed that bit...
Christian
I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
|
|
|
|
|
You'll have to use HTML methods to do this. ASP.NET is a server-side technology that only generates HTML. It can't play a sound client-side using any method.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi all,
I'm toying with reflection to try and build a recursive function that generates treenodes of a treeview that represent any given object's graph (of child objects):
public TreeNode BuildNode(ref object o)
{
TreeNode tn;
treenode.Tag = o;
treenode.Text = typeof(o).Name;
if (typeof(o).GetInterface("System.IEnumerable",true))
foreach (object c in o)
tn.Nodes.Add(BuildNode(ref c));
else
foreach(MemberInfo m in typeof(o).GetProperties(BindingFlags.Public))
tn.Add(BuildNode(ref m.???); // << Trouble here ...
// I really just want access
// to the property from the
// MemberInfo object...
return tn;
}
As you can see, it almost works except I have no way of accessing an [un?]boxed object's property. I know from reflecting the object's type that it has the property, but have no way of accessing the property (in a generic manner) without hardcoding my object types into a bunch of overloads of 'BuildNode', or having some way-huge switch.
Looking for advice, pointers to documents, creative ideas, etc. that might get me closer to a solution.
Thanks for all your help,
Rein
|
|
|
|
|
Hello all,
is there C# code that zip and unzip file
thank you
|
|
|
|
|
|
Maybe u are hell of a searcher then ^_^
|
|
|
|
|
Hi everybody.
There Is a way to change the initialization sequence in static constructors?
I have the following code:
<br />
class MyClass<br />
{<br />
static int a;<br />
static bool b = true;<br />
<br />
static MyClass()<br />
{<br />
a = 10;<br />
}<br />
}<br />
<br />
The compiler generates the following:
<br />
class MyClass<br />
{<br />
static int a;<br />
static bool b;<br />
<br />
static MyClass()<br />
{<br />
b = true;<br />
a = 10;<br />
}<br />
}<br />
I want that member a will be initialized before b does, but I must do it on runtime.
In other words, there is some parameter that tells the compiler to place the inline initializations in the end of the static constructor?
Thanks a lot,
Yaakov
|
|
|
|
|
No, there isn't. It looks like your going to have to design your code around this little problem and initialize the new instance of the class yourself instead of relying on the compiler to do it for you.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks.
I have added a suggestion in the Feedback Center.
Yaakov
|
|
|
|
|
Simply set the value of b in the static constructor, after setting a.
|
|
|
|
|
I have a C# windows application, for which I am building setup project. Since the project generates crystal reports (Designed using Version 10) I need to include merger module - CrystalReports10_NET_EmbeddedReporting.msm. I install the application on client machine and everything works fine.
BUT since this Merger mudule is so huge that in increases the app.msi file size (some where newar 50 MB). I was wondering if there is a way to split the app.msi and add a launch condition that checks the GAC if required crystal DLL are there. If not it should install the other msi that writes dll's onto GAC
Any direct or round about way to accomplish above. Basically the problem is setup is placed at a network location and due to huge size of msi it takes annoying amount of time to load installer and then to do the installation steps.
Thanks in advance
Ruchi
|
|
|
|
|
first of all thanks to Heath Stewart for his previosu responses to solve my problems,i am again with new issue=)
is there anyway to detect that IE is being closed or in short CloseEvent for IE?
i found ClosingWindow event but MSDN says it works only if window.close() is called from Jscript.
any help in this regard?
thanks
-adnan
|
|
|
|
|
Can anyone enlighten me on how to add a BeforeSelect event to a ListView control? The TreeList control has one, but ListView does not. I have a data-bound version of a ListView control and need to evaluate whether a new list item can get focus based on validation of the current item.
I have a workaround via the SelectedIndexChanged event, but I don't like it since the last selected item retains the selection (dotted) box outline even if I force going back to the old index position.
Thanks.
|
|
|
|
|
Ok this just may be very trivial. I am trying to get a unique identifier on a thread. Is this any way to get a system generated unique thread identifier or any such value which can be used in the indexer to keep track of the run.
|
|
|
|
|
Thread class does not have an intrinsic ID property of any sort. You can however creat a public property and populate it with unique data yourself.
|
|
|
|