|
Unfortunately I don't have to luxury of using Named Pipe - the messages are coming out of another app I have no control over and I have to use a web service. But I agree with you in principle... ;]
I'll look into ListView. Not sure it'll meet all my criteria yet, but thanks for the suggestion!
--
Umm... what's a .sig? ;]
|
|
|
|
|
Is there something called as a titlebar for a user control?
If yes then could I get a link explaning the same?
Thanks in advance.
Keshav Kamat
India
|
|
|
|
|
Why you need titlt bar in a user control
which type of uercontrol are you looking for?
you can create psuedo title bars using picture box or panel
My small attempt...
|
|
|
|
|
hi
when i set aligne of tabpage control prpperty
this dont show tabs text
so if my windows them be in clasic it work
but in xp thems it has this problem
sepel
|
|
|
|
|
No one is understanding what you want to say
Thanks and Regards
Sandeep
If you want something you never had,
do something you have never done!
|
|
|
|
|
i have a tabpage control with 3 tab
that it appear on my form normaly
so i want to appear it in vertialy so i set tabpage.Alignment=Left
but in win xp the tabs'Text dont appear .(the caption of each tab)
if i change my windows theme to classic this will be correct
-- modified at 7:50 Friday 4th May, 2007
-- modified at 19:16 Saturday 5th May, 2007
sepel
|
|
|
|
|
|
|
hi Gopal. and thanks for your help
sepel
|
|
|
|
|
Currently working on a desktop application using c# 2.0 and facing two problems
1- i want to prevent user from opening multiple instances of my application
2- i want associated file types (when double clicked) to be open in my application and if the instance of my application is already running then i do not want to open a new instance instead the file opens in the currently opened instance
|
|
|
|
|
1. Search the articles for "single instance"
2. Search the articles for "file association"
"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." - Rick Cook www.troschuetz.de
|
|
|
|
|
i had searched for the articles and my first problem was solved
second problem still exists
actually i associated the file types with my application and they are the respective files are opening in my application (in a new instance) when double clicked the problem comes when i try to open the file in already opened instance of my application (something to play with command line arguments)
|
|
|
|
|
IIRC one of the articles covering single instance applications also covered the topic of passing command line arguments (e.g. a file name) received by a second instance to the first and (single) instance. Unfortunately I didn't bookmarked the article, but I think it should be possible to find it. Go through the search results or maybe try combining the search words.
"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." - Rick Cook www.troschuetz.de
|
|
|
|
|
Hope this helps
<br />
class App : WindowsFormsApplicationBase<br />
{<br />
<br />
string[] fargs;<br />
public App(string[] args)<br />
{<br />
fargs = args;<br />
this.IsSingleInstance = true;<br />
this.EnableVisualStyles = true; <br />
this.ShutdownStyle = Microsoft.VisualBasic.ApplicationServices.ShutdownMode.AfterMainFormCloses; <br />
this.StartupNextInstance += new StartupNextInstanceEventHandler(this.SIApp_StartupNextInstance);<br />
}<br />
}<br />
Arti Gujare
|
|
|
|
|
i m very thankful to u..
this solves my problem
thankx
|
|
|
|
|
static void Main()
{
bool createdNew;
Mutex m = new Mutex(true, "YourAppName", out createdNew);
if (! createdNew)
{
// app is already running...
//MessageBox.Show("Only one instance of this application is allowed at a time.");
return;
}
Application.Run(new Form1());
GC.KeepAlive(m);
}
here u have just copy paste it and it will work for u .. plz do reply to this
ghumdai firdai
|
|
|
|
|
thankx a lot for replying
this solution does work fine .. but the second problem still exists for me
i-e
i want to open a file (whose type is associated with my application) and if i double clicked the file the file should be opened in the already opened instance of my application instead of opening it in the new instance.
waiting for a solution
|
|
|
|
|
sorry i have no such solution
|
|
|
|
|
1) You can use a static variable in yoor program befor Application.Run(MainForm) like bool _isRunning = false as initial value and upate it in Form.Closed event to false. This idea is simple but not efficient, good and professional and secure.
2) You can store a registry key and check it before Application.Run(MainForm) to see if your application is already running or not. Better but not secure.
3) use Process.GetCurrentProcesses() method and do a search in the result set to check if your process exists. Much more reliable than all but you shoul have a unique process name.
hope this helps...
|
|
|
|
|
hi,
iam krishna working on .net techonologies. In my current project i have a problem in admin module ie., My admin modules consists of 26 links (anchor tag),which will redirect to specified page. each link assigned a unique id. what my problem is when iam logging on to admin panel , depending upon the role of the user who is logging onto admin panel i have to hide the links for the users depending permissions given to them. For this what i have done is i have stored the user roles,formnames , formids,permission(as enabled/disabled)into the database.for Providing the permission for the users the administartor has a user interface,while iam retrieving the enabled formids of a user iam getting the formids into a variable, but what i have to do is, i have to match the ids with the hyperlink ids and make the hyperlinks visible or invisible.
could any one give me the suggestions or solution to this problem.
thanx in advance.
with regards,
krishna
|
|
|
|
|
Its easy but you are making your application very complicated
i don't know why are checking Id if form to control id ?
Store credentails in the database specifying which link should not display for perticular user role and make all those link disable in page load
Thanks and Regards
Sandeep
If you want something you never had,
do something you have never done!
|
|
|
|
|
I would certainly suggest that use LinkButton and set its visible property to true or false as depending on role
|
|
|
|
|
hi everybody,
i want to disable CTRL+ALT+DEL,ALT+F4 and ALT+TAb keys through
c# program how can i achieve it.please send some clue if possible please
send some sample code.
|
|
|
|
|
You cannot disable Ctrl-Alt-Delete.
|
|
|
|
|
As Jon said, Windows will not allow you to disable CTRL-ALT-DEL. This is because this particular shortcut is used to signal to the Windows OS that you want to perform some critical action - log off, terminate a program, etc. In fact, in some Windows setups, you are required to press CTRL-ALT-DEL before you login to the system. This is so that you know that you're typing your username and password into a real Windows OS login dialog - not some spoofer.
That said, it sounds like you might be trying to write a screensaver program. Don't worry about those key combinations. Just write your program as a normal .EXE file, then when it is compiled change the file extension to .SCR. Then right-click on the file from Explorer and hit Install. You'll now be able to use this as a screensaver, and Windows should take care of those pesky key combinations for you automatically.
|
|
|
|