|
did you get the answer?
I'm exactly in the point that you've mentioned but 6 years later.
|
|
|
|
|
Hi
Help me please
I could change color the rectangular which is showed when an item in listbox is focused, but while the selected item is changing , the color change into a blue again and after a while change into the color which I set for it.
I dont want this changing, what can I do ?!!
|
|
|
|
|
can you post some code which contain your problem?
|
|
|
|
|
I found it myself.
i was because of this code= e.DrawBackground().
Thanks
|
|
|
|
|
using VS2005;
I'm having trouble getting my mind around dataviews and datatables .
I have a datatable filled with * and has columns ID,Credit,Date,Description,Amount. I want to use the data in that datatable in several places in my program.
What I want to do is use a datagrid to display rows that are:
a) sorted in date order
b) rows are selected from the datatable because they fall into a programable date range and the Credit column value is true.
c) only some columns are displayed in the datagrid.
Will it be necessary to create another datatable programatically (in order to achieve (b) above) or is it possible to extract the data from the current datatable that holds all the data I want and then stick that selected data into the dataview?
TIA.
-- modified at 23:37 Saturday 12th August, 2006
-- modified at 23:38 Saturday 12th August, 2006
Glen Harvy
|
|
|
|
|
Hi friends,
I have one use control, which have one DATAGRID and control to uplaod (HTML where input type=file). When you upload file, (1) it will save file in the server folder (2) shows in the GRID within LinkButton. So one click on the linkbutton (FileName), able to save/Open file.
Code for this is.
----------------------------------------------------------------
FileStream MyFileStream = new FileStream(baseAttachementsPath + FileToOpen , FileMode.Open ,FileAccess.Read,FileShare.Read);
long FileSize;
FileSize = MyFileStream.Length;
byte[] Buffer = new byte[(int)FileSize];
int bytesRead = MyFileStream.Read(Buffer, 0, (int)MyFileStream.Length);
MyFileStream.Close();
Response.Buffer=true;
Response.Clear();
Response.Charset = "UTF-8";
Response.ContentType = "application/octet-stream"; Response.AppendHeader("content-length", FileSize.ToString() );
Response.AddHeader( "content-disposition","attachment; filename=" + FileToOpen);
Response.Flush();
Response.BinaryWrite(Buffer);
Response.End();
-------------------------------------------------------------------------
So this code is working for all file but not for text file.
When we try to open the text file, it will have all content with the source code for page. (source code is that for my current .aspx, and if i do view->source)
so if i have data in text file is "TEST FILE",
so when try to open / save ..
it contains...
==========
Test File
meta content=http://schemas.microsoft.com/intellisense/ie5 name=vs_targetSchema>
<title>HP Direct Customer Addresses Registration Form
etc....
==================
Code is giving only for TEXT, else for DOC,PDF,xls working fine.
Can you help me?
Thanks in advance..
naishadh
|
|
|
|
|
Hi friends,
I have one use control, which have one DATAGRID and control to uplaod (HTML). When you upload file, (1) it will save file in the server (2) shows in the GRID within LinkButton. So one click on the linkbutton (FileName), able to save/Open file.
Code for this is.
----------------------------------------------------------------
FileStream MyFileStream = new FileStream(baseAttachementsPath + FileToOpen , FileMode.Open ,FileAccess.Read,FileShare.Read);
long FileSize;
FileSize = MyFileStream.Length;
byte[] Buffer = new byte[(int)FileSize];
int bytesRead = MyFileStream.Read(Buffer, 0, (int)MyFileStream.Length);
MyFileStream.Close();
Response.Buffer=true;
Response.Clear();
Response.Charset = "UTF-8";
Response.ContentType = "application/octet-stream"; Response.AppendHeader("content-length", FileSize.ToString() );
Response.AddHeader( "content-disposition","attachment; filename=" + FileToOpen);
Response.Flush();
Response.BinaryWrite(Buffer);
Response.End();
-------------------------------------------------------------------------
So this code is working for all file but not for text file.
When we try to open the text file, it will have all content with the source code for page. (source code is that for my current .aspx, and if i do view->source)
so if i have data in text file is "TEST FILE",
so when try to open / save ..
it contains...
==========
Test File
meta content=http://schemas.microsoft.com/intellisense/ie5 name=vs_targetSchema>
<title>HP Direct Customer Addresses Registration Form
etc....
==================
Code is giving only for TEXT, else for DOC,PDF,xls working fine.
Can you help me?
Thanks in advance..
naishadh
|
|
|
|
|
I think you would have to change the MIME type depending on the file type. Try
Response.ContentType = "text/plain";
|
|
|
|
|
Thanks for the Reply.
But i have done that. It's working in my local machine - Develope env. but not in the stage Env and Producation Env.
Can you help me for this?
|
|
|
|
|
Hi,
Recently I found that, the same Windows and ASP.NET applications were working fine for MS Agent Characters to make them Speak. But last few days none of them are talking. They are functioning well for the other activities but not talking?
I mean, Character.Speak("Hello World") is not making them speak at all.
EVEN IN MICROSOFT WEBSITE PAGE, at http://www.microsoft.com/Msagent/dev/code/TryMSAgent.asp[^]
The PEDDY is not talking in my computer. In that way I am sure that, My programming has no problem, Something we need to upgrade in our PC to make them talk. What is that upgrade ?
If so, How to recover this problem..!!
Thanks and regards
-- modified at 17:30 Saturday 12th August, 2006
|
|
|
|
|
emran834 wrote: that
Open volume cntrol. Uncheck "mute"
|
|
|
|
|
Hi
thanks for your reply.
My Mute was unchecked as I was listening all other sounds. o u have any other idea about the reason ? because I checked multiple computer and I found none of the computer is sounding MS Agent Speech.
Thanks
|
|
|
|
|
I have a panel with tons of controls displayed vertically. ( about 3 x the length of the panel )
When I scroll to the bottom it works fine.
But, when I scroll up it resets back to the oringal position.
For instance, I scroll all the way to the bottom.
I then click in the middle of the scroll bar so it goes up a page. But it doesn't move.
But, then I notice if I click in the panel and then click on the scroll bar. It moves.
Any ideas on a work around?
-- modified at 15:35 Sunday 13th August, 2006
--------------------------------------------------------
1 line of code equals many bugs. So don't write any!!
My mad coder blog
|
|
|
|
|
How can I add an HTML file as a resource to a binary, and how to reference it from my code?
(VS2005)
We are a big screwed up dysfunctional psychotic happy family - some more screwed up, others more happy, but everybody's psychotic joint venture definition of CP
Tree<t> in C# || Fold With Us! || sighist
|
|
|
|
|
Add the file to your project and in the properties window change the build action to embedded resource. Use Assembly.GetManifestResourceStream to get a stream to the embedded html file.
"Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning." - Rick Cook www.troschuetz.de
|
|
|
|
|
Hi,
I'm getting a HD serial number from the WMI and saving it to a var:
SerialNo = wmi_HD["SerialNumber"].ToString();
which works fine. And on my system, I can do this:
MessageBox.Show(GaugeGlow.Program.theHD.SerialNo +
"\tCount: " + GaugeGlow.Program.theHD.SerialNo.Length);
and get the correct:
WD-WCA8E5870675 Count: 15
but on someone else's computer I get:
E17CCYE Count 20
I haven't a clue why. Anyone shed light on what I might look at?
Patrick
|
|
|
|
|
Print out the character codes for each character in the string. Perhaps it's padded with spaces or unprintable characters.
---
b { font-weight: normal; }
|
|
|
|
|
Thanks, it turns out that it was padded with spaces, so I just added a
.Trim() and now it works fine.
Patrick
|
|
|
|
|
i need to declare public variable in c# that will available from any form in my project and keep it's value during appliction running like public varaible that we declared in module in vb
ma_refay
|
|
|
|
|
static. isn't a good design tho
--------------------------------------------------------
1 line of code equals many bugs. So don't write any!!
My mad coder blog
|
|
|
|
|
public class MyFirstForm : Form
{
public int Foo = 5;
}
public class SomeOtherForm : Form
{
public void ChangeFirstFormValue(MyFirstForm instance)
{
instance.Foo = 10;
}
}
|
|
|
|
|
I have a bit map created that is the size of 32x32
When I drag the object I am redrawing it in every paint event. But it is much larger. Appears to be about 48x48.
When I check the hight and width it says 32.
Although the vertical and horizontal resultion is 71.3.
Can anyone tell me how to appear in exact pixels of 32x32?
--------------------------------------------------------
1 line of code equals many bugs. So don't write any!!
My mad coder blog
|
|
|
|
|
nevermind Grp[hics.DrawBitmap defualts to a format different than Pixel. Its works now when I specify pixel
--------------------------------------------------------
1 line of code equals many bugs. So don't write any!!
My mad coder blog
|
|
|
|
|
Hello..I'm trying to make my first console app in c#. I've just read a very good book and some articles. So, I'm sure many of my fistr questions may seem very dumb for most of you...please don't be so hard ;o)
Q: I sow that to declare a constant value, it should be declared indide a class. So...what if I want to declare a constant value with scope in my whole app?..should I declare a big class envolving all the code?. Is this a good practice valid even for console and windows apps?
Thanks
|
|
|
|
|
You could do a class like that:
public class Constants
{
static const int MIN_SOMETHING = 5;
}
You can then access them in your whole project like that:
int test = Constants.MIN_SOMETHING;
This is okay for the most important global constants/variables you might need. But don't populate a class just full of static methods to act like an old C program
regards
modified 12-Sep-18 21:01pm.
|
|
|
|