|
Hey howzit?
I would like to beable to move a textbox that is on my form with my cursor to anywhere on the form in run-time?
Is this possible, could you perhaps give me a code snippet? I am very new to C#!
Thanks!
|
|
|
|
|
Yes it is possible and easy too.
Try to play around with "Location" property of your control
e.g
in MouseMove event try to do following
Textbox1.Location = new point(Textbox1.Location.X+/*mouse X cordinate*/,Textbox1.Location.Y+/*mouse Y cordinate*/);
I hope it helps!
|
|
|
|
|
Hello friends
I have a layered window (WS_EX_LAYERED) and I want to put some controls on it without faking and redrawing the entire Bitmap of the form.Please help me if there is a way to implement this.
[ _ Always there is another way _ ]
|
|
|
|
|
Hi all,
I am very new to DirectoryServices. I created an ActiveDirectory user by using DirectoryServices. I can find that added entry later-on aswell. But I still couldnt figure out that how can I delete an added user later.
I tried
DirectoryEntries.remove("username", DirectoryEntry.SchemalClassName);
as mentioned on MSDN, but its keep on givng me an error like:
Invalid DN name assigned. I think I have to get the GUID for user I want to delete but I have no idea how can I get the GUID for any user e.g. "testuser" in Active Directory
Can anybody help me?
btw, if this is not the right place to ask this question where should I ask this question?
Thanks in Advance!!!!
|
|
|
|
|
Hello! i'm rather new to C# and i'd like to ask you if you know how i can send any parameters to the "cmd".For example, if you press start->run and you tipe: cmd /k "ping ip_adress -t -l x_bytes" ... then it starts comand prompt and pinging an adress. The question is how do i send the parameters to the function? I've succeded in opening the cmd process with System.Debug.Process.Start("cmd"); but i don't know how to send parameters.
Awaiting your answer...
Thank u!
|
|
|
|
|
Simply appending the parameters to cmd should work. Or you can use this[^] overload of the Process class to send the arguments.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
Hi. The suggested method will work just fine but it has one drawback. You'll need to start a Process for each command, so you'll lose the context if you want to string different commands together.
I see two alternatives. For both methods, start a Process for cmd and keep it alive. Then:
Alternative 1) Use the Process' input and output streams for sending and receiving data. (simplest would be process.StandardInput.Write and process.StandardOutput.ReadLine).
Alternative 2) Use "dirty" win32 techniques such as SetForegroundWindow followed by a SendKeys.Send.
PS: If you know a better way for 2) please tell me.
It all depends what you are trying to achieve.
Cheers
Michel
|
|
|
|
|
Hi friends,
I am a newbie to C# windows based application.. I am developing a simple project.. in that i am facing a problem of how to insert the RadioButtons inside a ListView control and DataGrid Control. I know its a stupid question.. Any way please any body send the links that related to this problem or samples.
Any help is appreciated.
Thanks in advance
Regards,
Saravana
|
|
|
|
|
Following is the address where you can look at a code snip which is in VB but I hope you will have an idea since there is not really a big difference in syntax between VB and C#
http://groups.google.ca/group/microsoft.public.in.csharp/browse_thread/thread/41e8df1a6198c78b/8522c43b78c7393b?lnk=st&q=How+to+place+radio+button+in+Listview&rnum=1&hl=en#8522c43b78c7393b
|
|
|
|
|
Hi all,
i have already posted a message related to this topic but i did not get
any satisfactory reply,
Please if anyone could tell me how to post some data from a C# windows application to a blog without using the I.E
waiting for a positive reply eagerly
Thanks
Pramod
|
|
|
|
|
You can try using some blogging API like MetaBlog[^].
If that's not possible, you can resort to plain HTTP POSTs using HttpWebRequest[^] and related .NET framework classes, essentially simulating the browser request and response.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
HI,
How to get the values of each cell of the DataGridView, if each cell is of DataGridViewComboBoxCell Type.
Thanks in Advance
Srinivas
-- modified at 23:48 Wednesday 1st February, 2006
|
|
|
|
|
hi
You can use the 'FindControl' option to get the selected values of combo box
lucky
|
|
|
|
|
hi,
Thanks Lucky,
Can you give sample code for that?
Srinivas
|
|
|
|
|
hi,
foreach(DataGridItem item in DataGrid1.Items)
{
DropDownlist ddl = (DropDownList) e.Item.Cells[1].FindControl("ddl1");
string value = ddl.Selectedvalue;
}
Above 'ddl1' is id of the combo that you want to get the value of.
all the best
lucky
-- modified at 6:50 Friday 3rd February, 2006
|
|
|
|
|
My application has a system tray icon. I havent used the NotifyIcon class in .Net, but a different system tray class. I want to display a context menu when the user right clicks on the icon. How can I do this? I havent used the NotifyIcon class because my aplication requires me to show balloon popups too which I haven't been able to achive using the NotifyIcon class. The system tray class that im using has a MouseUp and MouseDown event throught i can get the button that was clicked.
|
|
|
|
|
|
i guess that wouldnt be possible cause the code im using is from planet-source-code.com.
|
|
|
|
|
|
Is there any way, in C# to make an appilcation similar to Rainlender in terms of transparency? If you aren't familiar, you can check it out here
Rainlender[^]
Basically, what I want to do is have the background semi-transparent, but the foreground completely opaque. Is this possible in C#?
|
|
|
|
|
It's possible. But exactly how is buried in the source code for Rainlender, all you have to do is download it. The source code comes with it, but it's in Visual C++ 6.0. You'll have to follow the code and see how it creates its windows and what attributes it's modifying.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Can you give me some tips as what to look for? I haven't done c++ in about 5 years. I'm guessing I can't use any controls and I'd have to render all text in gdi or use images like rainlender.
|
|
|
|
|
Probably something to do with Layered and Transparent windows. Also, modifications to the windows EXSTYLE (Extended Style) attributes, like Alpha and ColorKey.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
How do you spin a process off onto another thread and wait for it to complete? I'm looking for something like when you call ShowDialog and the process stops until the dialog has been closed.
|
|
|
|
|