|
You'll have to embed these as resources.
You can find out more here[^].
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Wow
so quick.
i will check it out.
R.Z
|
|
|
|
|
Hi all,
Can someone please point me in the direction of how I would go about being able to set certain items in a ComboBox to Bold.
Basically I want my Combo to look like this when i drop it down
Group1 <bold>
A
B
C
Group 2 <bold>
D
E
F
Cheers
Jubjub
"If you're too careful, your whole life can become a f---in' grind." - Mike McD (Rounders
|
|
|
|
|
The only way you're going to be able to do that is if you ownerdraw the item list. The ComboBox doesn't support doing this on its own.
You can find an example of ownerdrawing a ComboBox here[^].
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi Dave,
Thank you for that link. It was perfect. I am now trying to figure out how to get the default font a Combobox would use, so I can reuse that, and just change the setting to Bold for certain items.
Cheers
Jubjub
"If you're too careful, your whole life can become a f---in' grind." - Mike McD (Rounders)
|
|
|
|
|
you might also want to look at this control.
http://www.codeproject.com/cs/miscctrl/ImageComboBoxControl.asp
|
|
|
|
|
That's a pretty good one too. How did I miss that?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
What will be the diff if I use casting of int and Convert.Int32().
|
|
|
|
|
You can only cast to an int if the datatype is similar, like a long or a double. You also use that syntax to unbox an int, for an example if you store then in an ArrayList.
Converting to an int can be done from more data types, one common example is a string.
You can also use int.Parse() to convert from a string. That is similar to Convert.ToInt32. One difference, though, is that Convert.ToInt32 will accept an empty string and return a zero value, while int.Parse won't.
---
b { font-weight: normal; }
|
|
|
|
|
Thanks for ur explanation ...
Performance wise which will be the best option int or Convert.Int32?
|
|
|
|
|
That depends on what you are converting. For an example, the implementation of Convert.ToInt32(Int16) looks like this:
public static int ToInt32(Int16 value) {<br />
return (int)value;<br />
}
So, the only difference from using the cast directly is the method call. And if the compiler is clever enough, it will never even do the method call, but simply use the code from the method inline, so there will be no difference at all in the final executable code.
However, one thing is certain. The call to Convert.Int32 is never faster than a direct cast.
---
b { font-weight: normal; }
|
|
|
|
|
Hi all,
I’m using the comboBox to show values to select one of them
Those values are from a database, where there are Ids and values.
So, the DisplayMember is the value and the ValueMember is the ID.
the first worked but the second refuses to work at all. And I don’t know why..?
<br />
comboBox1.DataSource = dataSet3.Tables["DESIGNATION_EDIT"];<br />
comboBox1.ValueMember = "D_ID";<br />
comboBox1.DisplayMember = "D_TYPE";<br />
then i need to use it here where the problem appears
<br />
newrow[11]=comboBox1.ValueMember;<br />
table.Rows.Add(newrow);<br />
if any body could help.., I’ll be grateful.
|
|
|
|
|
moonangel_bio wrote: hen i need to use it here where the problem appears
newrow[11]=comboBox1.ValueMember;
table.Rows.Add(newrow);
what actually happens ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
when i try to add a new record using my application, this messeage appears:
An unhandled exception of type 'System.ArgumentException' occurred in system.data.dll
Additional information: System.FormatException: Input string was not in a correct format.
at System.Number.ParseInt32(String s, NumberStyles style, NumberFormatInfo info)
at System.Int32.Parse(String s, NumberStyles style, IFormatProvider provider)
at System.Convert.ToInt32(String value, IFormatProvider provider)
at System.String.System.IConvertible.ToInt32(IFormatProvider provider)
at System.Convert.ToInt32(Object value)
at System.Data.Common.Int32Storage.Set(Int32 record, Object value)
at System.Data.DataColumn.set_Item(Int32 record, Object value)Couldn't store <d_id> in S_DESIGNATION_ID Column. Expected type is Int32.
where D_ID is the ValueMember of the comboBox and i need it to be stored in S_DESIGNATION_ID in the data base
|
|
|
|
|
Well, now that you're told us the problem, it's obvious. A string that's coming in is not a number, and it needs to be.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hello Friends,
I am new here. For our senior project at school, we are using .Net C#. And we want to compile and deploy C Code in C3. How can we accomplish this?
I surely be so glad to receive your help.
Take it easy, guys!
|
|
|
|
|
You can call functions written in C compiled to a .dll from .NET by providing what is effectively the function prototype and marking it with a DllImportAttribute . More information can be found here[^].
|
|
|
|
|
Your other option is to wrap it in a C++/CLI project, so you can call it using .NET.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
|
It's probably not that hard to draw outside the control boundaries, but it's not very good to do so. You will have problems with the drop down disappearing if the controls behind it is redrawn, and the code to hide it would have to find all the controls behind it to force a redraw.
Just create a new control for the dropdown. That way the control will be able to properly handle redraws, it won't be drawn over by other controls, and hiding it will be simple, as the controls behind it will automatically redraw when it's removed.
---
b { font-weight: normal; }
|
|
|
|
|
Is there a quick way of retrieving the hearder from an RTF?
thx
Nana
|
|
|
|
|
I was Testing my program, which is a thread/database intense program. I ran it in VS, and it runs perfectly and all of a sudden gives me a popup box with this message:
Managed Debugging Assistant 'RaceOnRCWCleanup' has detected a problem in 'C:\Documents and Settings\Wallace\My Documents\Visual Studio 2005\Projects\Visual Waiter\Visual Waiter\VWServer\bin\Debug\VWServer.vshost.exe'.
Additional Information: An attempt has been made to free an RCW that is in use. The RCW is in use on the active thread or another thread. Attempting to free an in-use RCW can cause corruption or data loss.
What does this mean? whats RCW?
It looks like to be that everytime this message pops up, the program is stopped at
dbConnection.Close();
Maybe I am closing the connection somewhere else? so i have 2 .Close() somehow causing race condition?
I used threadpool in my prgoram to handle the threads, it seems like that it is only running 2 threads at the same time. I hope there is a property i can set in Threadpool that i can increase the amount of concurrent running threads??
-- modified at 15:37 Thursday 19th January, 2006
|
|
|
|
|
2hdass wrote: Maybe I am closing the connection somewhere else?
It actually sounds like your trying to close a connection that still had a query pending. Perhaps your opening a connection on one thread and running a query on that connection on another thread???
RCW stands for Runtime Callable Wrapper. It's the wrapper code that your .NET Managed code calls to get at unmanaged COM code, like controls or libraries.
There is no property to increase the number of concurrently runnable threads. What may be limiting the number of threads is whatever your calling in those threads. Like the SQL server your connecting to doesn't have any more connection licenses? Or the server your connecting to doesn't have any more open connections?
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
So how can we avoid This RCW error being thrown from that dll while calling them from another .net application via multithreading??
can we pls reply asap??
|
|
|
|
|
Write better code?
How did you expect me to answer that? There are so many ways of writing database access code and even more ways of doing it wrong it's impossible for anyone to guess at what you're doing and how you're doing it.
About the best I can do is tell you that your database code should follow a pattern: Open the connection to the database as late as possible, do your database work as quickly as possible, then close the connection as early as possible. Do not open a connection as part of a class to make it visible anywhere within the class. You will have less control over the lifetime of the connection.
|
|
|
|