|
try this:
DataSet ds = new DataSet();
ds.ReadXml("Users.xml");
for(int i=0; i
|
|
|
|
|
Hi .. all
i wanna display a image in my page ....
im getting it as a byte array from db. the problem is i should not store it any where(neither in the client nor in the server side).
i wanna give this image as the source for a server side image tag.
<br />
byte[] Img =job.getLogo(Id);<br />
location = Server.MapPath("/job/temp/"+company + ".jpg");<br />
FileStream fs=new FileStream( location, FileMode.OpenOrCreate,FileAccess.Write);<br />
byte[] buffer = Img;<br />
BinaryWriter fileWriter = new BinaryWriter(fs);<br />
fileWriter.Write(Img);<br />
fs.Close();<br />
Logo.Src =System.Configuration.ConfigurationSettings.AppSettings["tempFolder"]+("/temp/"+company+".jpg");<br />
any ideas???
thanx in advance..
sathy
|
|
|
|
|
Hi.
I need to find someway or somekind of installer that will be able to install the following.
The dot net framework
The MSDE i use for the database, and the ini file after extraction must be written with the correct values.
My app, the setup files, as it has already been compiled into installation files.
I tried to include the msde and that into the installer of my app but the problem being that you can't install to different installations at the same time.
Or is the only way to do it by installing them all seperately, with that saying that the users are going to run away
Thanx in advance
He who laughs last is a bit on the slow side
|
|
|
|
|
Try innosetup it's free.
Just include other packages in the installer itself.
You can also try nullsofts installer.
I did this with my own java programs and included the JRE in the install program with options to allow the user to install or bypass.
|
|
|
|
|
Will check it out. thanx
If looked at a couple other but doesn't seem that they can fire another setup.exe
He who laughs last is a bit on the slow side
|
|
|
|
|
Mr. VB.NET wrote: I did this with my own java programs and included the JRE in the install program with options to allow the user to install or bypass.
In vb i'm totally lost. I got the innosetup to unpack my setup files, but how do I trigger them, and like you said to allow or bypass certain steps
Thanx in advance
He who laughs last is a bit on the slow side
|
|
|
|
|
Use NULLSOFTs NSIS
It will take you about three days to learn it, they have tons of examples.
|
|
|
|
|
I got that one and then the innosetup aswell.
Looks like time to start learning scripting, which one of the two would you say will be the easier one to learn the quickest?
He who laughs last is a bit on the slow side
|
|
|
|
|
|
Read this : http://www.codeguru.com/Csharp/.NET/cpp_managed/article.php/c4871
To use unmanaged code in .NET, read this : http://www.codeproject.com/useritems/usingcppdll.asp
|
|
|
|
|
I think that you missed switching from the cell phone to the computer. This is a forum, not an SMS... But seriously, writing proper english increases your chances of getting replies.
Managed code is how the code works in .NET. The diffent compilers (C#, VB, etc.) produces IL code that is stored in the EXE or DLL files produced. The JIT (just in time) compiler then turns this into processor specific machine code when the application is started.
Unmanaged code is code that is not produced using the .NET development tools. The EXE or DLL files already contains the processor specific machine code. Managed code can use unmanaged code (and vice versa) using wrappers.
---
b { font-weight: normal; }
|
|
|
|
|
I have some problems using the datagrid in C#:
1.How can I set the font of each column separately? I mean if I change the font of the datagrid,the font of all columns changes,I couldn't find anything in table styles and so on.
2.I fill my datagrid from database. I want to have a column showing the row number.I didn't use the ability C# made(Autoincrement), 'cause whenever the datagrid is filled,it isn't being reset even if I set the autoincrementseed to '1' in my code.So I made it myself by a simple loop in the code.How can I use C# to do this?
3.By using the row number,I click on the header to sort the data in that column and the whole row position changes in the datagrid regarding des or asc sort.But I want to refresh the row number again. I mean if you have 3 rows:
1.Mozhdeh,2.Ali,3.Mina
and you click to sort them it becomes:
2.Ali,3.Mina,1.Mozhdeh
But I want it to become:
1.Ali,2.Mina,3.Mozhdeh
Thanks in advance.
|
|
|
|
|
according to ur reqirement i think
u should use listview control
becouse it has facility to color individual column
and has got coulmnclick event on which u can fill
listview through coding.
rahul
|
|
|
|
|
I don't have the experience to work with the listview control.Does it have the same facilities as the datagrid?Does it have the same nice user interface? I mean the rows and the columns in the listview doesn't have the same nice user interface,does it?Would you please introduce it a little bit more?
Thanks.
|
|
|
|
|
u r right that listview do not have that nice interface as datagrid
but again the functionality u r looking for is possible with listview
listview donot have any property like datasource so u can not bind it with dataset.
u have to individualy add the data using listview item object.
ur reqired to do lot of coding in using listview,so i will sugest u
to learn more about the use of listview.
rahul
|
|
|
|
|
Thanks a lot.But I want to fill it from database. I think because it doesn't have any property to bind a dataset to it, it isn't possible,is it?So isn't there a way to move a cell in a datagrid individually in order to solve the sort problem I mentioned?
|
|
|
|
|
yah u can fill listview from dataset by following way
suppose u have three columns then
foreach(DataRow Dr in dataset.tables["table name"].rows)
{
ListViewItem iTem=new ListViewItem();
iTem.SubItems.Add(Dr["column name"].ToString());
iTem.SubItems.Add(Dr["column name"].ToString());
iTem.SubItems.Add(Dr["column name"].ToString());
listview1.items.add(item);
}
rahul
|
|
|
|
|
The answer for everything are DataGridColumnStyle s.
I do not have the time to give some detailed examples but generally you can tell the grid how each column should look like by explicitely defining DataGridColumnStyle s. There are predefined ones which get automatically created when you bind the DataSource but you can override them. You can implement as much different styles as you want (inheriting either from the DataGridColumnStyle base class or probably from DataGridTextBoxColumn or another default one. The most important part there is now that you can implement your own Paint function where you can change color, font, the contents or whatever you like.
I suggest reading on this topic on MSDN, search for articles here on CP and probably use Reflector to look at the built in ones to get an idea on how to start. The whole thing can be rather complex at the beginning but if you know how to use it you can really do neat stuff with the DataGrid.
-- modified at 6:57 Wednesday 14th June, 2006
|
|
|
|
|
Has anyone used the LabelEdit "feature" of the NET 2.0 TreeView class.
If so, is there an easy way of processing the keystrokes of the "new label value" as they're entered. The KeyDown etc events for the TreeView itself are not invoked as they are entered. My planning assumption was I'd implement my own text input control when the user hit F2 or selected Change Name from the context menu. However the LabelEdit feature has come pdc to obviating that necessity. My main want is to trap Escape and set e.Cancel to true, but in addition I'd like to dump most special characters into the keystroke recycler.
Any ideas would be much appreciated - my preference is to NOT use "unsafe" methods, which I think I could do. I'd prefer to implement a "standard" text input control if I have to.
Cheers PhilD
|
|
|
|
|
Not as far as I know, you can only check values before and after they're edited.
There are a couple of controls here (search for treeview) that might to the job but I haven't found one that's very robust yet.
I know the frustrations, trust me
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
|
|
|
|
|
Thanks Ed.
I thinks I've got it sussed now
ListViewItem has a Position property which is a Point (why Position and not Location - who knows), TreeNode has a property Bounds which is a Rectangle which includes a Point which is called Location. Both objects have a property which gets you to their respective masters (ie a ListView or TreeView) which have an ImageList property, both ListItem and TreeNode have imageList indices so you can offset by the Image.Size.Width property - except that TreeNode Bounds has already done that for you - and make sure you differentiate between int indexed imagelists and string indexed image lists.
I am now very close to having a "LabelEdit" that provides the functionality of a TextBox++ , it'll be my first contribution to CP.
Cheers PhilD
|
|
|
|
|
pjd1001 wrote: it'll be my first contribution to CP
Look forward to seeing it
Formula 1 - Short for "F1 Racing" - named after the standard "help" key in Windows, it's a sport where participants desperately search through software help files trying to find actual documentation. It's tedious and somewhat cruel, most matches ending in a draw as no participant is able to find anything helpful. - Shog9
|
|
|
|
|
I have created a listview in my C# form and when i add an item through my code I change the background color of my cells/rows. However, when i scroll over them at runtime the color defaults back to white and then they stay white. I have different tab pages in my form. If I switch to a different tab page and then come back the colors will be back where they were until they are selected or scrolled over again. Is this simply a glitch in VS? I have no idea how to fix it. When I enter items into the listview I am using the following code.
ListViewItem li = new ListViewItem(le.TimeStamp.ToString());
//Allows us to use different fonts, backgroud colors, etc. for individual items within a row on the
//list view and for entire rows themselves
li.UseItemStyleForSubItems = false;
string mt = "";
//depending on the type of message that is being logged to the case tab a color indicator is chosen
//to be displayed in the "Indicator" column
switch(le.MessageType)
{
//display a green indicator bar and a message for "Informational"
case "Informational":
{
mt = "Informational";
li.SubItems.Add(mt);
li.SubItems.Add("");
li.SubItems.Add(le.Message);
li.SubItems[2].BackColor = Color.Green;
CaseLogListView.Items.Add(li);
break;
}
I have posted this issue on numerous websites and no one will respond with any kind of solution. Please help.
-- modified at 20:32 Tuesday 13th June, 2006
|
|
|
|
|
I had a little trouble reproducing your problem. Do you have hot tracking on? I noticed it did it when you had hot tracking. Without it, it seems to work fine. I'm assuming you're using "detail" mode.
Logifusion[^]
|
|
|
|
|
I would agree that it has something to do with the hot tracking. I don't know what yet, but I'm working on it.
|
|
|
|