|
this is not a class .
as i read in msdn my is a special key word for vb2005
Regards Amir Jalaly
|
|
|
|
|
Amir Jalaly wrote: ForumC#
Subject:Re: what c# has equal to my in vb2005?
Sender:Amir Jalaly
Date:1:42 9 Mar '06
this is not a class .
Of course it's a class. .NET 101: EVERYTHING IS A CLASS
Add a reference to the Visual Basic dll in your project and then add the Microsoft.VisualBasic namespaces to your application that you need. You'll find all the My objects in there somewhere. For example, Computer and Audio are in the Devices namespace and User is in the ApplicationServices namespace.
|
|
|
|
|
First: My Internet speed was very slow that's y i sent problem more than one time.
Hello,
Thanks a lot for every brother, dear i want to do this in Web Application not in Windows Application so please send me some code how can i add textboxes in controls and use later on..
THE QUESTION WAS "I used a number of Textboxes in Web Application using C#, now i want to access all these but i don't want to write name of each textbox i just want to use an ARRAY to assign values (Or Access these textboxes), I saw this somewhere in Visual Basic 6.0 but i don't know how can i do that in Visual Studio 2003 please tell me some solution for this to avoid write the names of all these ???????????????"
Regards,
AbuBakar
|
|
|
|
|
You're probably talking about the Index feature in VB6.
This isn't available in .Net.
You could however tag your textboxes (.Tag = "Somename")
And then with a loop through all Controls check for the tag and work like that.
This still means you can't do this.
textBox[1].Text = "Something";<br />
textBox[2].Text = "Something Else";
But you could do:
foreach (Control ctrl in Controls)<br />
{<br />
if (ctrl.Tag.Equals("Somename"))<br />
{<br />
ctrl.Text = "Something";<br />
}<br />
}
|
|
|
|
|
hi,
I wanted to know if i get drives using the function "System.Environment.GetLogicalDrives()",then is there any methods which can tell which drive is what?Say i wanted to know whether "D:" is CDROM or the hard disk drive.
Can anybody help me?
Thanx in advance.
Nitin_ap
nitin_ap
|
|
|
|
|
Use DriveInfo class for that...
Regards
Hansjörg
|
|
|
|
|
|
Hello I have a question regarding to serializing objects.
I have a class which has a property with an object which implementents a interface.
This class is included in a class library. The object is included allways in other projects and is allways different.
Is there a way to serialize this objects automatically ( I use the XmlSerializer)?
e.g.
<br />
[Serializable]<br />
public class SerializeTestObject<br />
{<br />
public int x = 0;<br />
public int y = 10;<br />
}<br />
<br />
[Serializable]<br />
public class SerializeVisualObject :ISerializable<br />
{<br />
private Rectangle bounds;<br />
private Color foreColor = Color.Red;<br />
private Color backColor;<br />
private object obj = new SerializeTestObject();
<br />
public SerializeVisualObject() { }<br />
<br />
protected SerializeVisualObject(SerializationInfo info, StreamingContext context)<br />
{<br />
bounds=(Rectangle)info.GetValue("Bounds", typeof(Rectangle));<br />
foreColor=(Color)info.GetValue("ForeColor", typeof(Color));<br />
backColor=(Color)info.GetValue("BackColor", typeof(Color));<br />
obj = new SerializeTestObject();<br />
}<br />
public object Obj<br />
{<br />
get { return obj; }<br />
set{obj = value;}<br />
}<br />
public Rectangle Bounds<br />
{<br />
get { return bounds; }<br />
set { bounds = value; }<br />
}<br />
<br />
public Color ForeColor<br />
{<br />
get { return foreColor; }<br />
set { foreColor = value; }<br />
}<br />
<br />
public Color BackColor<br />
{<br />
get { return backColor; }<br />
set { backColor = value; }<br />
}<br />
<br />
#region ISerializable Members<br />
<br />
void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context)<br />
{<br />
info.AddValue("Bounds", bounds);<br />
info.AddValue("ForeColor", foreColor);<br />
info.AddValue("BackColor", backColor);<br />
info.AddValue("Obj", obj);<br />
}<br />
<br />
#endregion<br />
}<br />
<br />
Regards
Hansjörg
|
|
|
|
|
I have this code in a combobox:
switch (comboBox1.SelectedIndex)
{
case 0: MessageBox.Show("Windows Longhorn 1 (1024x768)"); pictureBox1.Image = System.Drawing.Image.FromFile("Themes\\Wallpapers\\Windows Longhorn\\windows longhorn (1024x768).jpg"); break;
case 1: MessageBox.Show("Windows Longhorn 1 (420x336)"); pictureBox1.Image = System.Drawing.Image.FromFile("Themes\\Wallpapers\\Windows Longhorn\\windows longhorn (420x336).jpg"); break;
case 2: MessageBox.Show("Windows Longhorn Define the digital decade (1024x768)"); pictureBox1.Image = System.Drawing.Image.FromFile("Themes\\Wallpapers\\Windows Longhorn\\Windows Longhorn Define the Decade (1280x1024).jpg"); break;
case 3: MessageBox.Show("Windows Longhorn M6 Build Orange (800x600)"); pictureBox1.Image = System.Drawing.Image.FromFile("Themes\\Wallpapers\\Windows Longhorn\\New Longhorn orange M6 (800x600).jpg"); break;
case 4: MessageBox.Show("Windows Longhorn M6 Build Orange (1024x768)"); pictureBox1.Image = System.Drawing.Image.FromFile("Themes\\Wallpapers\\Windows Longhorn\\New Longhorn orange M6 (1024x768).jpg"); break;
}
What I want is when you click btnOK (Button OK) it will load the image you selected from the file eg: pictureBox1.Image = System.Drawing.Image.FromFile("Themes\\Wallpapers\\Windows Longhorn\\New Longhorn orange M6 (800x600).jpg"); and display the image from this file in a picturebox pctWall in another form that is loaded. How would you do that?
In the end we're all just the same
|
|
|
|
|
Who can tell me the differences between control and ContainerControl or give some useful articles.
It confused me.Help please.... Thanks a lot.
|
|
|
|
|
As i think you can take a simple example of control DataGrid and for container control Repeater. In a repeater you can have many grid controls.
for more information about those check the following link
http://www.asp101.com/articles/john/repeater/default.asp
|
|
|
|
|
I've just downloaded .net 2.0 so that I can use the serial ports offered in the IO.Ports dll but I cannot find it. Does anybody know where I would find this.
Thanks
Garry
|
|
|
|
|
gokeeffe wrote: IO.Ports dll
I don't know of any such thing as an IO.Ports dll, but maybe System.IO.Ports is what you are looking for. There is a SerialPort object in this namespace.
Search for it in the obect browser.
Summary:
The System.IO.Ports namespace contains classes for controlling serial ports. The most important class, System.IO.Ports.SerialPort, provides a framework for synchronous and event-driven I/O, access to pin and break states, and access to serial driver properties. It can be used to wrap a System.IO.Stream objects, allowing the serial port to be accessed by classes that use streams.
----------
There go my people. I must find out where they are going so I can lead them.
- Alexander Ledru-Rollin
|
|
|
|
|
Thanks, I can find this using a downloaded version of visual C# express but I really wanted to use Visual Studio.Net 2003.
I have installed .Net 2.0 but I cannot find the IO.Ports in the 'Customise Toolbox' dialog in Visual Stidio.
I think my question should have been 'How do I make Visual Studio 2003' use .net 2.0.
Thanks for your help.
Garry.
|
|
|
|
|
|
Thanks for your help, it looks conclusive that it can't be done.
|
|
|
|
|
This is a VB.Net sentence,How to realize in c#?
PHDObject = CreateObject("VisualPHD.Data")
|
|
|
|
|
|
PHDObject = Activator.CreateInstance(Type.GetType("VisualPHD.Data"));
|
|
|
|
|
hey guys,
i need to beable to interact with the CodeBase database from my C# application. please tell me its easy and tell me its free?
Regards
|
|
|
|
|
:-DI want to draw a select rectangle use mouseEvents in panel,with some drawings already existing.
At first I used MouseDown ,MouseMove and MouseUp events to draw this rectangle with solide pen,however on MouseMoveEvent,when I use a pen(with backColor)to erase the last rectangle MouseMoveEvent generated,the existing drawings are erased too.then ,I used invalidate(),but the drawings flashed.
All I want is just draw a rectangle with a Dash pen and the existing drawings not flashing,just like the selecting rectangle in WinXP deskTop.
Thanks.
-- modified at 2:13 Wednesday 8th March, 2006
|
|
|
|
|
Try using double buffering, this will probably solve the flashing.
|
|
|
|
|
Thanks for your help.the problem has been solved;
Guided by your reply,I set the control's ControlStyles.UserPaint|ControlStyles.AllPaintingInWmPaint|ControlStyles.DoubleBuffer to be true.and it works.
|
|
|
|
|
If you use .NET 2.0 you can also use this.DoubleBuffered = true
|
|
|
|
|
hi guys, any one of you can tell me how can i made my software as a trial version, i dont how do i initiate to make it trail version, any one of you please guide me.
Thanx
Raheel Iqbal
-- modified at 1:36 Wednesday 8th March, 2006
|
|
|
|