|
hi im trying to bind a listbox to a datasource unsuccesfully, this is my code
DataTable myDt=...somefunction that returns a datatable with one row
myListbox.datasource=myDt.rows[0]
how can I databind without having to use the popolating while cycle?
thank you
|
|
|
|
|
this.lstFieldPool.DataSource=myDS.Tables[0];
this.lstFieldPool.DataTextField="name";
this.lstFieldPool.DataBind();
now it works
|
|
|
|
|
Hi,
When there were no .NET, Visual Basic or Visual C++ was the choice for .NET programming (and also Delphi). I am comfortable with C++ style coding like C# or Java etc, not Visual Basic or Delphi..
Now, what is best choice in these days for making very light weight native windows executables which doesn't require any .NET framework ? If I make a C# program, can I convert that to simple light weight native program using any tool ?
Thanks
|
|
|
|
|
Hello
There's no tool for conversion .NET application to Win32 application. Use C++ or Delphi 7 (or lower). Have a luck.
Andriy Zhornyk
|
|
|
|
|
The same as it always was - C++. C# and VB.NET require the framework, that's all there is to it. You can't convert a C# app to c++, no.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
Hello
bashiwala wrote: Now, what is best choice in these days for making very light weight native windows executables which doesn't require any .NET framework ?
Well, C++ of course!! in C++ you can make API calls that will run on any Windows edition.
bashiwala wrote: can I convert that to simple light weight native program using any tool ?
Check Xenocode Postbuild[^]
Regards
|
|
|
|
|
hi
im working on an application P2P file sharing (like eDonkey) and instant messaging.
what tecnologies should i use? Web Services, RPC, XML or something like that.
i know C++ and Delphi and Multithreaded, Socket programming but im new at C# and Microsoft .NET technologies.
please help me, really i don't know where to start!
thank you.
asamay
|
|
|
|
|
You might want to put your knowledge into developing a C++/CLI application then. It's C++ with .NET.
ROFLOLMFAO
|
|
|
|
|
Hello
Even P2P programs need servers to organize all those peers. Make a Socket application that would act as a listner server to accept peers and synchronize between them. Then make you client app that would get the ips of other peers from that server, then directly contact those peers by ip. System.Net.Sockets namespacce has all that you need.
Regards
|
|
|
|
|
thanks, its not a pure P2P application as u told, there is a discovery server for authorizing and locating sharing file list and some permissions about them.
i found an article about P2P programming with .NET technologies,
here it is
http://msdn.microsoft.com/msdnmag/issues/01/02/netpeers/default.aspx
it will be very useful for developing P2P app with .NET
thanks again.
asamay
|
|
|
|
|
Obviously I'm doing something wrong, or typed datasets are the most worthless invention ever because they never work.
1). I constantly get Original_ appended to parameters. Why would I ever need an update to look like this: Update(string title, string otherData, int Original_id, int id) when the id column is a PK and an identity column?
2). "...could not find a non-generic method 'Update' that has parameters:...". So, if just let the DS make all its own methods, then create a new ObjectDataSource with this DataSet as its DataObject the Update method VS generated BY ITSELF is not good enough?! Whats the point of it automatically generating the Insert, Update, and Delete methods if you need to write all sorts of code just for them to work properly?
I got tired of having to write a sort and paging method for every stupid GridView in the project, but its way easier than this.
|
|
|
|
|
Hi. I'm building a custom shaped form and I'm having a problem with flickering whenever I move the form. The issue is that the form itself does not flicker, but the controls on the form still do. I use the following code to execute movement of the form(in my MouseMove event handler):
if(e.Button == MouseButtons.Left)
{
if(!mouseOutOfBounds)
{
if(newMouseDrag)
{
mousePt = new Point(e.X, e.Y);
newMouseDrag = false;
}
else
{
if(!blockProcessing)
{
this.Location = new Point(this.Location.X + e.X - mousePt.X,
this.Location.Y + e.Y - mousePt.Y);
}
blockProcessing = !blockProcessing;
}
}
}
else
{
newMouseDrag = true;
}
Whenever I disable the visibility of all of the controls on the form, everything works fine, and if I enable the visibility of one button, there isn't much degradation in performance. But, whenever I have all of them visible, the redraw of the controls ghosts, and the bitmap that I have displayed in a picturebox flickers as it rasterizes itself. Does anyone know of a way to fix this problem?
-- modified at 18:05 Thursday 21st September, 2006
|
|
|
|
|
Hello
Your problem is that your controls are not double buffered. Use class BufferedGraphics to customly draw your controls using a buffer before displaying it to eleminate that flicker.
Regards
|
|
|
|
|
Yeah, I knew that the graphics needed to be rendered to a backbuffer, but I couldn't find anything in the MSDN to facilitate it in C#. ...I'm using 1.1, not 2.0
|
|
|
|
|
Simple!! Download .Net 2.0, Install it on your machine. Then reference to the appropriate dlls -System.Windows.Forms.dll for example- on the .Net 2.0 folder explicitly instead of the default.
Regards
|
|
|
|
|
Hi All,
I'm new to C# and XML. I could use a little advice on how best to approach my latest task. I'm using MS Visual Studio and need to setup a class which will consist of objects which will represent sub-control's (combo box, list box, etc).Class will be made up of a couple of strings and a couple of array of strings.
What would be best concerning XML, should I use elements or attributes? Which XML reader/parser would be best? Which method would be best for mapping XML input to a C# object?
Does anybody have a link to code where this is being done? I've found a lot of info on saving C# objects to XML but i'm trying to go the other way.
Thanx,
Tom
|
|
|
|
|
You may want to start by reading this[^].
--------
"I say no to drugs, but they don't listen."
- Marilyn Manson
|
|
|
|
|
Hi
when i add key and value into app.config from my app by following code ;
System.Configuration.ConfigurationSettings.AppSettings.Add("Color", "Red");
the following error shown me :
The configuration is read only.
how to solve my problem ?
|
|
|
|
|
Hello
//-------------------------------------
using System.Configuration; //add ref to System.Configuration.dll
//-------------------------------------
Configuration config = ConfigurationManager.OpenExeConfiguration(ConfigurationUserLevel.None);
config.AppSettings.Settings.Add("Color", "Red");
config.Save(ConfigurationSaveMode.Full);
//-------------------------------------
Andriy Zhornyk, with best regards
|
|
|
|
|
hi
thanks
but Configuration does not exist in Configuration namespace (but ConfigurationSettings exist)
can u other way to suggest me ??
|
|
|
|
|
I'm sorry. I've provided solution for .NET 2.0. You apparently have .NET 1.1. Am I right? As I know only config reading is possible for .NET 1.0 but I can be mistaken. If I'm right you can use xml to work with configuration. Have a luck.
Andriy Zhornyk, with best regards.
|
|
|
|
|
Hi,
I created a dataset with the designer of the VS 05 and added a query into it.
I found out that this query takes some time on slow computers and I want to make the CommandTimeout larger.
I checked the properties of the query and I can change several parameters like the CommandText and the CommandType, but the CommandTimeout is missing.
I don't want to change the CommandTimeout within the code generated by the designer, because it will be deleted each time I update the scheme.
So how can I do this without changing the designer's code?
I thought about using partial class, but I don't have an idea of how to do this.
Ami
|
|
|
|
|
Hi, I am creating forms that use a menubar (file-save,print, etc.). In visual studios 2003 I could keep the menubar from scrolling by selecting true in the locked property field. I 2005 I even though I lock it for some reason it still scrolls with the form.
Do you know a way to keep the menubar from scrolling with the form in vs 2005
Thanks
|
|
|
|
|
Hi all.
I'd search in the board how an can get text that is at the coordinate x,y (I have a flexgrid on external program and want to get the text of some row/column by its x,y coordinates).
I didn't found nothing. Can someone help me?
Please, help me.
Thx in advance.
Best Regards,
Marco Alves.
|
|
|
|
|
Hi guys!
I have drag and drop with 2 ListBoxes.
Now i need to chage them to Multi Select mode.
How can i do it, and what i need to add in the code for it?
|
|
|
|