|
you are welcome...
example which i posted before to you it's in VS2005
"My advice to you is to get married. If you find a good wife, you will be happy; if not, you will become a philosopher." Socrates
|
|
|
|
|
Hi,
For example, you can fill a Dataset using ADO.NET (Oledbconnection, OledbAdapter and Oledbcommand) and then set in the dropdown the property DataSource the dataset as value.
Example of the dataset filling:
//create the conn
OleDbConnection con = new OleDbConection("conection string");
//create the command
OleDbCommand cmd = new OleDbCommand("SELECT <field> FROM ", con);
//create the DataAdapter & DataSet
OleDbDataAdapter da = new OleDbDataAdapter(cmd);
DataSet ds = new DataSet();
//fill the DataSet
da.Fill(ds);
|
|
|
|
|
thnxs very much
i'l try this.
u people are very helpful
thnxs again
ursbuddy
|
|
|
|
|
Hi all,
I have an application which will be installed on the user machine.
The application has two main parts.
First application checks for the new updates from the server and then invokes the other application using the dll.
The second application is what the user actually interact with.
The application minimizes to the system tray.
The user may close or minimize the form that is displayed.
My main objective here is if the application is running and the user again clicks on the Shortcut that is placed on the desktop.
The form that is minimized or was closed should be displayed.
How do i do this?
Hope i have put the problem properly to everyones understanding.
Thanks & Regards,
Pramod
"Everyone is a genius at least once a year"
|
|
|
|
|
Hi Yadav
Guess the following 2 links will help you.
http://msdn.microsoft.com/msdnmag/issues/05/09/NETMatters/
http://www.codeproject.com/threads/simplesingleinstanceapp.asp
Thanks and Regards
Pani
|
|
|
|
|
Thanks for the links...But I have to display a form from another assembly...
Thanks & Regards,
Pramod
"Everyone is a genius at least once a year"
|
|
|
|
|
Does the shortcut point to the actual application or the "launcher" application? Either way, you could check for the existence of the process first off and switch focus to it if you find it running. Something like
bool IsProcessAlreadyRunning(string processName)
{
Process[] processes = Process.GetProcesses(processName);
return (processes != null && processes.Length != 0);
}
If the above method returns true, you know that an instance of the process is already running. You could then use the MainWindowHandle[^] of the corresponding Process object to get the window handle and P/Invoke some Win32 API (Activate?) to bring the existing process' window into focus.
Hope this helps.
|
|
|
|
|
Hey Friends,
I want to develop a virtual storage drive project in .Net. but confused about how to start?
I have alerady created a web drive solution which working using WebDav protocol, but it uses Iexplorer to display files and folders.
Whereas i want to display the folders and files in Windows explorer (Something exactly like What Gdrive software works)
Can anyone help me to distingush the webdrive and virtual windows drive?
Please post the articles or sourcecode related to this issue..
Thanks in advance
|
|
|
|
|
Look into the software program TrueCrypt. That application is a perfect example of Virtual Drives (encrypted). I do believe it is open source, but I know for sure it is not .NET. I am sure the program still lead you in the right direction, if it is anything like what you are looking for.
Regards,
Thomas Stockwell
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.
Visit my homepage Oracle Studios[ ^]
|
|
|
|
|
Sorry but TrueCrypt software is File Encryption software to securely save your data on local file system.
I want to connect the folder of remote server i.e. http://remoteservername/foldername.. and that folder should be appear as drive (virtual drive) in "My Computer"..
after that i will be able to do all operations on it, as normally we are doing in our locl file system..
Thanks for your reply Thomas
|
|
|
|
|
Hi there,
I want to create a menubar and tool bar using menustrip and toolstrip. Tool bar should come under menubar and it should also be dragged and dropped anywhere onto the form. There are multiple toolbars and they should appear next to the other. What could be the right code to achieve this?
|
|
|
|
|
To place toolstrip under menustrip, follow the z-order mechanism. i.e., add the controls last as it will display it first(top). It takes reverse mechanism.so, add your controls in reverse order.
|
|
|
|
|
Hi all,
How to calculate the difference between two dates Ignoring Weekends ?
I have used TimeSpan to calculate difference between two dates, But I
need to know how I can ignore Weekends by using C#.
Thanks in advance.
|
|
|
|
|
KhaledK wrote: I
need to know how I can ignore Weekends by using C#
You'll need to define what days are weekend days in your code and check if the weekend days land in between your two dates...
If you try to write that in English, I might be able to understand more than a fraction of it. - Guffa
|
|
|
|
|
hi
my table in sql2005 have a nvarchar DataType that save string values, but when i insert values in my code it is show "???????" symbols.
now i want to convert my textBox.text to utf-8 Encoding and save to SqlServer, but how to do this ??(convert to utf-8 Encoding string)
thanks
|
|
|
|
|
You can use the Encoding.UTF8.GetBytes method to convert a string into an UTF-8 encoded byte array, that you can store in a binary field in the database.
I'm not sure that's what you are looking for, though. It sounds like you want to store the string in the nvarchar field that you already have, but an nvarchar field does not use UTF-8 encoding.
---
It's amazing to see how much work some people will go through just to avoid a little bit of work.
|
|
|
|
|
Hi All,
I would like to auto create a textbox(s)and a button which base on the user choose the number in the dropdown list.
Once the page generate the textbox(s) and the user can fill in the vlues for each of the box and then submit to the DB. Any idea? Thanks
gsdg
|
|
|
|
|
I've written up how to add a button to a form, here : http://www.codeproject.com/useritems/DynamicallyAdding_Button.asp
To add a textbox, just follow the instructions but with a textbox instead of button.
something like this;
TextBox myTextbox = new TextBox();
myTextbox.Name = "inputbox_1";
myTextbox.Left = 100;
myTextbox.Top = 100;
this.Controls.Add(myTextbox);
To loop through a the text boxes, do something like this;
foreach (object myTextBox in this.Controls )
{
if (myTextBox.GetType().ToString() == "System.Windows.Forms.TextBox")
{
TextBox thisText = (TextBox)myTextBox;
MessageBox.Show(thisText.Name );
if(thisText.Name.SubString(thisText.Name.Lenght-1)=="inputbox_")
{
}
}
}
This is very basic, friday afternoon, off the top of my head, just before xmas code. So there are better ways of doing this, but this should get you started..... . ...
MarkPM
|
|
|
|
|
Hi all,
I have a working BHO in C# - a browser helper object - which can find things on a webpage based on the element's id attribute value.
Now I wish to retrieve the text or word anywhere on any webpage that the user has clicked on. I have done this the ATL/C++ way but I'm nowhere near finding a solution to this in C#/COM Interop.
Anybody with the experience? Help is REALLY appreciated!!!
/T
|
|
|
|
|
I’m currently working on a website that we are trying to make accessible. Now I added a page to the site which provide some drop down lists to the users. Such as background color (bgcolor), text size, zoom in (? Not sure how yet), font and things like that. The problem is my very limited experience with ASP.Net. I am a starter. I’d appreciate if one of you guru’s can help me out. Now I can’t or perhaps I should say don’t want to use Java script (user requirement). So basically I have to write server side code that will perform those things (change color, size, font ) etc. Now in my HTML code I have added the runat = “server” attribute to the form element. But that only exposes the Style property when I use it in code behind (under Page_Load event). I don’t want to use style because we won’t be using a CSS for this and I think style property only works with CSS. Since I will be hard coding a few values below in my drop down list and set the values of the color to their hexadecimal value such as #00ff00 for green.
<br />
All I want to be able to do when the user clicks the Button, the page and a few more pages will adopt those properties and change color, font etc. The later having the other pages adopt the same values is something I have figured out (I’m planning on using session state for that) Please help me out with this. I even tried exposing a runat = server attribute to the element so that I could programatically change the value of the whole body under the button_click event. But that didn’t work either. Thanks~ Tina
|
|
|
|
|
Tina P wrote: The problem is my very limited experience with ASP.Net. I am a starter.
That is what tutorials are for. Go find one there are many. For sure on MSDN and perhaps on Code Project. Here is a tutorial for using CodeProject forums:
ASP.NET Questions should be posted in the ASP.NET forum.
led mike
|
|
|
|
|
Tina P wrote: don’t want to use Java script
ASP.NET works entirely by sending javascript to the client. You probably can't use ASP.NET in any meaningful way, and meet this requirement.
Tina P wrote: and I think style property only works with CSS
CSS allows you to name styles. You can use the style property to set the style of a single control, without using CSS.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
I am working on a new project which I intend to release as Open Source. I did some looking around and the two strongest seem to be NLog and log4net. Both seem like they would meet my immediate needs, so I figured I would ask here to see what people think:
1) Are there any other logging packages I should consider?
2) Which logging package is most popular?
3) Which logging package is most popular in open source .NET projects?
4) Is there any clear pros and cons to these packages?
Thanks
|
|
|
|
|
NLog and Log4Net are both excellent packages. You may also want to consider XQuiSoft[^] and the minimalist EZLogger[^] (pardon the shameless plug ), both of which are published at CP.
/ravi
|
|
|
|
|
Can someone help me with this: vector length is 20 and starts from 0 to 20 it have to be like this 0,2,4,6,8,10,12,14,16,18,20
|
|
|
|