|
You need to set the frame to be fixed, this is a property on the form, which I don't think has changed.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
|
Thanks. That solves the problem. You guys are great.
|
|
|
|
|
Hi
How to get notify icon for a windows service in the system try? I tried adding a notify icon, but i doesn't seem to be working. My service is running but i dont get the icon in the system tray.
Can anybody help find this?
Thanks in advance.
Muthu.
|
|
|
|
|
this worked for me:
protected override void OnStart(string[] args)
{
notifyIcon1.Visible = true;
}
|
|
|
|
|
1)Is there a way in C# to programatically get the printer list attached to the computer
2)How to check if a user is there in security for the printer attached to the computer in c#
Any resources in that direction will be greatly appreciated
|
|
|
|
|
Hello,
kalyanPaladugu wrote: )Is there a way in C# to programatically get the printer list attached to the computer
This should give you a collection of installed printers. (doesn't mean that they are connected!)
System.Drawing.Printing.PrinterSettings.StringCollection installedprinter = System.Drawing.Printing.PrinterSettings.InstalledPrinters;
kalyanPaladugu wrote: 2)How to check if a user is there in security for the printer attached to the computer in c#
Sorry, don't understand your question.
All the best,
Martin
|
|
|
|
|
1.For the first i think i figured out. Using System.Management API you can actually get the printers online.
2.If you go into the windows and go to start-settings-printers and faxes, select a printer and right click properties. You
will find security and inside it you will find users. Is there a way to get to see those users programatically through c#
|
|
|
|
|
Hello everybody
I have layouts pictures of a TrackBar.
I wanted to know how can I set the pictures to the TrackBar control.
What I mean is I have a picture of the slider (the thing that I move in the trackbar) and I have the pictures for the actual trackbar that changes according to the place that I move the slider bar.
How can I do it?
thanks for your help
|
|
|
|
|
Make the control owner drawn. Or, you may need to write your own control.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
That's the first time I'm doing this kind of thing so I didn't quite understood your answer.
Can you elaborate, please.
thanks for the help
|
|
|
|
|
You can set a control to be OwnerDrawn, which means you handle an event and draw it yourself. You can then draw whatever bitmap you like. I'm not sure how this will work for a trackbar, but I know of no other way to create a trackbar that has a custom look, unless you wrote the class yourself.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
There are a couple of articles on trackbar
You might have a look at this one[^]
Luc Pattyn
|
|
|
|
|
thanks for your answers!
|
|
|
|
|
Hi, I have a very frustrating problem. I have this UserControl I use on a Form. This UserControls is nothing complicated: buttons, textboxes, etc. When I start my application, everything works fine.
When I add another (simple) UserControl to my first UserControl, everything works fine too... well almost everything. The application starts and works 100%, but when I close it and go back to the Designer of my main application, Visual Studio says that:
"An exception occurred while trying to create an instance of MyProject.MyUserControl. The exception was "Object type cannot be converted to target type."."
I seems that the Designer creates an instance of every control on the Form and this particular UserControls cannot be created properly.
I really need some help, this is going to drive me nuts! I've spent more than two days on this problem!
|
|
|
|
|
Hello,
I also had a lot of bad days because of that.
1)
What you can try is, copy the dll or exe (where your second usercontrol is in) to a temp file and then ad the control in he designer over that dll.
I think the problem is some kind of circular dependences between the usercontrols.
In worst case you could try to export the second control in a seperat project(dll) and try it again.
2)
An other posibility is that your second usercontrol throws an exeption.
Therefore you could start a second instance of your design application (VS or something) and connect to the first.
Then you have to change the settings, that you jump in the debugger if an exception occurs.
Hope it helps.
All the best,
Martin
|
|
|
|
|
Maybe this article[^]
contains what you need, or at least provides a hint.
Luc Pattyn
|
|
|
|
|
I'm working on an application where i need to reload nodes based on database info. I need to save the expanded state so that the user doesn't have to navigate back to where he was after the reload. I can't for the life of me get this working.
Anyone know how to do this?
|
|
|
|
|
I think ... it was already asked and answered before (even 2 solutions were offered).
I was proposing something like this:
ArrayList history;
....
history = new ArrayList();
....
TreeNode tn = this.treeView1.SelectedNode;
if (tn != null) this.history.Add(tn);
....
if (this.history.Count < 2) return;
this.treeView1.AfterSelect -= new System.Windows.Forms.TreeViewEventHandler (this.treeView1_AfterSelect);
TreeNode tn = (TreeNode)this.history[this.history.Count - 2];
this.history.RemoveAt(this.history.Count - 1);
this.treeView1.SelectedNode = tn;
while (tn != null)
{
tn.Expand();
tn = tn.Parent;
}
this.treeView1.AfterSelect += new System.Windows.Forms.TreeViewEventHandler(this.treeView1_AfterSelect);
this.treeView1.Focus();
Some other guy has proposed the use of Stack instead of my ArrayList (even better).
SkyWalker
|
|
|
|
|
Hehe! That was me It was to implement history for a "Back" button on a treeview. But you could use it here. Here it is. Or the principle anyway. If you just want to remember the last selected node you wouldn't need a whole Stack or ArrayList though. Just an internal reference to the node.
|
|
|
|
|
Hi,
I am trying to cancel the Serach operation once it gets started, Search is any kind of text search against database, i am using hibernate for database connectivity, Could anyone give me a direction to start.
Thanks in advance
Monika
|
|
|
|
|
You coud use a BackgroundWorker , with WorkerSupportsCancelation set to true
SkyWalker
|
|
|
|
|
Hello friends,
I use some web services in my project. But I want to change some this one web services ip.
For ex.
i use http://192.168.0.1/ex.wsdl some times i want to use
http://192.168.0.5/ex.wsdl.
both of them are same functions.
Is there any idea?
Thanks
Best Regards
|
|
|
|
|
Under what conditions do you want to use the other IP Address?
|
|
|
|
|
there is no condition. wsdls will be fill on combobox when user select any of web service will be run on this url.
i found something that:
if i create a web service object and then there is a url property, and it is possible to set it. now i am trying to use it,
|
|
|
|