Jump to content
Xtreme .Net Talk

modularbeing

Avatar/Signature
  • Posts

    63
  • Joined

  • Last visited

Everything posted by modularbeing

  1. Im really at a loss with this problem. I have a listbox that occasionally will not draw the items on the screen. The items are there because I can click on the area of which the item would be but there is no text. Sometimes when clicking on the item the item will draw properly and I can see the text. I am not Owner drawing the items, this is a listbox I have just dragged onto the forms and populated with items. This has happened in other projects too and I am not sure what could cause this other than a problem with the framework. any ideas? Josh
  2. Does anyone know a way I can increase the size of the scroll bars in a listbox? I couldnt find anything other than increasing the size in windows alltogethor which I dont want to do. If anyone knows how to change the look of them too that would be a bonus! :D thanks Josh
  3. ahh nevermind i fixed it, once i figured out grouping ahah This is what I did to get it to group how i want. ((\d+|\d+\s+)-(.*).([wW][mM][aA])|([mM][pP][3])) thanks again!
  4. thanks! this works nicely but i had one question. When I tested it at regexlib.com and i look at the match I see 12 and wma in there twice and a value for each space before and after the '-'. I tested using: 12- my song's.wma thanks again
  5. Im having troubles getting this expression to work. The bolded part of the expression below needs to match anything which I thought a period was used for but its not working out. (\d+|\d+\s+)-([.*]).([wW][mM][aA])|([mM][pP][3]) btw, im trying to match strings like: 12-mysong.wma 12 - my song.mp3 1 -my-song's.wma thanks, josh
  6. One of our policies is to always use stored procedures so I cant do sql in code. I guess ill just have to keep bugging the DB guy to change it or do it the long way. Thanks
  7. yah, thats what I wanted to do but the database guy doesnt want to because this proc is used elsewhere, etc. I dont understand why he cant just add return an extra column with the string value. Because if I have to do it in code to modify it that just means extra connections to the database, more resources etc.
  8. I need to update the data before i bind it to the datagrid for display because for instance I have a column fkAction which will display as 1 or 2 in the datagrid and means nothing to the people viewing it so I need to replace that 1 or 2 with Buy or Sell
  9. Im not too familiar with datasets other than just doing a fill and binding it to something. But for the project im currently working on I think I need to directly modify the data in the dataset unless anyone has a better process. I am filling a dataset and binding it to a datagrid. The data containts a field that holds a foreign key that relates to another value in the database. I need to replace the integer value and replace it with the actual string value. I could easily use a sqldatareader and modify the value as it loops through the records but Im not sure how I can create a dataset from a sqldatareader. thanks Josh
  10. Im inserting the javascript with the usercontrol. What I need to find out is how to modify the <body> tag in code to add the onLoad event to run the javascript code.
  11. how do you mean outside the function? I think the reason I cant modify the body tag is because im trying to do that within the usercontrol and doesnt a usercontrol render before the parent page?
  12. I created a usercontrol that inserts some javascript on the page which basically is an image rotator. I need to add the onload event to the body tag but I could not figure out how to do that through a usercontrol. I tried asigning the body tag an id and assigning it to a genericHTMLControl in code but that didnt work. any ideas on how to get this working?
  13. BOO! Ive never used pinvoke and your saying it looks like a nightmare, i think ill just let this one go, unless anyone knows of another way or any libraries that can handle this for me? thanks all
  14. the info im looking to access and edit is the additional information about files like title, subject, author, comments, etc.
  15. I was wondering how i might be able to access additional information in a file like you can view when you go to the properties of a file and click on the summary tab? I didnt see anything in the framework for retrieving this. thanks Josh
  16. awsome, that fixed it! thank you! now for my next step, which I havnt looked into yet but do you know how to either redraw the vertical scroll or tell the listbox to scroll up or down?
  17. I have tried that before and it does not work.....actually if I remove the if then statement and run it , the program does not draw the rectangles around the text but its still draws the text .
  18. I am trying to get a little fancy with a list box and use the owner drawn feature to change the look. I have written some code to change the look of the selected item but i cannot figure out how I can reverse it when someone clicks another item. Here is the code I wrote to do this: Private Sub listBox1_DrawItem(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DrawItemEventArgs) Handles ListBox1.DrawItem e.DrawBackground() Dim l As ListBox = CType(sender, ListBox) Dim stringSize As SizeF = e.Graphics.MeasureString(l.SelectedItem, New Font(FontFamily.GenericSansSerif, 14, FontStyle.Bold)) If ((DrawItemState.Selected) > 0) Then Dim selRect As New Rectangle(e.Bounds.X, e.Bounds.Y, l.Width - 1, stringSize.Height / 2) Dim br As New SolidBrush(Color.FromArgb(206, 223, 255)) e.Graphics.FillRectangle(br, selRect) e.Graphics.DrawRectangle(New Pen(Color.FromArgb(30, 108, 253), 1), selRect) e.Graphics.DrawString(l.Items(e.Index), e.Font, Brushes.Black, New RectangleF(e.Bounds.X, e.Bounds.Y, e.Bounds.Width, e.Bounds.Height)) br.Dispose() End If End Sub
  19. i think a "AxWebBrowser1" is the default id the control gets when you add the web browser com control to the project. Getox: I dont know if you are making a browser or what your goal is. But there is a nifty section of the framework that you can use to get the source of a website, for tasks such as parsing it out to get certain information and what not. its called HttpWebRequest. I have used it in the past to do manipulation on SQL reporting services on asp.net because I wanted to do somethings that reporting services just didnt offer hehe
  20. the transparency I was refering to making a color of an image transparent using gdi+ and drawing it to the screen. Ill search for something like that on the forum. the button control I want to make will be an image drawn to the screen by overriding the paint event of the button control(i think this is how to do it I still need to do more reading into it). I just didnt know if there was a way to draw it to the screen and then dispose the image after its drawn so it does not consume memory consistantly. I am still learning about graphics with .net so im not sure if this would even be efficient.
  21. Oh one more thing I forgot to ask: I know that I can use a gif to have transparent areas on an image but the quality of the format can be lacking. I believe I saw something in the framework for setting a transparency color, would it be possible to load a jpeg and use this feature to make an area transparent?
  22. I agree with you as well on the complexity of it but since I want to allow skinning I figured images would be the best way, it would be nice if I could load the image and draw it to the screen then dump it out of memory.
  23. I want to create some custom button controls with a skinnable look to them. I was thinking about taking an image and using it as a button but then I got to thinking that if I have 10 different buttons on the screen using 10 different images that it might consume a good chunk of memory. Does anyone know how badly doing this may affect memory versus just drawing some sort of button using system.drawing ?? thanks
  24. I have a function that loads a user control from an ascx using LoadControl() and passes back the loaded control to the calling procedure. the problem I am running into is that I need to set a property of the user control before I add it to the page and I was trying to do it in my function that creates it but I cannot figure it out.... this is the function I am using to load the control and pass it back Public Function AddGroupControl(ByVal ctrlName As String) As Control Try AddGroupControl = LoadControl("~/UI/Controls/" & ctrlName & ".ascx") AddGroupControl.ID = ctrlName Catch ex As Exception Throw ex Exit Function End Try Return AddGroupControl End Function
  25. this reminded of something i was doing with validartion of control in a user control. what i was doing was iterating through the control collection to change the backcolor property of those control which are invalid. Well I have about 10 usercontrols each with this same sub in it to do this function. I was wondering if it was possible to move the sub to a single location and pass it the control collection. Any clue as to if this might work by moving it to a single location or should I just keep it in each usercontrol?
×
×
  • Create New...