Yes the label taking up the entire surface was the issue, solved with Me.OnClick(EventArgs.Empty). Thank you for your reply sir :)
Floodlight
Posts
-
Making label on UserControl work as default click event -
Making label on UserControl work as default click eventThat's what I meant, and that's what I need! Thanks you very much, this does the trick :)
-
Making label on UserControl work as default click eventHello, I have built a custom control where I use a label to effectively work as a button on this control. The problem is, when I place this control on my forms, I want the click event of that label to handle the click event of the user control. The label takes up the whole UserControl form. Hope this makes sense, and any help would be appreciated! Thanks
-
Programming QuestionI still write .bat files. I do alot of command line FTP crap and batch files are just the thing :)
-
How to set focus on dynamically created controls?Thanks heaps for that Erik, it worked!! Top job :)
-
How to set focus on dynamically created controls?Hi All, I have a program where I dynamically create some Textboxes within a Panel on my form using this code
Panel1.Controls.AddRange(New System.Windows.Forms.Control() {TextBoxes(num - 1)})
These textboxes are automatically labeled Layer1, Layer2 etc etc.. Everything works fine. I also have a listbox that contains the names of these dynamically created "Layers". What I want to do is when I click on the name in the listbox I want to "select" (or set the focus) on that particular dynamic control.. but I don't know how to reference it, as it's dynamic lol. Any help would be MUCH appreciated, thanks!
-
Complicated string formatting. HELP!!!No worries mate, I appreciate you taking the time to look at it anyway :) I'll keep plugging away at it and see what trouble I can get myself in to, haha!
-
Complicated string formatting. HELP!!!Hi again Zimvbcoder, I can give you the exact string I will be parsing. You will see that some of the string contains the fields you helped me with in an earlier post... Okay, here's the string (it's one row from a HTML table) it's a little long lol, so you may need to paste into a HTML editor so you can see it clearly :) <tr><td class="aws"><a href="http://www.goauto.com.au/mellor/mellor.nsf/adredirect?readform&admodel=outlander&unid=3f98ba22ac6414b7ca2576e00004bad6&make=general news&model=&time=0&client=1&adtype=useful&page=news&site=va" target="url">/mellor/mellor.nsf/adredirect?readform&admodel=outlander&unid=3f98ba22ac6414b7ca2576e00004bad6&make=general%20news&model=&time=0&client=1&adtype=useful&page=news&site=va</a></td><td>9</td><td>1.59 KB</td><td>9</td><td>9</td><td class="aws"><img src="/icon/other/hp.png" width="261" height="4"><br><img src="/icon/other/hk.png" width="249" height="4"><br><img src="/icon/other/he.png" width="261" height="4"><br><img src="/icon/other/hx.png" width="261" height="4"></td></tr>
-
Complicated string formatting. HELP!!!Thanks again to Zimvbcoder for his awesome code which worked perfectly for me.
Hi again, stuck with another dilemma :( Out of the above HTML I need to extract the values inbetween the > and the <. So in this case, I would need to extract: 9, 1.59 KB, 9, 9 The HTML string could be any length... it will never be a fixed length Again, any assistance will be hugeley appreciated! :)
-
Adding a new row to DataSource [modified]Thanks for the explanation Dave, that helped alot. Gonna try a few of your suggestions now and see how I go :)
-
Adding a new row to DataSource [modified]Thanks for the response but this doesn't appear to be what I'm after... I am no expert (particularly with datatables) but the method you suggested appears to require a DataSet. Like mentioned earlier, my data is created at runtime (called Table1) on form.load so I am unsure how to refer to it programmatically... Forgive me if I am not making sense, or going the wrong way about all this, as previously mentioned I am not disciplined in datatables! :sigh:
-
Adding a new row to DataSource [modified]Hello all, I have been pulling my hair our trying to get this to work. I created a DataSource programatically and applied it to a DataGridView. Now, I want to add rows to that DataSource programatically and have it displayed in the DataGridView, but I can't for the life of me work out how to add to the DataSource.... I know there must be a relatively simple way to do this.. I can't add data to it in the usual way because the DataGridView is bound. Any advice is much appreciated! =) Here's the code for creating the DataSource and adding columns to it on form.load, and showing it in my DataGridView (named "dg"). This part of the code works fine:
Dim Table1 As DataTable
Table1 = New DataTable("Useful Links")
'------------------------------------------------------------
Dim adModel As DataColumn = New DataColumn("adModel")
adModel.DataType = System.Type.GetType("System.String")
Table1.Columns.Add(adModel)Dim unId As DataColumn = New DataColumn("unId") unId.DataType = System.Type.GetType("System.String") Table1.Columns.Add(unId) '------------------------------------------------------------ Dim ds As New DataSet() ds.Tables.Add(Table1) dg.DataSource = Table1 '------------------------------------------------------------
There will be a button (or something) to add rows to that DataSource.
modified on Wednesday, March 17, 2010 9:14 PM
-
Complicated string formatting. HELP!!!zimvbcoder you are an absolute legend! I actually got it to work, thanks so much for your help :)
-
Complicated string formatting. HELP!!!Hi all, I have an issue that has nearly been causing my poor VB.net non-savvy brain to melt. I need to be able to copy a certain url into a textbox, and then be able to extract certain parts of that URL and then place them in a data grid. Thankfully most of the parts I need in the URL are seperated by ampersands (&) which should make detecting them easier..? The Url might look something like below: adredirect?readform&admodel=mazda3&unid=ff501d42303c0601ca2574790021874b&make=generalnews&model=safety&time=0&client=1&adtype=useful&page=news&site=va I need to be able, for example, to extract the following values out of the above URL: admodel=mazda3 make=generalnews model=safety page=news and somehow convert those above values into: mazda3 generalnews safety news THEN I have to place those values into a data grid... lol I have a certain idea how to do it, but I have no idea how to VB it. Any insight or help would be appreciated. And forgive me if my explanation is lacking. Thanks in advance!