|
|
Only yesterday there was an item (I believe regarding "mailto:") with some buffer limited to some 2048 bytes; I guess you are hitting the same limit.
|
|
|
|
|
Hi, I have a DataTable with 4 columns (id, type, length and note) which i bind to a DataGridView (mydataGridView.DataSource = mydataset.Tables[0];). How can I make the "type" column in my datagridview a DataGridViewComboBoxColumn with 3 values (say "white", "black", "gray") representing the same values stored in the DataTable type column?
Any help would really be appreciated.
|
|
|
|
|
Hello!
I have a form with a TreeView, a TextBox and a Button. I select a node from TreeView, after that I want to write some text in textBox or click the Button.In this moment selection from the TreeView is not active any more.How can I make that to stay active, to see what node I have selected?
10x
|
|
|
|
|
Set HideSelection to false.
|
|
|
|
|
Can anyone help me in reading this data.config changing some of its values and wrting it back in the same xml.
Sample data.config is below
<configuration>
<connectionStringCollection>
<XmlSerializerSection type="test values">
<ConnectionStringDataCollection xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Connections>
<connectionString>
<Name>default</Name>
<ConnectionString>Data Source=test123;User Id=aaa;Password=123;</ConnectionString>
</connectionString>
<connectionString>
<Name>default2</Name>
<ConnectionString>Data Source=test123;User Id=bbb;Password=123;</ConnectionString>
</connectionString>
</Connections>
</ConnectionStringDataCollection>
</XmlSerializerSection>
</connectionStringCollection>
</configuration>
Please help me in doing this with C# or VB.net code
Thanks in advance
Umashanker.K
|
|
|
|
|
Load the XML file into an XmlDocument instance, select the nodes you want to change using its SelectNodes or SelectSingleNode methods and finally change the node value as wanted. The documentation of the mentioned class and methods contains many examples, so you should be able to figure out the coding yourself.
"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 want to make an image filter in Visual Studio C# .The function of such filter is that redraw the original image only with its dark pixel.
I used following logic but its too slow and not efficient
for (int i = 0; i < 300; i++)
{
for (int j = 0; j < 200; j++)
{
p = new Pen(bitmap.GetPixel(i, j), 1);
for (int r1 = 0; r1 < 100; r1++)
{
for (int r2 =0; r2 < 100; r2++)
{
for (int r3 = 0; r3 < 100; r3++)
{
if (p.Color ! = Color.FromArgb(255, r1, r2, r3))
{
p.Color = Color.Transparent;
}
g.DrawRectangle(p, 1 * i, 1 * j, 1, 1);
}
}
}
My second question is that how we can manipulates the images in visual studio c# .net ,like convert the image in black &white color,grayscale etc etc
Please send the some code or hints+links
|
|
|
|
|
GDI+ is much faster...
Please read "Image Processing Lab in C#"
MSN:shrinerain@hotmail.com
|
|
|
|
|
Hi,
I want to create a start up application that will check the MYSQL SERVICE RUNNING or Not & IF it is running then it will Kill that & Exit. Else it will run an exe setup file.
Any one Please suggest me how can i check WINDOW SERVICE in DotNet.
& How can i kill APACHE by using command line from my programe.
Thanks
connect me @ panda.biswabhusan@gmail.com
|
|
|
|
|
Hi,
take a look on the class ServiceController (include Reference System.ServiceProcess).
Sample:
ServiceController controller = new ServiceController(<servicename>);
controller.Refresh(); // Controller should read state
if (controller.State == ServiceControllerStatus.Running) // Service is running...
...
you will receive an exception if the specified service does not exist.
|
|
|
|
|
|
Dim service() As System.ServiceProcess.ServiceController
Dim i As Integer
service = System.ServiceProcess.ServiceController.GetServices()
For i = 0 To service.Length - 1
If service(i).ServiceName = "wampapache" Then
If service(i).Status = ServiceControllerStatus.Running Then
' Kill the Service
service(i).Stop()
Application.Exit()
Else
Dim startInfo As System.Diagnostics.ProcessStartInfo
Dim pStart As New System.Diagnostics.Process
startInfo = New System.Diagnostics.ProcessStartInfo("E:\Biswabhusan_Collection\COREPRACTICE\TestService\wamp5_1.6.1.exe")
pStart.StartInfo = startInfo
pStart.Start()
pStart.WaitForExit() 'Your code will halt until the exe file has executed.
End If
End If
Next
solveed - Biswabhusan
|
|
|
|
|
List<int> lst_int=new List<int>();
lst_int.Add(3);
lst_int.Add(5);
lst_int.Add(2);
lst_int.Sort();
MessageBox.Show(lst_int[0].ToString());
struct mystruct
{
int x;
int y;
}
How do I implement "sort" for lists of type mystruct?
List<mystruct>
List<mystruct> lst_mystruct=new List<struct>();
mystruct mys;
mys.x=10;
mys.y=12;
lst_mystruct.Add(mys);
how do I sort now?
|
|
|
|
|
Implement the IComparable and/or IComparable<mystruct> interface(s) in your struct.
"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 all,
I want to develop a textbox(more like richtextbox control) where users can enter some text, but the bitmaps are displayed instead of characters. The user should be able to edit the text and the corresponding values should be preserved(between the text entered and the corresponding bitmaps). How do i go about doing this. Is there a way to override the paint event of the textbox so that the bitmap is drawn instead of charcters.
Please help.
Thanks for reading.
|
|
|
|
|
The textbox is not written for overriding, as it paints itself outside of any paint event, getting it to custom draw is always nasty. I'd say it's almost better to start from scratch.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
SO, u are suggesting that I start from a class that inherits usercontrol class. So, how do i display the cursor(carat) on the control. How do i go about editing and deleting and positioning the cursor?
Any suggestions...
|
|
|
|
|
Looking for info on how to populate listview from folderbrowserdialog once the user selects a file followed by the ok button.
I'm relatively new to programming with C# so the more detail the better.
Thank you
Mike
|
|
|
|
|
Hi,
First, after the user selects a folder, you know its path. You can GetDirectories from that Directory object. Then iterate through the collection, filling each folder name in the list box. I think that there will be a better way of doing this, but i dont know about it. This solution will surely work in your case. But this is not a good practice, I guess.
"A good programmer is someone who looks both ways before crossing a one-way street." -- Doug Linder
coolestCoder
|
|
|
|
|
Use Directory.GetFolders and Directory.GetFiles, merge those arrays together and make them the datasource on your listview.
How new is 'new' ? Have you taken the time to learn C# before learning Winforms ? Have you worked through any books ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
New is about 6 months experience and still learning through CDI college.
Thank you for the reply.
|
|
|
|
|
hi,
In my application I am using a DataGridView with 4 columns.
now I want to validate the data entry from user.
like in First column user should enter only Numbers, and in second column I want a default cell fromat like xx.xx.xx.xx
How to do this.
Pls help me
With Regards
prasad
|
|
|
|
|
Did you try with DataGridView.ColumnDividerWidthChanged Event.
Regards,
Satips.
|
|
|
|
|
hi,
wht i have to do with this event
i am not getting can u hekp me pls..
dataGridView1_ColumnDividerWidthChanged()
with regards
prasad
|
|
|
|