|
I add COM+ component(macromedia flash ) in toolbox
but the problem is that it's not activated?
Thanks
Rastgar
Thanks
Rastgar
|
|
|
|
|
What do you mean by "not activated"? Is it grayed out?
What type of environment are you running it in? Windows or web?
|
|
|
|
|
it is a windows application and is developed by visual studio 2003.
by not activate, i mean, i cant drag and drop to my form. and i can not use it...
is every thing ok?
Thanks
Rastgar
|
|
|
|
|
You may need to run:
regsvr32 dllname
Geo
|
|
|
|
|
Hello,
This is my code which will convert the ADO resultset to XML in C#.
I actually need the column type, column max length etc also in the xml, like the column type/length of id, loginuserid, deptid, wrkstnid etc.
So I am not sure whether I need to pass some parameters to SqlDataAdapter class while executing the SQL command or the XmlDataDocument class has some methods which would print out the datatype and column length information in the XML. Looked at both the classes, didnt find any method, anybody has any ideas about this? Thanks
DataSet ds = new DataSet();
SqlDataAdapter adapter = new SqlDataAdapter(cmd);
adapter.Fill(ds);
if (ds.Tables.Count>0)
{
_sBody = new StringBuilder("", _bodySize);
//Get xml representation of the dataset
XmlDataDocument srcXML = new XmlDataDocument(ds);
srcXML.Save("c:\\XMLDocument.xml");
....
}
<NewDataSet>
<Table>
<id>1</id>
<LoginUserId>tpmadmin</LoginUserId>
<DeptId>1</DeptId>
<WrkstnId>1</WrkstnId>
</Table>
<Table>
<id>2</id>
<LoginUserId>sysadmin</LoginUserId>
<DeptId>2</DeptId>
<WrkstnId>2</WrkstnId>
</Table>
</NewDataSet>
-- modified at 12:25 Friday 5th May, 2006
|
|
|
|
|
Try this, (with 'ds' being your dataset)
ds.WriteXml(@"c:\thedataset.xml",System.Data.XmlWriteMode.WriteSchema) ;
That will write out all your xml with the schema.
|
|
|
|
|
Okay, I actually want the max size of the column and I think that information is missing in the XML. The XML looks something like this. Max size of the column is used by the XSL to print the data. For datatypes like int, numeric, datetime I can manage the column lenght, problem arises only when its of type string, char etc
It has the column name, type, minOccurs. I think the max size of the column is missing, do I need to try some other method, or any other argument? Thanks,
<?xml version="1.0" standalone="yes"?>
<NewDataSet>
<xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:UseCurrentLocale="true">
<xs:complexType>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element name="Table">
<xs:complexType>
<xs:sequence>
<xs:element name="id" type="xs:int" minOccurs="0" />
<xs:element name="LoginUserId" type="xs:string" minOccurs="0" />
-- modified at 16:24 Friday 5th May, 2006
|
|
|
|
|
I'm adding items to a listbox, and want to keep the most recently added (bottom) items visible, but with nothing selected. I'm currently doing it my selecting the last item and immediately clearing the selection, occasionally the two operations happen on oposite sides of a screen refresh and the blue bar flickers momentarily. Is there a better way to do this?
lb.SelectedIndex = lb.Items.Count -1;<br />
lb.SelectedIndex = -1;
|
|
|
|
|
This should be what you need:
this.listBox1.TopIndex = this.listBox1.Items.Add( "FOO!" );
Josh
|
|
|
|
|
Thanks. That property could be named better though, looking at it I'd assume it was an alias for the first element in the list, and not something to control what elements were visible.
|
|
|
|
|
At least it works
|
|
|
|
|
I need a method of capturing as a gif the screen on a WM5.0 device using C#, VS2005. I have done the capture as a bmp however it is very large in size (!40K). I need to be able to send the image over a cell network that charges by the byte so I need a small image.
If there is a tool to convert bmp to gif on the mobile device that would also work for me.
Thanks,
Nick Price
nickprice@canada.com
|
|
|
|
|
In Compact Framework 2.0 you can save a bitmap in different file formats.
---
b { font-weight: normal; }
|
|
|
|
|
Guffa,
Thanks for the response. I'll bet this is an easy process. However, between my thick head and relative newness to C# I have not been able to figure it out and I have been trying for several weeks now.
A few more details, pointers, clues etc would be most helpful!
nickprice@canada.com
|
|
|
|
|
Look at the Bitmap.Save(string, ImageFormat) or Bitmap.Save(Stream, ImageFormat) methods.
---
b { font-weight: normal; }
|
|
|
|
|
Bitmap.Save is not supported in the Compact Framework
|
|
|
|
|
As I wrote in my forst post, it's supported in compact framework 2.0.
---
b { font-weight: normal; }
|
|
|
|
|
When I try to add Bitmap the only options I get are Equals, FromHbitmap and ReferenceEquals.
I have added 'using System.Drawing' and have added a reference to it. Am I still missing a reference?
|
|
|
|
|
No, that is the reference to use.
According to MSDN[^] it's supported.
---
b { font-weight: normal; }
|
|
|
|
|
Thanks Guffa, That's what I needed!
|
|
|
|
|
What makes you think 40k is "very large"?
considering even a (by todays standards) small desktop screen is 640x480x16bpp an uncompressed screen would take up 614k. If your screen is larger then the uncompressed data is even larger.
I realize you are trying to stuff things through a small pipe and trying hard to be economical, but you have to realize that you are already getting some pretty darned good compression. I'm guessing you are already getting about 9:1 compression as it is, changing to GIF may not do much better dependong on how complex your screen is, what resolution you are running bit depth etc.
You may want to take your bmp and convert it over to an LZW compressed GIF by hand once to see if you will get the results you expect or need before going through too much trouble.
You may very well need to come up with a different way of transferring data than just the entire screen if GIF isn't good enough.
FWIW...good luck
|
|
|
|
|
The 40K was a typo, the bmp is actually 140K. When I convert it to a gif on the desktop the gif is only about 4k. What I am doing now is zipping on the handheld then sending it. Zipped it is again about 4k. My customer needs the file on the PC in a format that can be displayed on their web site. I have offered to write a PC app that will check a directory every minute or so for any zip files, unzip what it finds, convert any bmp to gifs and then remove the zip. However, a more elegant approach would be to have the file in a gif format on the handheld to start with. That's what I need help with.
nickprice@canada.com
|
|
|
|
|
Hey,
I have a usercontrol which I have written as a custom button control.
However, everytime my project is rebuilt, the properties for my UserControl are reset to their default values:
<br />
using System.Drawing;<br />
using System.Drawing.Drawing2D;<br />
using System.Data;<br />
using System.Windows.Forms;<br />
<br />
namespace MyControl<br />
{<br />
public class MyControl: System.Windows.Forms.UserControl<br />
{<br />
private Font _font;<br />
<br />
public MyControl()<br />
{<br />
InitializeComponent();<br />
<br />
_font = new Font("Arial", 12);<br />
}<br />
<br />
public override Font Font<br />
{<br />
get<br />
{ <br />
return _font; <br />
}<br />
set<br />
{ <br />
_font = value;<br />
}<br />
}<br />
}<br />
} <br />
Any ideas?
I change the Font in design time, but everytime I rebuild my project, the Font is reset to Arial, 10.
help
MK
"imagine how stupid the average person is ...
now imagine that half the planet is more stupid than that!"
|
|
|
|
|
Try not setting the control's properties in the constructor (especially not after the call to InitComp). That will blow away any user settings every time the control is created. If you want a control's property to have a default value, either use the DefaultValue attribute (for properties of simple types) or use the ShouldSerializeXXX/ResetXXX pattern so that VS.NET knows how to reset the property.
Josh
|
|
|
|
|
hi
i need to read all public methods from an assembly and read the code inside that public method, then i need to write something to that code. is it possible, plz help me
coolsweety
|
|
|
|