|
You should better use text or ntext field instead of image. You won't need any conversion in this case.
Alexandre Kojevnikov
MCP (SQL2K, Win/C#)
Leuven, Belgium
|
|
|
|
|
Hi, is there any way to create a MS Access database (.mdb) file using C# code and ADO.NET? I've done it in the past using ADOX (ADO Extensions). Does anybody know if I still have to use ADOX to do this?
Thanks,
Barry
|
|
|
|
|
Where is the application icon is assigned? So the executable that my program creates, will have the icon that i want.
Thanks,
~Mithat
|
|
|
|
|
Select the project in the Solution Explorer, right-click and select properties, and there is a line for Application Icon. However, if it's a WinForms application the icon shown in the taskbar will be the one given by the main form's Icon property.
Chris Jobson
|
|
|
|
|
When compiling from the command line use the /win32icon command line option to csc.exe.
When building in the IDE set the Appliction Icon option. You can find it by right clicking on your project in the solution explorer, selecting the properties menu item. Appliction Icon is under Common Properties - General.
Cheers,
Peter
Microsoft C# Compiler Dev Lead
|
|
|
|
|
Hi All,
I have list box in one of of my form:
private System.Windows.Forms.ListBox listCampaign;
(InitializeComponent()) function contains those initializations for that list box:
this.listCampaign.Location = new System.Drawing.Point(80, 144);<br />
this.listCampaign.Name = "listCampaign";<br />
this.listCampaign.SelectionMode = System.Windows.Forms.SelectionMode.MultiExtended;<br />
this.listCampaign.Size = new System.Drawing.Size(168, 69);<br />
this.listCampaign.TabIndex = 1;<br />
this.listCampaign.Visible = false;
And then I add the items to List Box.
listSkillSet.Items.Add("AB");<br />
listSkillSet.Items.Add("AC");<br />
listSkillSet.Items.Add("AD");<br />
listSkillSet.Items.Add("AE");
QUESTION:
Now I have 4 items in my list, I want to show 2 of em already selected.(at the beggining before user chooses - like telling him, we did choose for you already)
I know how to choose one item (highlighted i mean)
as in : listCampaign.SelectedIndex = 0;
But How you select more then one ?
(if I want to Choose (highlight) "AB" and "AC" at the same time
Thanks,
~Mithat
|
|
|
|
|
Assuming that you have set the SelectionMode to MultiSimple or MultiExtended, code similar to the following will work:
listBox1.SelectedIndex = -1;<br />
<br />
for (int i = 1; i < listBox1.Items.Count; i += 2)<br />
listBox1.SelectedItem = listBox1.Items[i];
Chris Jobson
|
|
|
|
|
It worked just fine,
Thank you very much =)
~Mithat
|
|
|
|
|
Hello,
I had written few articles for a major publishing company which unfortunately went out of business. I put together a website to publish these myself. The code samples are all in C#. Please check it out:
http://dotnetuser.www2.dotnetplayground.com/
Thanks
Madhuri
Madhuri Mittal
|
|
|
|
|
Hey Madhuri!
http://dotnetuser.www2.dotnetplayground.com/[^]
Paul Watson wrote:
"At the end of the day it is what you produce that counts, not how many doctorates you have on the wall."
George Carlin wrote:
"Don't sweat the petty things, and don't pet the sweaty things."
Unknown wrote:
"I love long walks, especialy taken by those that annoy me."
Paraphrased from TMNT:
"Cricket? You have to know what a crumpet is to understand Cricket."
|
|
|
|
|
Hi! I am glad you found me here!
Madhuri Mittal
|
|
|
|
|
Did anyone have the same experience in C# Winform application that you have a form can not be closed? I wonder what would be the possible reason for that?
Thanks.
|
|
|
|
|
Probably catching the Closing event and setting e.Cancel = true .
|
|
|
|
|
There is a known bug where if a control that has focus is removed from the parent form, the form will not be able to close.
The bug may have been more specific in that the control had to be inside of another control, but I can't remember (ie Form A has control B, which has control C; control C has focus and is then removed from B. Now A can't close). I do remember that the example to reproduce the bug had this set-up, but I can't remember if it was a requirement.
James
"It is self repeating, of unknown pattern"
Data - Star Trek: The Next Generation
|
|
|
|
|
I want to create a non-visual component that manipulates the form it is dropped onto. Is there a way to access this form from within the component?
Victor
|
|
|
|
|
derive your class from Component , then it can appear in the toolbox, but when dropped into the form, appears in that little bar, like when you add an imagelist object (presuming you have vs.net). and can be accessed from the form.
| Website: http://www.onyeyiri.co.uk
| Sonork: 100.21142 : TheEclypse
| "If a dolar was a chicken would the chicken be evil?"
|
|
|
|
|
not without telling the component what form it is attached to.
this is because most Components can be used from anywhere, not just forms.
that said, I also found this to be a useful idea, so I made a subclass of Component, FormComponent, which i talked about in this blog entry.
This component has a property which points to its Form, when dragged onto a form by a designer. no code required.
|
|
|
|
|
Hello,
Where are the tlbimp.exe and Ildasm.exe utilities located or can be downloaded from? I have done a search of my computer and they do not seem to be installed.
Thanks
|
|
|
|
|
Default Installion in
\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\Bin
|
|
|
|
|
If you have Visual Stuido .NET installed (and used the default path) they are in C:\Program Files\Microsoft Visual Studio .NET\FrameworkSDK\Bin If you don't have Visual Stuido .NET then you need to download the Framework SDK
If you want to use them you can just open up the Visual Studio .NET Command Prompt
- monrobot13
|
|
|
|
|
Thanks. Found it. However, it wasnt found when I did a search for it.
|
|
|
|
|
When I attempt to use custom DLL that was written in Visual Foxpro (works fine in VB6, Foxpro 7, and Delphi 7) in C#, I get an error that cannot convert string to ref object. I tried to use the DLL without running thru tlbimp and with running it thru tlbimp and I get the same results.
If I call MyClass.Myfunction("johndoe", "12345") I see in the intellisense Myfunction(ref obj name, ref obj password).
I thought I read somewhere That I may have to edit this with Ildasm and change it.
????
Thanks.
|
|
|
|
|
try adding the ref keyword in front of your parameters
- monrobot13
|
|
|
|
|
can it be done in C#? I don't even know if it is a bitwise operation. Any help, I'm new to programming and would like to use the helpful feature.
const ulong VOLATILITY_DISPLAY_PERFORMANCE =1;
const ulong VOLATILITY_DISPLAY_STANDARDDEVIATION=2;
const ulong VOLATILITY_DISPLAY_ARITHMETICMEAN =4;
const ulong VOLATILITY_DISPLAY_EFFICIENCYINDEX =8;
const ulong VOLATILITY_DISPLAY_SHARPE =16;
const ulong VOLATILITY_DISPLAY_VARIANCE =32;
const ulong VOLATILITY_DISPLAY_ALPHA =64;
const ulong VOLATILITY_DISPLAY_BETA =128;
const ulong VOLATILITY_DISPLAY_TREYNOR =256;
long value = VOLATILITY_DISPLAY_PERFORMANCE + VOLATILITY_DISPLAY_SHARPE;
/8it throws a compiler error for next line*/
if(value & VOLATILITY_DISPLAY_SHARPE) /* == TRUE */
{
/*DO SOME THING*/
}
|
|
|
|
|
You could try the Framework's BitArray class.
α.γεεκ Fortune passes everywhere. Duke Leto Atreides
|
|
|
|