|
On button click Generate the "Win" key event of Keyboard.
|
|
|
|
|
I want to update webconfig file in a system or in winform using c#.
I have a web application and system application but i want the system application updates the databasename, username and password.
I tried this one:
Configuration config = WebConfigurationManager.OpenWebConfiguration("~\\DataMaintenance\\Web.Config");
but its not work
******************************
I just want to
know everything
|
|
|
|
|
In windows application config file named as App.Config.
You can try following procedure to update data in App.config.
Create a Place Holder for your DataBaseName.
read App.config from Application.StartupPath as a text File
Replace the Place Holder and save the file
|
|
|
|
|
no. no. no.
what i mean is is it possible to write web.config from a windows form.
******************************
I just want to
know everything
|
|
|
|
|
again i am confused. I got two impression from your statements
1.You want to make an application which produces WebConfig Files
2.You Want to Update an webConfig from a windows Application
Ans:
1. Yes you can. Just follow the formatting and tags given in webconfig file and write is as normal text File and save it as desired name.
2. Yes you can. Create a web service that does the desired changes i.e. upadting your webconfig and call it from your windows application
|
|
|
|
|
Hai,
I have a DLL that created using Delphi.
My question is :
1. Can I use that DLL in my C# application?
2. If I can use that DLL, how can I determine the function inside the DLL and th parameters needed for the callback?
P.S : no techincal information or documentation available about the DLL.
thankz
Newbie..
Newbie..
Newbie..
Newbie..
Newbie..
|
|
|
|
|
Hi!
Probably you can use functions from the DLL in your C# app using p/invoke, but in order to give the correct function prototypes, you have to know which functions are in there and which parameters they expect.
Some of this information (at least which functions exist) can be retrieved by looking at the DLL using Dependency Walker (part of the platform SDK IIRC).
Regards,
mav
--
Black holes are the places where God divided by 0...
|
|
|
|
|
Hello,
I am using web browser control in C#2.0. I need to insert the Javascript dynamically in the head section of the page and invoke that script dynamically. Can please anyone tell me how to do that?
p.s. Script doesn't return any values as it is a very simple script.
Thanks.
|
|
|
|
|
See this[^] article.
/ravi
|
|
|
|
|
Hi
Recently I needed to hide an application window so I used the ShowWindow of the API and could hide it from taskbar But this application has a tray icon too, How can I hide tray icon?
And also is there a way to make the application to stay at background completely what I mean is that when I use ShowWindow function This application is show for a second an then is hidden so it is visibile for half of a second. Is there any better way to make it invisible completely?
Michael Lopez
|
|
|
|
|
Hi, you can send Windows commands to the tray icons, making them invisible, or even
removing them alltogether. Although its purpose is slightly different, you may find
a lot of details about it in my TrayIconBuster article.
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Hi
Thanks I could hide the tray icon. So I wanted to make it Permanent I mean My applicaiton should always check and hide this application If it has become visible again (Remove both taskbar and trayicon again) So I used code below (most of your code) But Application's main windows only becomes hidden one time and not for other times.
if (filename != null)
{
filename = filename.ToLower();
if (filename.Contains("application.exe"))
{
//To get the Application Main handle (hide from taskbar)
p = Process.GetProcessesByName("Application");
hWnd1 = (int)p[0].MainWindowHandle;
ShowWindow((int)hWnd1, SW_HIDE);
//This one works fine and always hides app's tray icon
SOK = (uint)SendMessage(hWnd, TB_DELETEBUTTON,
new IntPtr(item2), IntPtr.Zero);
if (SOK != 1) throw new ApplicationException("TB_DELETEBUTTON failed");
removedCount++;
}
|
|
|
|
|
Is there any need of Win Form in your application ?
You can Create windows Services.
You can Create Two Applications one will call another.
and you can use windows Handles to Hide your Window
|
|
|
|
|
What I need to make is a stealth interface to another application.
My application should run and always check to be sure that the second application is always hidden (Fron both Taskbar and TrayIcon)
|
|
|
|
|
hi.
can you get me a reference about first C# release date and it's good properties about other language?
tanks.
|
|
|
|
|
www.google.com
Christian Graus - Microsoft MVP - C++
"also I don't think "TranslateOneToTwoBillion OneHundredAndFortySevenMillion FourHundredAndEightyThreeThousand SixHundredAndFortySeven()" is a very good choice for a function name" - SpacixOne ( offering help to someone who really needed it ) ( spaces added for the benefit of people running at < 1280x1024 )
|
|
|
|
|
Hello,
We are initiating a migration project from Novell to Windows platform, and part of this project is a conversion of our legacy COBOL programs Novell based Btrieve to C#.Net on Windows Server 2003. I am doing a preliminary investigation as to can it be done and the cost of an automated tool. We are using TYPE5 - MF/ (Micro Focus) COBOL Btrieve version 6.15.451 from Novell, we have approximately 200,000 lines of code that would need to be converted.
Have you done this before, and do you have a product that we can get to do this.
Cheers,
Steve
Steve
e-mail: steve_busy@hotmail.com
|
|
|
|
|
Hi,
I have no Cobol experience, but you might consider a phased transition, using a decreasing
amount of Cobol.NET[^] and an increasing amount of C#.
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
busyone1 wrote: Have you done this before
Thankfully, no. I have heard from others that have though
"Any sort of work in VB6 is bound to provide several WTF moments." - Christian Graus
|
|
|
|
|
Hi,
How can I form my strings to be in two character format?
My strings is on or two characters, if it's two character so nothing should to be happened, if it's one char, a 0 char must be added to it.
with "If" statement I can implement this, but is it possible to define format for strings?
Best wishes
|
|
|
|
|
Yes, with something like:
String.Format("{0}0", mystring).Substring(0,2)
Paul Marfleet
|
|
|
|
|
You can also use string.PadLeft(totalWidth, char), or string.PadRight(totalWidth, char):
string myString = "9";<br />
string newString = myString.PadLeft(2, '0');
So newString would now equal "09".
Or with just the one string:
myString = myString.PadLeft(2, '0');
My current favourite word is: Waffle
Cheese is still good though.
|
|
|
|
|
And if it happens to be a hex number you want to show, use a width specifier as
in byte.ToString("X2")
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
I have a strnge situation thta I just can't understand, any help or leads would be appreciated
In my data layer I create BindingSource objects:
public abstract class SimpleObjects : System.Data.DataTable
{
protected BindingSource binding = new BindingSource();
protected void Init()
{
sqlAdap.SelectCommand = selectCommand;
sqlAdap.TableMappings.Add(tableMapping);
sqlAdap.FillSchema(this, SchemaType.Mapped);
binding.DataSource = this;
}
public BindingSource Binding
{
get { return binding; }
}
}
I make the BindingSource (binding) object available as a property for all my SimpleObjects for forms to use. Wrks well in most cases but my problem is sometimes the binding goes berzerk when I add DataRows to certain SimpleObjects and it seems to happen when you add rows to child Tables. What happens most of the time is a DataGridView showing a child object will show a row in blue but if I ask the currently binded Object to the BindingSource, it returns me usually the first row. This definitelly happens only if a DataRow was added. Not sure What is happenning and not sure what to do. Any help would be greatly appreciated.
|
|
|
|
|
Is there a way to return the resultset of a stored procedure to a dataset and then programatically "read" the names of each column in the dataset?
So in other words, if a stored procedure returns 3 columns of data(customerID, customerName, and qtyOrdered) and I insert that data into a dataset, how could I set an array to read the names of each column. This way the final array would ultimately look like the following:
array[0] = "customerID";
array[1] = "customerName";
array[2] = "qtyOrdered";
Can this be done?
Thanks.
-Goalie35
|
|
|
|