Jump to content
Xtreme .Net Talk

Eduardo Lorenzo

Avatar/Signature
  • Posts

    87
  • Joined

  • Last visited

Everything posted by Eduardo Lorenzo

  1. Hi guys! Am working on an app that has a feature where user will have a broswer to locate certain files. Feature is asking to have a "Preview Pane" much like that used by Vista and W7 Ultimate. My thinking was go the way of the thumbnail. I want to use Shell32 but the namespace (given by intellisense) is System.Design.UnsafeNativeMethods.Shell32 where UnsafeNativeMethods is tagged (with tooltip) that it is inaccessible due to protection. Is there a way to go around this? I also can't find the Shell32 API/DLL that I can reference directly with solution explorer. Also found a few places on the web where they have demo apps but all are too large (in my opinion) to be added to my application as 'just a feature' Any help and response will be appreciated! Thanks in advance!
  2. bumping this up. still have no idea except avisynth
  3. Hi Guys. Am in the process of creating a small app that stitches videos, but from different file formats. Like, maybe two video clips (one in avi and the other in mpeg) to be stitched into one video in either format. Links, tutorials, samples or any suggestions are most welcome and appreciated no matter how deep or stupid. :D thanks in advance!
  4. I did this: public ReadOnlyCollection<Person> GetPersons { get { return peopleOlderThan.AsReadOnly(); } } and am testing right now. Yes PD, the method you posted does supply intellisense but I heeded you warning and didn't use it. I am creating a "faux" data layer so I won't be sure how it will be consumed by other devs so I really want to be on the safe side of this. Thanks soooo much!
  5. Hi guys. Am playing around with LinQ here, using VS2008Express. And I have this: private void QueryData() { var peopleOlderThan = from p in people where p.Birthday < DateTime.Parse(textBox1.Text) orderby p.Name ascending select p; dataGridView1.DataSource = new BindingSource(peopleOlderThan, null); } don't mind the part with the combobox. This statement basically gets data from here: people = new List<Person>(); people.Add(new Person("Timmy", DateTime.Parse("1/2/1990"))); people.Add(new Person("Gerald", DateTime.Parse("2/9/1979"))); people.Add(new Person("Brian", DateTime.Parse("12/29/1973"))); This works ok, but I was just wondering if there is a way to expose peopleOlderThan outside of the method? Right now, what I do is put it in a function and return it as IEnumerable. private IEnumerable getList() { var peopleOlderThan = from p in people where p.Birthday < DateTime.Parse(textBox1.Text) orderby p.Name ascending select p; return peopleOlderThan; } all inputs are welcome.
  6. have you tried this? int age=29; string name="Phil"; OracleCommand myComm = new OracleCommand(sql, myConn); myComm.Parameters.Add("age", OracleDbType.Int32,ParameterDirection.Input); myComm.Parameters["age"].Value = age; myComm.Parameters.Add("name", OracleDbType.Varchar2, ParameterDirection.Input); myComm.Parameters["name"].Value = name; int rowsAffected = myComm.ExecuteNonQuery();
  7. you might also want to check these links: http://msdn2.microsoft.com/en-us/library/tt0cf3sx(VS.80).aspx http://msdn2.microsoft.com/en-us/library/tt0cf3sx(vs.90).aspx I could not see any differences so your app "should" work. There might be something we have overlooked.
  8. maybe this will explain things.
  9. That's too bad mate. We will have to wait 12 hours before we can talk again. Well anyways other things you might want to consider are: 1. The dll should be registered in the the correct path from the correct path. 2. This can also be an AuthorizationManager issue.
  10. my last post was based on the assumption that the DLL you are calling was properly registered (by running "regsvr32 MapInfo.dll" in the system32-folder) and resides in the correct folder because I saw Interop.MapInfo.dll. You might also want to check the way the DLL is referenced. It might as well be a "file not found" error.
  11. sounds like a 64bit app trying to call a 32bit DLL to me. Is your project's build property set to "Any CPU"? Try setting a build to X86.
  12. Ok, then that narrows it down to your COM. If not a security or privacy risk, could you post or quote the error message you get?
  13. hi Steve, Have you considered a different approach? And if you don't mind, may I reply with a few more questions? 1. What exactly from programX does your program need? I mean, will your program use functions from programX or just the results? If what you need is the data from programX, maybe you can bypass programX entirely and go straight to the datasource. This of course is if programX is not some logging application. 2. Who owns programX? by the way your post is constructed, I am leaning towards the possiblity that programX is from a vendor outside your company? If so, maybe you can coordinate with this vendor?
  14. Found it in ScottGu's blog.
  15. Hi everyone, it is nice to be back. Again, of course with a question. I am having a problem using AJAX popup extender. I create a panel(to hold all controls), a label(the one to click to popup), another panel(to hold the popup content, a literal(with the popup content), an Ajax popupextender, and assign the values, all on the fly like so: Panel displayPanel1 = new Panel(); displayPanel1.BackColor = System.Drawing.Color.White; displayPanel1.ID = "dispPanel" + myCounter.ToString(); displayPanel1.Controls.Add(hc); AjaxControlToolkit.PopupControlExtender myPop = new AjaxControlToolkit.PopupControlExtender(); myPop.TargetControlID = desclabel.ID; myPop.PopupControlID = displayPanel1.ID; myPop.ID = "pop" + myCounter.ToString(); detailsPanel.Controls.Add(myPop); detailsPanel.Controls.Add(displayPanel1); hc is the literal, there is nothing wrong there. displaypanel is the main panel instantiated also by code. what happens here is when the page renders, displayPanel1 is already visible! And when I click on the label, it "pops" up to its correct place. and when I click anywhere else on the page, it dissapears and then starts to function properly (as a popup should). I tried setting the visibility property of detailsPanel1 to false but it does not work. All help will be greatly appreciated. Thanks in advance.
  16. Hi everyone, This has got me stumped. What I am trying to do is search for a "Clicked" HtmlInputRadioButton inside a tabcontrol. I have no idea what the ID is, or which tab the radioButton will be in. So the flow will be to go through all the controls in the each tab, check if it is an HtmlInputRadioButton, check if it is "checked" and return the Value. This is what I have at the moment and it can find the radio button(when I debug it) but doesnt return the value because it continues on to the next controls. public static string FindControlRecursively(Control controlName) { foreach (Control Ctl in controlName.Controls) { if (Ctl is HtmlInputRadioButton) { HtmlInputRadioButton testRB = ((HtmlInputRadioButton)(Ctl)); if (testRB.Checked) { return testRB.Value; } } return FindControlRecursively(Ctl); } } It doesn't seem to want to exit this function until all controls have been read.
  17. You are trying to add a separate page inside the iFrame? <iframe id="FrameID" src="YOUREVENTSPAGE>aspx" frameborder="0" width="100%" height="100%" runat="server"></iframe> should do the trick, just make sure the path is correct and set the Scrolling property to "auto" so you can have scrollbars.
  18. my Bad: in the XML world.. "Text" is different from "text" Thanks! The code posted in post #2 is now... alreadyused.. by me. :D
  19. what I have now is this: protected void readXML() { Panel myPanel = new Panel(); XmlDocument d = new XmlDocument(); d.Load(Server.MapPath("~/App_Data/footer.xml")); foreach (XmlNode header in d.SelectNodes("//headeritem")) { string headText = header.SelectSingleNode("text").InnerText; <---"object not set to an instance of an object" string headURL = header.SelectSingleNode("url").InnerText; foreach (XmlNode table in header.SelectNodes("Table1")) { string itemText = table.SelectSingleNode("Text").InnerText; string itemUrl = table.SelectSingleNode("url").InnerText; } } } but the blasted thing won't go to the next Header node. And says "object not set to an instance of an object" when it gets to the next "headeritem" node. could it be because of this: <ROOT> <header> <text /> <---- I also have a text and url tag in the header. <url /> <table> <text /> <url /> </table> </header> <header> <table /> <table /> <table /> </header> </ROOT>
  20. Have you explored the MDI option? Most issues I have encountered that needs one form to open a second form is when there are just too many controls to display on one form. MDI (Multiple Document Interface) or maybe Tabs are options that can be considered. my 2 cents.
  21. At the moment, I have a side-task of reading an XMLFile that looks like this: there is an unlimited/unpredictable number of headeritem nodes and Table1 nodes. The task is to create one BulletedList (DisplayMode = Hyperlink) object per headeritem with headeritem's <text> and <url> values as the Text and URL as the link. And then go through all the Table1 nodes and populate each BulletedList with the Text and url nodes/values per list. this is what I have presently: protected void xPathLoad() { XmlDocument d = new XmlDocument(); d.Load(Server.MapPath("/My_Page/App_Data/footer.xml")); foreach (XmlNode header in d.SelectNodes("//headerItem")) { BulletedList footerList = new BulletedList(); footerList.DisplayMode = BulletedListDisplayMode.HyperLink; string headerText = header.SelectSingleNode("//text").InnerText + "header "; string headerURL = header.SelectSingleNode("//url").InnerText; footerList.Items.Add(new ListItem(headerText,headerURL)); foreach (XmlNode items in header.SelectNodes("//Table1")) { string itemText = items.SelectSingleNode("//Text").InnerText; string itemURL = items.SelectSingleNode("//url").InnerText; footerList.Items.Add(new ListItem(itemText, itemURL)); } this.Controls.Add(footerList); } but it selects only the first node??? :confused: All help will be greatly appreciated. Thank you.
  22. No need for an engine, I was refering to something to "query" a list or an enumerable object. Scenario is: I create and populate a dataset, and I want to be able to perform some sort of "query", most probably a filter on the dataset without going back to the database. A single-table query maybe because I think inner joins are a bit too much. :D Darn....;) Yes I did mean += for event handlers.
  23. 1. That is good news. I like the thought that Reflection is available but the learning curve is a tad too high in my opinion. So maybe a simpler version? 2. LinQ seems as simple as possible already, am just not so comfortable with the "From this list, where it is equal to this, select this" syntax. I mean, it is so close to a SQL query, why not mimic the SQL syntax right? To reduce the burden of learning yet another construct/syntax. 3. Then XML declaration within the script maybe? 4. Thank you for the Switch statement.. one more.. is the '+=' construct out of the question? I mean, it beats the heck out of declaring/adding an event handler.
  24. 1. Something to work around using Reflections. (i hate that) 2. Include something in the lines of LinQ, but keep the syntax SQL-ish??? 3. Generic Lists <-- I like these... 4. Select.. Case statement. these are all I can think off, off the bat, will come up with others as soon as I can. Good luck!
  25. My appologies for not updating this thread. This was solved by: 1. Creating the Panel 2. Adding a BullettedList item instead of hyperlinks 3. Set the displaymode of the BullettedList object to Hyperlink It now works like a charm and also, rendered on the browser as <li> items which are good for SEO.
×
×
  • Create New...