|
Seems like there is a rash of them lately.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
i have problem in datagridview which is shown in image link bellow :-
link[^]http://img167.imageshack.us/my.php?image=67945689us3.png[^]
as shown in image the red circle shows that there is blank space appear
i don't want that
i cant reduce the size also because sometimes the data is to large
plz help
modified on Saturday, November 29, 2008 9:01 AM
|
|
|
|
|
The link doesn't specify you Qs properly
Cheers!!
Brij
|
|
|
|
|
if u have seen the snap shot i have uploaded
i made a rec color circle to show the place which is empty
when data is small then such problem occur but when data is large then there is no empty space
so i want to fit the data in datagridview even it is small.
|
|
|
|
|
Click the smart tag on the datagridview and select edit columns. Edit the last column and change the AutoSizeMode to fill.
Cheers!
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
thanks for reply
but i am using code to fiil datagridview like
DataGridView1.DataSource = ds.Tables(0)
so there is no columns in smart tag - edit columns
|
|
|
|
|
Then after the grid fills, programmatically change the setting for the last column in the grid?
DataGridView1.Columns(DataGridView1.Columns.Count - 1).AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
Any suggestions, ideas, or 'constructive criticism' are always welcome.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
Hello all,
i'm making a dynamic light system, that contains scene's. A scene has a lamp (philips livingColor), min 1 max 8, and each lamp has its own platform. The save/edit a scene i am saving all data in the class Lamp (and motor) in a list <color_point>.
The struct: Color_point has string, int and a Color.
However, if i want to serialise the class, i wont get a color in the xml. I know this is an private attribute, so i wont get something back. And I already read some more about making a different struc tfor the color. But.. how?
See Code:
using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using System.Collections;
using System.Collections.Specialized;
using System.Xml.Serialization;
namespace Light
{
[Serializable()]
public struct Color_Point
{
public string Name;
public int Time;
public Color Rgb;
public Color_Point(string name, int time, Color rgb)
{
Name = name;
Time = time;
Rgb = rgb;
}
}
[Serializable()]
public class Lamp
{
public int address;
public Color current_Color;
public Color previous_Color;
public List<Color_Point> list = new List<Color_Point>();
public Lamp()
{
address = 0;
}
public void setColor(Int32 time, Color rgb, string name)
{
int correct_time = 0;
if (name != "Fade")
{
if (list.Count == 0)
list.Add(new Color_Point(name, 0, rgb));
else
{
correct_time = getTime("btnColor" + LastNumber()) + time;
list.Add(new Color_Point(name, correct_time, rgb));
}
}
else
list.Add(new Color_Point(name, time, rgb));
}
How can i make sure that i also save the Colors??
Thank you!
|
|
|
|
|
An easy way around that is to make the color private and expose it's constituant parts (R, G, B) as pubic properties.
A leaner way to do it would be to implement your own custom serializer for your class. See this[^] for a quick explanation and sample.
|
|
|
|
|
I want to check file is copied perfectly or not without losing any single bit of data.
How can I achieve this using vb.net
I am using system.IO for drive type,copy file and drive accessible or not.
Waiting for your valuable thought
Thanks in advance
|
|
|
|
|
You could hash the original file, and the copied file, and check that the hashes match.
.net provides an MD5 has class. Doc are here[^].
Simon
|
|
|
|
|
There's a problem with doing this instead of relying on the file system to do it for you.
You have to read the entire source file, hash it as you copy it, then write the file out to the destination. Then, you have to go and read the entire destination file and hash it. Depending on the file size, this can be a time consuming process! Then compare the hashes. But, this does NOT guarantee a good copy!! Why?? What if the source file was read incorrectly?? You have no way of knowing that it was a bad read, so you'll end up hashing it and writing it out correctly, and just end up guaranteeing that you made a bad copy.
|
|
|
|
|
This is the filesystems job, not yours. If the filesystem has a of corrupting a bit on read, then your checking will have two effects:
1) Double the amount of work, so the copy takes twice as long.
2) Double the number of reads, so you are twice as likely to get a single read error over the operation - which means you'll have to try again.
You will also very likely stuff this up and end up reading the written file straight back out the OS's cache, which won't check the underlying media at all.
|
|
|
|
|
i have a problem that Form size. It is different for different computer
tell me how can i fix size of my form for any computer
|
|
|
|
|
Like I said in your other thread, you can grab the dimensions of the primary monitor (System.Windows.Forms.Screen.PrimaryScreen.Bounds.Width, System.Windows.Forms.Screen.PrimaryScreen.Bounds.Height) and set your form to that size....
WHOOPS; just misread what you typed there, sorry about that.
What's the problem with the size? Be more specific
|
|
|
|
|
Ok, I think I understand your problem. Sorry, reading that English was a little different.
Form sizes may appear skewed from monitor to monitor due to different resolutions. An approach on how to fix that isn't something I'm familiar with. Each control would be proportionalized evenly so they would all have the same aspect ratio, but not the size that you want visibly.
I guess one (annoying) way would be to change the screen resolution yourself manually as a part of your program.
|
|
|
|
|
hi
i want a help
i want my form to open in maximize when i click on exe file and i also want to disable the maximize/minimize button b'cos i don't want my user to change the form size .....
can anyone tell me how i can do it....
|
|
|
|
|
formborderstyle fixedtoolwindow
private void Form1_Load(object sender, EventArgs e)
{
this.FormBorderStyle = FormBorderStyle.FixedToolWindow;
this.Width = this.MaximumSize.Width;
this.Height = this.MaximumSize.Height;
}
or you can get bounds of the primary screen and set width and height to that, set topmost to true so its always on top
|
|
|
|
|
Hi,
there are several Form properties dealing with your needs; check MimimizeBox, MaximizeBox, and WindowState. Read up on these and others. Be careful, some of them do not work when others have specific values (e.g. for some border styles minimize/maximize are always absent).
|
|
|
|
|
That's why I suggesting setting the size to the PrimaryScreen.Bounds so he won't run into that problem
|
|
|
|
|
We have a funny problem with our serverfarm. We run 8 (2xquadcore) XEON servers which are connected in a GB-Network running on Windows 2003 R2. They ommunicate over the MS-Framework 2.0 with remoting functions. We process between 15’000 to 20’000 updates per second.
When starting the servers, everything works fine but the processes goes slower after 1-2 days. Even restarting the application does not help. We have to reboot the servers and everything is fine again for 1-2 days.
Has somebody an idea what this could be?
|
|
|
|
|
I want to have a usercontrol displayed in a datagridview details view which shows when you press that [+] sign but I couldn't figured out how to do it. I'd appreciate any ideas about this
|
|
|
|
|
|
Hi all, I'm Alessio.
I've developed a vb.net windows service that every 30 seconds opens an outlook session to connect via MAPI to exchange (2003) and to read e-mails and download attachments.
And all works fine and seems beautiful.
But as soon as possible, this situation will change.
All people that now can send messages, will receive a digital-sign onto a smart-card to encrypt e-mails and attachments.
When it happens, my service will MUST to be able to decrypt messages and attachments, but I don't know how can I do this and where can I find some examples.
Please, help me.
Thanx in advance and excuse me for my english.
Alessio
|
|
|
|
|