|
Would you know how I may add controls that aligns itself to the right of the menu bar (MenuStrip) in whidbey.
Office 2003 has a similar feature. On the menu bar of Word 2003 there is a "type a question for help" combobox which is aligned to the right. I need to mimic this behavior.
Kindly help. Thanks
Sathish
~/sathishvj
|
|
|
|
|
|
When the form is resized, the right aligned ToolStripItems are layed over the menu items. Is there any way to change that behavior?
Say like, truncating them or automatically making it go into a drop down button list. Or programmaticaly can we identify the sizes and locations to make them invisible?
Regds
Sathish
~/sathishvj
|
|
|
|
|
Ok, i got a program, and when you start it you get the option to either, enable / disable the password, but thats all. Theres no actual file to protect, now i could put the file into the program BEFORE compiling it, but then how would you get a new file in there?
So is there a way i can run the program, then add a file to it.
The main idea is to protect a file with a password so that when you click on the file it asks for a password, you enter the password and then the file is back to normal.
Any ideas
|
|
|
|
|
First, it's already been done - it's called a WinZip Self Extracting Executable.
In order to use the files, you actually have to unpack them first. Once that is done, you don't need any password to use them, so what's the point?
The method that you describe only protects the files during transport from machine to machine. It can't do anything about the files once they're unpacked. Also, unless the files are encrypted in the self-extractor package, it's not that hard to pull the files out of the package without the password.
Also, the files are not compiled into the .EXE as you put it. Rather, the file package (or .ZIP in our example), encrypted or not, is appended to the end of the .EXE file. The .EXE has to know how far into the file to start looking for the .file package, then it's a simple process of processing the files from there.
The file format could look something like this:
[SelfExtractor code][FilePackagePre-Amble][FilePackage][possiblePost-Amble and ErrorCheckID]
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
I am currently making a user control that contains a collection of my custom control witch overides OnPaint method. I use:
My custom control constructor inits those style:
SetStyle(System.Windows.Forms.ControlStyles.DoubleBuffer, true);
SetStyle(System.Windows.Forms.ControlStyles.AllPaintingInWmPaint, true);
SetStyle(System.Windows.Forms.ControlStyles.ResizeRedraw, true);
SetStyle(System.Windows.Forms.ControlStyles.UserPaint, true);
UpdateStyles();
Now, my user control constructor add a collection of my custom control
to its Controls Collection and also sets ControlStyles like my custom control does.
My user control overrides OnLayout to place the collection of custom control as a special way. I SuspendLayout at the Begining of OnLayout and ResumeLayout at the end. So my problem is that my user control OnPaint event is not called so DoubleBuffering is not working on user control.
Is it because I use double buffering in my custom control or is just
a desing problem? If someone could help me with that, I will apreciate a lot. And I am sorry for my english, if its'no clear just please tell me.
Sebastien
|
|
|
|
|
hey everyone,
I have been trying to link a schema to an xml file programatically inside my application, so that references inside the xml will expand when added to a treeview but i cannot get it to work. I know how to link a schema inside the xml file itself, noNameSpaceSchemaLocation and schemaLocation. However try as i might (and i am trying )i cannot get them to link programatically, or even know if it can be done. I am not looking for help on validation, as i know how this works using XmlValidatingReader etc.
if you can help please do...........
|
|
|
|
|
This message goes out to all the regular expression gurus out there:
I have a very simple regular expression declaration:
regex.Regex ex = new System.Text.RegularExpressions.Regex("\\(");
I want to know how to test against this regular expression so that if the tested string does not match EXACTLY then its going to give me false. For example:-
string test = "a(";
regex.Regex ex = new System.Text.RegularExpressions.Regex("\\(");
System.Console.WriteLine(ex.IsMatch(test, 0));
should return false (which it does not). How do I do this?
Secondly, I want to recursively define a definition but I do non know exactly how. I have an expression and it COULD be enclosed in brackets. So lets say I have the following:
E -> (E)
I could alse have:
E -> C-E
C -> constant
How do I write a definition like this? I'm very much not keen on writing a parser, I assure you!
Thanks a lot!
Jim
|
|
|
|
|
I'm not familiar with the .net regex syntax, just the Perl syntax, but in Perl you can write ^\($ where ^ means "beginning of the string" and $ means "end of the string". Hopefully there are equivalents in .net that you can use.
--Mike--
LINKS~! Ericahist updated! | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ
Strange things are afoot at the U+004B U+20DD
|
|
|
|
|
Thanks, does anyone know how to step around the recursion problem?
Cheers,
Jim
|
|
|
|
|
AFAIK, there is no way you can implement reductions like the ones you posted using regular expressions. That's the job of parsers.
Regards
Senthil
My Blog
|
|
|
|
|
They said that these regular expressions were built on NFAs... Such a regular expression would be possible with an NFA, no?
Is there a built in parser anywhere?
Jim
|
|
|
|
|
Hello all,
I have an application that attempts to send emails via an exchange server on another machine. The code I am using is as follows :
MailMessage aMessage = new MailMessage();
aMessage.From = "johndoe@server.com";
aMessage.To = "janedoe@server.com";
aMessage.Subject = "Test Subject";
aMessage.Body = "Test Body";
System.Threading.Thread.Sleep(3000);
MailAttachment mat = new MailAttachment("c:\path\to\attachment\att.jpg")
aMessage.Attachments.Add(mat);
SmtpMail.SmtpServer.Insert(0, "SERVER IP ADDRESS");
SmtpMail.Send(aMessage);
60% of the time this code works, but on occasions I get the following exception thrown by the .Send
System.Runtime.InteropServices.COMException (0x80040220): The "SendUsing" configuration value is invalid.
After hunting around google for a while I am none the wiser as to a solution to this problem. Although I have made some code tweaks to match certain suggestions
Does anybody have any suggestions
post.mode = postmodes.signature;
SELECT everything FROM everywhere WHERE something = something_else;
> 1 Row Returned
> 42
|
|
|
|
|
There is an MS knowledgebase article regarding this exception here.[^]
Does that help at all?
The most exciting phrase to hear in science, the one that heralds the most discoveries, is not 'Eureka!' ('I found it!') but 'That's funny...’
|
|
|
|
|
Hi,
I am passing an object of a class declared in my C# code to an unmanaged VC++ dll.
If my class contains an int/double/char and may be some functions then I can get their values in the dll. Also I can modify the values there and the modified values I can get in my C# code. So it works fine.
But if I include a string in my class then I can get the values of other variables except the string. And if I modify ANY value in the dll then it does not get reflected in my C# code.
I am unable to proceed. plz help me...
GRS
|
|
|
|
|
Hi guys, I have a question... I have managed to program a simple game, but I need help in creating a starting menu. For example, the options would be, "start", "high score" "help" "exit".
I hope anyone with game programming can help me out soon. Thanks in advance!!!
James Kleinenberg
|
|
|
|
|
some more details would be nice.
How have you made the game, using GDI+, directX openGL?
If you've used GDI+ just use windwos forms buttons for your options.
Otherwise give a bit more info.
Cheers
Kev
|
|
|
|
|
Hi,
is it possible (and how? ) to write an application, where I can get some informations like "artist" or "title" from a streamed file, which was played by a WindowsMediaPlayer ActiveX, which is embedded in the loaded webpage?
Thanks in advance, Randy
|
|
|
|
|
Hello,
How can I sort a DataGridColumn which has Alphanumeric values such that
"Record No: x". Is there any property which I can use for this purpose.
Scenario:
I have 4 values in column R1, R9, R20,R10 and when I try to sort this
column in the DataGrid (by clicking the header) it displays R1, R10,
R20, R9. While I want to display R1, R9, R10, R20.
Is is possible. Thanks in advance
Maqsood Ahmed
Kolachi Advanced Technologies
http://www.kolachi.net
|
|
|
|
|
Would it be possible to pad the numeric portions with zeros? That should yield a more "accurate" sort.
The most exciting phrase to hear in science, the one that heralds the most discoveries, is not 'Eureka!' ('I found it!') but 'That's funny...’
|
|
|
|
|
turbochimp wrote:
Would it be possible to pad the numeric portions with zeros?
Hello,
No! the given scenario was just to make the problem clearer. I have sort more complex values in the realtime application, something like "Buy Price 1.2034", "Sell Price 2.382", "Market Price" etc. It means that some values can be alphanumeric but others will be just strings.
Can anyone suggest a generic solution to this problem.
Bye
Maqsood Ahmed [MCP,C#]
Kolachi Advanced Technologies
http://www.kolachi.net
|
|
|
|
|
It sounds like you need normalization, not a different sort routine. In the example you offer, there should be 3 columns - BuyPrice (decimal), SellPrice (decimal) and MarketPrice (decimal).
If you're using a single column to hold three different pieces of data, you should think about changing the way the data is stored and/or displayed.
The most exciting phrase to hear in science, the one that heralds the most discoveries, is not 'Eureka!' ('I found it!') but 'That's funny...’
|
|
|
|
|
Hello,
It is not the case of storing data in right way or something, it is just for the user friendliness, the way user wants to see it.
By the way, there should be only two columns, Price and Type . Any luck with the actual problem :s
Cheers.
Maqsood Ahmed [MCP,C#]
Kolachi Advanced Technologies
http://www.kolachi.net
|
|
|
|
|
You can always display normalized data in a non-normalized way using SQL functions, string concatenation or by simple control placement. How you display data to the user should not dictate your data model. They seldom coincide.
In the example you provided, you would need three columns to hold price information unless you decided to either duplicate all row data for each price type, or move prices to a separate table. One price column in the same table would not cut it.
As far as "the actual problem", there isn't one. You're trying to use standard sort routines to sort data in a non-standard way; what's more, your data appears to be stored in a fashion that is not conducive to ever having meaningful reporting or display filtering options.
If you are completely devoted to storing your data in the manner you suggest, then I would advise investing some time learning how to implement the IComparable interface, and create your own collection class that's sortable. Please note that this option is less than optimal, to put it mildly.
The most exciting phrase to hear in science, the one that heralds the most discoveries, is not 'Eureka!' ('I found it!') but 'That's funny...’
|
|
|
|
|
Hi all, i'm using System.IO.File to copy a shortcut to my application into the startup directory but on Windows 2000 machines the "Target" part of the shortcut is being renamed to my1~.exe instead of myshortcut.exe. This causes the applications process name to be changed to my1~.exe instead of myshortcut.exe which causes me problems in other applications. Anyone able to tell me how to either, change the target name back to what it should be after the file has been copied or prevent the name from being changed in the first place.
Cheers
Kev
|
|
|
|