|
hi ,
string s = "0721234567";
if(s.StartsWith("0")) s= s.Replace("0","+27");
cheers.
|
|
|
|
|
Hi,
Can anybody help me to get Icon details like its name, target path, working directory whenever it is double-clicked to run the application. This is be using Windows API or in C#.
I have already used IShellLink Interface but its been hard-coded for icon name. Suppose the user changes desktop icon name then also coding should be able to change its working directory. This can be done if I can check the existence of the icon.
Regards.
Chilly
|
|
|
|
|
Hello
Sgg245 wrote: get Icon details like its name, target path, working directory
I think you are talking more about shortcuts?? You mean those on the desktop?
If you want to enumerate the links on the desktop:
Directory.GetFiles(Environment.GetFolderPath(Environment.SpecialFolder.Desktop), "*.lnk");
Now, shortcuts are .ln; files and inside them you'd find the path to the program they excute. Read them using as FileStream, then use a Regex to find the text of the exe file, and/or anyother details you want.
Regards
|
|
|
|
|
I am new on c# ... switched from Delphi, and making windows application using C# + SQL Server 2005.
please let me know how to fix a dropdown list on DataGrid control and how to fix a record lock on sql server table row.
thanks for the favour
AH Khan
|
|
|
|
|
If you're using VS2005 (Any edition) you might want to setup the columns of the datagridview by hand. The control allows different kinds of columns to be setup (Checkbox,TextBox,ComboBox,Button,...) [^]
Locking a row in a datatable is not possible I'm afraid.
Instead you can use a Transaction on the database connection to lock rows and update them without allowing other clients to update the same rows. If I'm not mistaken, the DataTableAdapters to this automatically
WM
|
|
|
|
|
I check it out .... 1000 THANKS..
|
|
|
|
|
Hi
I am developing Windows Mobile Application, I need a timer to call the callback method , I have used the code below, it worked fine for Windows Application, but device application causing problem.
timer = new System.Threading.Timer(new TimerCallback(OnNextMinute), null,
Timeout.Infinite, Timeout.Infinite);
StartTimer();
}
const long TIMER_INTERVAL = 1000L;
private void StartTimer()
{
// set the timer to trigger an event every 30 seconds
timer.Change(0, TIMER_INTERVAL);
}
public void OnNextMinute(object state)
{
//calling method here
}
Please let me know any other way to use timer in Windows Mobile.
|
|
|
|
|
Hello
Sri harini wrote: it worked fine for Windows Application, but device application causing problem.
What are your problems exactly?
I even wonder how it worked on windows!! Why the Timeout.Infinite?? If you don't want to start the timer immediately, use -1 instead!! Also, why not setting the interval directly -again Timeout.Infinite!!- instead of assigning it to a constant at runtime??
Regards
|
|
|
|
|
Hi,
Im writting an Outlook 2003 plugin. I have some folders with WebViewOn = true, which makes them avaiable to load a web page with a embebed c# user control. All working so far, except for an anoying detail :
All the controls exibit a strange-windows2000-like look and feel. Even text labels are weird, with bigger font. But if i call the webpage from Internet Explorer, all controls look ok.
Does
Application.EnableVisualStyles();
Application.SetCompatibleTextRenderingDefault(false);
have something to do with it?
Thanks in advance!!!
|
|
|
|
|
Hi All!
I have a programm that when i minimize the form i get a notification icon, i have 2 quastions:
1) how can i make the task from the task bar to disappear.
2) I did an event when clicking the notification icon, how can i restore the form size again to normal? i tried to give it a new size and did invalidate but nothing happened.
|
|
|
|
|
Hello
ytubis wrote: how can i make the task from the task bar to disappear.
this.ShowInTaskBar = false;
ytubis wrote: how can i restore the form size again to normal?
this.WindowState = FormWindowState.Normal
Regards
|
|
|
|
|
i want to know how i can use a header file and *.dll written by C++ in a c# code.
Thank you
Ahmed Ismail
|
|
|
|
|
|
When i attempt to connect to a HTTPS server, i have error.
How to do this?
Help me please!
|
|
|
|
|
Which event hendales the minimize form Event?
Is it MinimizeChanged? if it is,it does not work in my program.
|
|
|
|
|
ytubis wrote: Which event hendales the minimize form Event?
Is it MinimizeChanged? if it is,it does not work in my program.
I couldn't find any such event in the documentation. Can you show us the actual event and the associated documentation?
|
|
|
|
|
The window message sent when a window is minimized is WM_SIZE , so I assume that the equivalent is the Resize event. Check the WindowState property to see if the form is minimized.
The documentation for Form.MinimizeBox confirms that it's the Resize event.
|
|
|
|
|
Hi everyone. I need to obtain the URL of the file that the user clic on a WebControl when it call the FileDownloaded event. How I can obtain this?
Thanks.
|
|
|
|
|
|
hi all
i hv created several controls at runtime but there is an exception thrown that there is multiple controls with the same name
hw to solve this problem
thank u
abdelhameed81
|
|
|
|
|
abdelhameed81 wrote: hi all
i hv created several controls at runtime but there is an exception thrown that there is multiple controls with the same name
hw to solve this problem
thank u
Um. Give each control a different name?
How are you creating the controls? It should be a simple as setting the .Name property for each control.
|
|
|
|
|
by the way i did that
abdelhameed81
|
|
|
|
|
abdelhameed81 wrote: by the way i did that
then you'll need to post a snippet of your code for us to help you further.
Is this an ASP.NET app or a Windows Form application?
|
|
|
|
|
it is an ASP.Net app
and hw can i post a snippet i did not do that before
abdelhameed81
|
|
|
|
|
Hello
abdelhameed81 wrote: it is an ASP.Net app
Then you should have posted it in ASP .Net forum[^]
abdelhameed81 wrote: hw can i post a snippet i did not do that before
A code snippet is a small part of your code that you think it could be the cause of your problem.
To post a snippet:
1- Select the code from your project editor -ie. your Visual Studio IDE-
2- Copy to clipborad -ie. press Ctrl + C-
3- Make a post or a reply here
4- Paste the code -ie. press Ctrl+V-
5- Reselct the code you've just pasted
6- Click on the pre button below the edit control in which you are writing. This will give it unique background and rserve tabs and spaces.
7- If the code is missing some brackets -ie. like < or > - remove the pre tags and click on "Ignore HTML tags..." checkbox below.
Regards
|
|
|
|