|
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
|
|
|
|
|
Only if he has a prosthetic hand and they call him Manny.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hi Dear
I use VS2005 (ASP.NET 2)
In TextBox or MaskedTextBox i want to show numbers with thousand separator like this : 12,254,236
but when i use the mask like 000,000,000 my number shown as 122,542,36
How can i solve the problem?
|
|
|
|
|
Hi,
you can use the TextChanged event to first parse the string so you know the numeric value (use a format that allows for separators), then replace the text by the number in the format you want.
But that is bound to be ugly, as soon as you edit a digit in the middle of the number, the cursor position and/or selection will act weird.
Better approach is to keep the TextBox content as is, and have a Label next to the TextBox, and have that show the number in the format you want.
|
|
|
|
|
HI
In my windows application i am using a button control and a serial port.
the working of the button is like power ON/OFF.
when i click it shld change to red ie., ON and send a value to port "A"
when i click again color change to green OFF and send a value to port "a".....
pls give me some idea how to write the code.....
modified on Saturday, May 2, 2009 4:07 AM
|
|
|
|
|
Handle its MouseClick event to change the color.
जय हिंद
|
|
|
|
|
|
ya i tried it the color is changing for one click only
|
|
|
|
|
MouseClickEventOfButton
If red -> make green
else -> make red
That is all you need.
जय हिंद
|
|
|
|