|
Thank you!!!!
(double)(1/7)
I keep adding the parentheses, something so simple could make you go crazy...but I guess that's coding for you..lol
Thanks again
|
|
|
|
|
You could also do MessageBox.Show(Convert.ToString(1.00/7.00));
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
What you wrote was, in vague pseudo-code, Convert.ToString( (Integer 1) / (Integer 7) ). In integer math, the only possible answer is a while number. Since the result, 0.1428, would be truncated to the whole number, 0 is what you got.
|
|
|
|
|
Hi there!
Im want to use a proxy switcher for the webbrowser for my program.
I searched the whole day for something usefull..
Who can help me?
I want to check for valid proxies (ipnumber:portnumber) and test speed.
Then i want to switch with it in the program on specified conditions.
Many thanks
EDIT:
I'm wondering what i need to make a connection with a proxy for the webbrowser in c#
modified on Saturday, May 2, 2009 1:30 PM
|
|
|
|
|
hi,
ive current got a set of public variables declared and i have a start timer button that changes a public bool to true and and data to a string, ive added break points and the data is added when the button is pressed but when press the stop button the variables have changed to null it could be something basic but i cant seem to get my head round it so would appraciate any help on the matter
thanks marc
|
|
|
|
|
There is a logic error in line 42.
|
|
|
|
|
That's life
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
That's what all the people say. You're riding high in April. You're shot down in May.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|
|
We'd need to see a code snippet to help.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
Hi guys,
I have searched a solution to my question and i think i already know the answer to my question. Tho im still a bit curious, because i found a lot of posts about the same question that i have, but i didn't find any solution answers which i needed.
Question:
Instead of converting the RTF to HTML and then sending in outlook. I would like to use plain RTF to send emails and let OutLook worry about the conversions, if any needed.
Also im not interested in using any extra features like WordMail, which i found there http://www.outlookcode.com/article.aspx?id=31[^]
Thanks
Hendrik
|
|
|
|
|
I am adding with open.file images to imagelist. here is the code
OpenFileDialog open = new OpenFileDialog();
open.Filter = "Image Files(*.jpg; *.jpeg; *.gif; *.bmp)|*.jpg; *.jpeg; *.gif; *.bmp";
if (open.ShowDialog() == DialogResult.OK)
{
Bitmap slika = new Bitmap(open.FileName);
FileInfo fi = new FileInfo(open.FileName);
imena[i] = fi.Name;
poti[i] = fi.FullName;
this.imageList1.Images.Add(Image.FromFile(open.FileName));
i++;
}
As u see i am saving paths of files in array poti...but i have problems when i delete files from listview and imagelist..i is still continueing ++ and new images added to imagelist and listview have wrong path..because i am calling them with poti[index]..
So i would like to put this part of filling array of paths poti[index] to this part of code..but i don't how how to retrieve full path of image just from imagelist..
for (int j = 0; j < this.imageList1.Images.Count; j++)
{
ListViewItem item = new ListViewItem();
item.ImageIndex = j;
this.listView1.Items.Add(item);
}
Or do you have any better idea.. because after deleting images..indexes of paths from poti[index] are mixed..
|
|
|
|
|
Overview
WPF Project (Visual Studio 2008)
I am using a ListView (with GridView) bound to an ObservableCollection, which includes a DateTime field.
<br />
public class RecordData<br />
{<br />
public int ID { get; set; }<br />
public DateTime DateNR { get; set; }<br />
}<br />
The GridView column for 'DateNR' is specified as follows:
<br />
GridViewColumnHeader gvch = new GridViewColumnHeader();<br />
GridViewColumn gvc = new GridViewColumn();<br />
Binding bind = new Binding("DateNR");<br />
bind.Converter = new FormattingConverter();<br />
bind.ConverterParameter = @"{0:dd-MMM-yy}";<br />
gvc.Width = 80;<br />
gvc.DisplayMemberBinding = bind;<br />
gvch.Content = "NR Date";<br />
gvc.Header = gvch;<br />
myGridView.Columns.Add(gvc);<br />
When I populate the collection from the database, DateNR can be null and is therefore only assigned to the collection property if it is NOT null.
<br />
SqlConnection sqlConn = new SqlConnection(myConnectionString);<br />
SqlCommand sqlComm = new SqlCommand("...", sqlConn);<br />
SqlDataReader sqlDR = sqlComm.ExecuteReader();<br />
RecordData rd = new RecordData();<br />
rd.ID = sqlDR.GetInt32(0);<br />
if (sqlDR.IsDBNull(1) == false)<br />
rd.DateNR = sqlDR.GetDateTime(1);<br />
_MyCollection.Add(rd);<br />
Problem
The problem is that the ListView is displaying a date of "01-Jan-01" in the 'DateNR' column for all items that were not assigned a date. How do I stop this as I don't want the user to see a date when there shouldn't be one.
I need the 'DateNR' property in the collection to be a DateTime value and not a string value because this column is used for sorting.
Any ideas would be welcome. thanks
modified on Sunday, May 3, 2009 1:50 AM
|
|
|
|
|
Since you are using a GridView, I assume this is a WPF problem. We do have a WPF forum, and you might get more responses from there. It is the weekend, however, so things are bound to be a bit slow anyway.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
I am using a binding navigator and when I click save my information appears to save but when I close and reopen the program the new info is not saved. What am I doing wrong? Please help!!!
this.Validate();
this.trainingBindingSource.EndEdit();
this.membersBindingSource.EndEdit();
this.membersTableAdapter.Update(this.trainingDataSet.Members);
this.trainingTableAdapter.Update(this.trainingDataSet.Training);
trainingDataSet.AcceptChanges();
trainingDataSet.Dispose();
|
|
|
|
|
Just a guess (I use a proper DAL instead of these adapter tools from MS) but have you supplied an update method to the adapter?
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
No I haven't. How would I go about doing that? Please excuse me I am very new to C#. What mustI include in this method. By the way what is DAL?
|
|
|
|
|
Vloops wrote: By the way what is DAL?
Data Abstraction Layer - google will give you lots of explanations, also search for n-tier.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
I'm using C#. I'm really having a hard time with this. I need help
|
|
|
|
|
So am I! DAL (and N-Tier which a DAL is part of) is a concept that can be used in (virtually) any language.
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn) Visual Basic is not used by normal people so we're not covering it here. (Uncyclopedia) Why are you using VB6? Do you hate yourself? (Christian Graus)
|
|
|
|
|
How will I get the bindingnavigator to work?
|
|
|
|
|
You do what any dev needs to do, look at the properties and methods of the object, read the help about the properties and methods you do not understand, identify the one you need to use and try it out. Look for something with update in the name!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi all,
I'm quite new to C# and template engines. Basically what I'm looking for is an application that will separate the main template from the actual code that takes care of logic. The presentation code must be highly customisable and be easy for non-novice users to change.. eg.. Brand logo easy to change, icons to change.. etc.
Can Anyone point me in the right direction?
|
|
|
|
|
dotnetnuke may be what you are looking for.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Thanks Mycroft, I'll look into that.
I'm a Holmes too. Wonder if we're related
|
|
|
|
|
Only at the elementary level.
"WPF has many lovers. It's a veritable porn star!" - Josh Smith As Braveheart once said, "You can take our freedom but you'll never take our Hobnobs!" - Martin Hughes.
My blog | My articles | MoXAML PowerToys | Onyx
|
|
|
|