|
Dear Sir i have to a problem to my project .
it has i wnat to recover to password code by using in project & How Retrive Data In gridview
|
|
|
|
|
Huh?
|
|
|
|
|
I have an MFC desktop app that implements the "Always On Top" feature by calling:
bool bOnTop = ...
CWnd* pWndOnTop = (CWnd *) (bOnTop ? &CWnd::wndTopMost : &CWnd::wndNoTopMost);
SetWindowPos (pWndOnTop, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE);
This works as expected. Regardless of whether or not the app is always on top of other windows, all child dialogs (both modal and modeless) are shown on top of the app's main window.
A Windows Forms version of the app attempts to do the same thing by P/Invoking SetWindowPos() . Although the app's main window responds as expected, all modal child Form s (both modal and modeless) fail to appear on top of the app's main window, and are instead occluded by the topmost main Form . I tried setting Form.TopMost and Form.TopLevel instead of calling SetWindowPos() but am still unable to display the modal child Form s on top of the main Form .
I've Googled far and wide and have browsed both SO and MSDN to no avail. A nudge in the right direction would be appreciated. I'd hate to have to nix this feature because of a problem with .NET. (I'm sure it's me and not .NET, but I'm at my wit's end.)
Thanks for any pointers you can send my way.
/ravi
modified 13-Apr-12 1:19am.
|
|
|
|
|
An owned form always appears in front of it's owner and if this is the desired behaviour just ensure that the popup forms are shown using the Show/ShowDialog methods with the IWin32Window owner parameter.
Interestingly the difference between ShowDialog() and ShowDialog(IWin32Window owner) do not become apparent until the calling form is made TopMost. At which point the problems you describe suddenly appear!
Alan.
|
|
|
|
|
Alan N wrote: Interestingly the difference between ShowDialog() and ShowDialog(IWin32Window owner) do not become apparent until the calling form is made TopMost. At which point the problems you describe suddenly appear! GAAAH! I'm a moron. Thank you, Alan for pointing that out!
/ravi
|
|
|
|
|
I have an interface with a client that is been in production for many years, and I would like to alter the xml parsing system that handles this message.
Since I may have 4 different StatusTypes I desire to have an array of the these items, however, they are not in a nice collection element that will make deserlization simple, like all of the examples on the internet that I could find.
In the code below, I was hoping to get all of these items in MysticalList. Obviously, my example does not work ... How can I get my entity to work with a simple list?
<xsd:complexType name="requestRailStatus">
<xsd:sequence>
<xsd:element name="TrainID" type="xsd:string" minOccurs="0" maxOccurs="1" />
<xsd:element name="BeginTimePeriod" type="xsd:dateTime" minOccurs="0" maxOccurs="1" />
<xsd:element name="EndTimePeriod" type="xsd:dateTime" minOccurs="0" maxOccurs="1" />
<xsd:element name="StatusType" type="railStatusOptions" minOccurs="0" maxOccurs="4" />
</xsd:sequence>
<xsd:attribute name="timestamp" type="xsd:dateTime" use="required" />
<xsd:attribute name="messageId" type="xsd:unsignedInt" use="required" />
</xsd:complexType>
<xsd:simpleType name="railStatusOptions">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="ActualTimeOfArrival" />
<xsd:enumeration value="ActualTimeOfWorking" />
<xsd:enumeration value="ActualTimeOfCompletion" />
<xsd:enumeration value="ActualTimeOfDeparture" />
</xsd:restriction>
</xsd:simpleType>
public partial class requestRailStatus : EntityBase
{
public string TrainID { get; set; }
public System.DateTime BeginTimePeriod { get; set; }
public System.DateTime EndTimePeriod { get; set; }
[XmlElement("timestamp")]
public System.DateTime TimeStamp { get; set; }
[XmlElement("messageId")]
public uint MessageId { get; set; }
[XmlArray]
public List<railStatusOptions> MysticalList { get; set; }
public requestRailStatus() { }
}
You can only be young once. But you can always be immature.
- Dave Barry
|
|
|
|
|
You called the property StatusType, not MysticalList, in the XSD. Also, I think you mean [XmlAttribute] not [XmlElement].
|
|
|
|
|
If I had only "StatusType" I would agree with you, however I have 4, I want all 4 of them to be placed in the single array...
You can only be young once. But you can always be immature.
- Dave Barry
|
|
|
|
|
Hello CodeProject. I'm having problems using this codeproject: http://www.codeproject.com/Articles/10162/Creating-EAN-13-Barcodes-with-C
Now it draws fine when I don't use this code in my Form1.cs
protected override CreateParams CreateParams
{
get
{
CreateParams cp = base.CreateParams;
cp.ExStyle |= 0x02000000;
return cp;
}
}
BUT I need the above code because it prevents all my controls from flickering easily. For some reason tho while using that code, the EAN13 barcode won't Draw to the pictureBox at all
Is there a way to edit that EAN13 barcode code to make it able to work while using the CreateParams code up above?
I need the barcode code working but I also can't let my huge application to flicker.
Please help CodeProject I would be so thankful
|
|
|
|
|
The usual way to get help on a CodeProject article is via the forum at the bottom of the article. However, if you get no response from the author then it is likely you will have to work it out for yourself.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
Hi all! I've been reading an excelent book on C# called Illustrated C# 2010 and I feel like I this book covers a lot of the topics I need in order to learn how to program. However, it isn't a textbook so there are no exercises for me to practice what I'm reading. While I may retain some of what I'm reading, I find it imperative that I actually sit down and write code in order to learn it. So my problem here is a lack of exercises.
Can anyone suggest a website, or a book that has a suffient amount of exercises that will help me learn the material I am reading? I've checked out sites like projectelure and spoj, but those sites seem like they are geared for people that understand the syntax of programming languages already and just need to learn how to create algorithms. What I'm looking for is a resource that has exercises on how to apply what I've read (for example: Write a program that uses delegates to do this... or Write a program that uses Interfaces to do x...)?
Does this make sense to you guys? I feel like I just wrote a lot of stuff to ask what everyone else will think is a simple question.
|
|
|
|
|
I think the best way to learn is to develop an app. Pick something that intersts you and start writing it.
Then, build in what you've learned, and as you run into problems along the way, or if you want best practices, come back here.
Everything makes sense in someone's mind
|
|
|
|
|
Programming doesn't really lend itself to exercises.
1.1 Write a program to read a serial port carrying ASCII data and print the data in two columns.
Hmmm... How would anyone score the widely varying results in a classroom, let alone a book? When it comes to defining software solutions, there are just too many degrees of freedom. A classroom instructor can assign such problems, then take the time to work through all the individual solutions - one for each student - to find which work and which don't. A textbook author can't do that. Instead, they usually (the better ones, at least) provide lots of real world examples to demonstrate the concepts and how they apply to different challenges.
I'd suggest that you grab a good book with lots of sample code, then as you go through the material, set yourself a challenge to write code that does what the chapter is about. Then compare your solution to the worked out examples given by the author(s). The comparison will teach you a lot. One book I found tonight, which I just ordered for myself, by the way, is from Wrox Press. I've owned a number of Wrox books, and never found one that wasn't excellent. You can view it here[^].
Wrox books generally are very well written, easy to understand, and give you access to loads of downloadable code to study and try out.
Will Rogers never met me.
|
|
|
|
|
Thanks for the suggestion. I just ordered that book.
|
|
|
|
|
Just an update... got my copy Monday, skimmed over it, and it looks excellent. It covers a lot of topics that previous books I've used didn't, some basic things I didn't know, and I learned a few new things in the first 50 pages. But it's got to go back on the pile for a few weeks, at least until I finish this Statistics course... darn.
Will Rogers never met me.
|
|
|
|
|
Yeah I got mine Monday also. I've read about the first 100 or so pages and done all the exercises. Haven't learned anything new so far, but I'm reading it in conjunction with PRO C# and .NET 2010 which is explaining a whole lot of things I never even new existed.
|
|
|
|
|
|
LINQPad is great. I use it all the time for testing small snippets, one-time mini-programs, and just playing around to figure out how to use a .NET feature. The Dump() method is particularly useful for getting a feel for the structure of an object you're not familiar with.
The shout of progress is not "Eureka!" it's "Strange... that's not what i expected". - peterchen
|
|
|
|
|
As you said, Dump() method is really a nice feature to visualize.
|
|
|
|
|
Thats GR8 To Work LinqPad.
|
|
|
|
|
|
MSDN has some simple tutorials[^], and I can also recommend Charles Petzold's .NET Book Zero[^].
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
Just a tip, but I found that many (not all of them) sample code in books where wrong in some way or another. Sometimes it was a type-o, sometimes they use a function that doesn't work or often they have a wrong logic, sometimes you need to have done something else and they forgot to mention. Most problems are small, in a rare occasion it is totally wrong.
I suspect more or less it is done on purpose to let you think and figure out for yourself, but it could be frustrating if you don't expect errors in samples.
V.
|
|
|
|
|
Not sure why this was downvoted, gave it a 4 to compensate.
Textbooks with exercises seem to be out of fashion these days. K&R (the classic C language guide) has them at the end of every chapter, and that was a good idea (even if I didn't actually do most of them!). But it is a good suggestion to read the description of a problem or a language feature, stop before you get to their worked example, and try to solve it/make use of it yourself, then look at what they prepared.
Unfortunately it's so long since I needed non-programmers' introductions that I can't really offer any meaningful advice because my source material is not relevant any more.
|
|
|
|
|
I had a great textbook for learning introductory algorithms like binary searches and stuff like that, and it had exercises at the end of each chapter we read. That helped me learn the material because I was having to create a program based off the exercise that didn't exactly match the samples in the book.
Too bad it's "out of fashion."
|
|
|
|