|
put a counter if you are calling your print function last time then use if condition and then
e.Drawstring(.....);
|
|
|
|
|
hi i whant to parse the following code
<br />
<!body><br />
some line<br />
more lines<br />
<!/body><br />
<code><br />
<br />
the following doesnt match<br />
<pre>HtmlSource is the hole content<br />
part is "body"<br />
</pre><br />
<code><br />
string parse = Regex.Match(this.HtmlSource, "<!" + part + ">(.*)<!/" + part + ">").Value;<br />
what does i make wrong ?
greetings gigo
|
|
|
|
|
|
ok the problem is that the query cant run multinline / one option will be to replace all linefeeds but this sucks.
has somebody any idea how can i match over more lines ?
|
|
|
|
|
If you use SingleLine mode, the regex works. Just tested in Expresso
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Is it pssoble to use a VS.net wizard at runtim?
For example I want to use "TableAdapter Configuration Wizard" at runtime to generate Dataset.
|
|
|
|
|
No, it's part of VS.NET, not part of the runtime.
Christian Graus - C++ MVP
'Why don't we jump on a fad that hasn't already been widely discredited ?' - Dilbert
|
|
|
|
|
Hello,
I have a listview on my form, but I do not want it to respond to keyboard input as I want to use the keys for something else.
Currently, when the listview is populated with items and I press a key (say, the 'm' key) the listview will change selections to the first item that starts with an M. I would like it not to do that please.
I am guessing this is where I can use 'protected override' (or something like that) however I am new to C# and I haven't grasped that yet.
All help is most appreciated. Thank you
... Andy
photocafe.ca
|
|
|
|
|
I like to find out programatically the users for the printers in C#
That is if you go to start -- settings -- printers and faxes and select a printer and right click
its properties you should find security there.
I want to access the users inside that security and see if a particular user is there programatically.
I did some research and found out that Win32_Printer class can be used to get all the printers connected to
a computer but not able to figure out how to get to the security of it.
Any help is greatly appreciated.
|
|
|
|
|
Hi, I have an windows Form which I don't want user to resize. In VS2003, I remove the minimized, maximize button, set the Locked property to true and everything is OK. Now, I upgraded to VS2005, this don't work anymore. The window can be resized. Is this a bug of VS2005? How can I do it? I tried to set max size and min size to the same and now the form has fixed size. But when I move the cursor to the edge of the form, cusor changed to hint that I am allowed to resize window. It's annoying. So, I don't think this is a good way to do it. Do you guys have any good idea?
Thanks.
|
|
|
|
|
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!
|
|
|
|