
HDokes
Avatar/Signature-
Posts
32 -
Joined
-
Last visited
Content Type
Profiles
Forums
Blogs
Events
Articles
Resources
Downloads
Gallery
Everything posted by HDokes
-
Greetings all, I want to incorporate into a program I am putting together the abililty to automatically create a dial-up networking profile within windows. I have searched the internet and MSDN for information as to where dialup information is located within a windows environment and/or how a dialup profile can be created programmatically and have found nothing. Can anyone assist?
-
Well greetings yet again. Ok.... I have this routine which is initiated on a button click to add a record to a table. At the time the record is added I then need to automatically add many more records to a child table within the same form. A field in the child table assumes a value in an autonumber field of the current (new) record of the parent table. The dilema is that the parent table does not actually update until the subroutine (button_click) is exited. Is there a way to 'force' the update of the table within the subroutine so that the rest of the code can then initiate without an error due to a null value sitting in that field?
-
OK... here's a twist to the transparency thingy..... I have inadvertantly found that I have somehow set a 'color' to be interpreted as a transparent color. I say this because anything I now make that color, shows no color in run time but rather the underlying screen color below the form itself. Even when it has objects behind it in the same form.... it 'sees' completely through the form. What gives?
-
How do I add rows programatically to a dataset table?
HDokes replied to HDokes's topic in Database / XML / Reporting
Hi Nerseus, I removed the 'AcceptChanges' line from the routine however it has made no difference. There is a DataAdapter associated with this dataset with a proper 'insert' statement. It should be understood that this table is a 'child' table to a form linked to a parent table. The parent table updates, inserts, and deletes just fine. Still trying to figure this one out. -
How do I add rows programatically to a dataset table?
HDokes replied to HDokes's topic in Database / XML / Reporting
The records do not display within the dataset table in the form. Further, they do not show up after exercising a save do the underlying Access data table.Has me a bit perplexed. I have removed the anyRow reference you mentioned above... and have also mode the AcceptChanges outside the loop. It was my hope that the AcceptChange would 'dispay' the rows as they were being created. -
That's the issue I have been having. Not being able to make the buttons transperent so underlying 'graphics' or images will show through.
-
So what your saying jfackler is that my summations are correct? You mean I may have gotten something right here in this .NET world? Transparency in controls truely doesn't exist in a VB world?
-
How do I add rows programatically to a dataset table?
HDokes replied to HDokes's topic in Database / XML / Reporting
Hi fellas.... Ok.... here's what I have.... however... while I do not get an error now.... no records show up.... am sure the routine is being run as I can set a trap and step through all 99 attemps to create a new record in the table on the form. Dim x As Integer Dim anyRow As DataRow = objdstButtonManagement.Button_Assignment_Table.NewRow Dim NewButtonRecord As DataRow For x = 1 To 99 NewButtonRecord = objdstButtonManagement.Button_Assignment_Table.NewRow NewButtonRecord(0) = x objdstButtonManagement.Button_Assignment_Table.Rows.Add(NewButtonRecord) objdstButtonManagement.Button_Assignment_Table.AcceptChanges() Next End Sub Beats the heck outta me. Correct me if I am wrong Rufus but the code you showed is what commits the table on the form to the physical data table source does it not? -
As some have realized by now.... my experience in the 'object' oriented world of programming is still in it's infancy. But I will learn this stuff if and until it kills me...... I have been using the dataset wizard of the VB.NET forms environment.... and have come to the conclusion there are NO direct references to column properties within the dataset when using these wizards. Does anyone have an idea where one would inject the Dim tablestyle As New DataGridTableStyle() class in the existing wizard generated code for a dataset so that one could take advantage of the properties within a dataset?
-
Continuous errors when tring to search this forum
HDokes replied to HDokes's topic in Suggestions, Bugs, and Comments
Thanks guys.... -
Well now this is silly.... I have done it through the properties window the whole time.... and still can not get the button to go transperent.... it always wants to assume this battleship gray color.... Actually... what I am finding out here is it is defaulting to the back ground color of the form. If I change the form's color.... the button assumes it.... if I move the button over another object that has it's own color.... and keep the transparent button to the front.... it blocks the underlying object with the color of the form background. Next test..... placed the following in a button control click routine who's original background color is light purple. In run time, when I click on the button.... again... tha back ground color is adopted for the button.... not a transparent color... and the button overlaps another control which is now blocked where the overlap occurs.... code: alpha = 0 btnLightPurple.BackColor = Color.FromArgb(alpha, SystemColors.Control) Is there another color setting (default) that I may be overlooking?
-
I have created a form which contains a dataset with two tables. I am attempting to 'add' rows to one table however I receive an erros when doing so. Here is the code for the particular subroutine.... Private Sub btnCreateButtonRecords_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnCreateButtonRecords.Click ' Dim x As Integer Dim NewButtonRecord As DataRow = objdstButtonManagement.Button_Assignment_Table.NewRow ' assign 99 button records to the template For x = 1 To 99 NewButtonRecord(0) = x objdstButtonManagement.Button_Assignment_Table.Rows.Add(NewButtonRecord) Next End Sub The error I receive is: An unhandled exception of type 'System.ArgumentException' occurred in system.data.dll Additional information: This row already belongs to this table. It should be noted that the table already has records (rows) in the table and duplicates are allowed on the key field (column) Any suggestions?
-
Greetings, I do not wish to be a pain and as such will try to find answers to pending questions on the forum if they exist already before asking the questions however, everytime I attempt a search on this bbs I receive the following error.... The search term you specified (row) is under the minimum word length (4) and therefore will not be found. Please make this term longer. If this term contains a wildcard, please make this term more specific. An example of a search that I have attempted is: "add row to dataset"
-
I attempted the changing of both the background and the forground colors to 0 in addition to trying the 'transparent' setting.... in both cases.... I could not see anything behind the button... ergo.... it wasn't transparent. Seems a bit goofy to me for VB to offer 'transparent' as a 'color' item and then not be able to actually see through the object on the form. Any one have any other ideas or is this just not possible?
-
I am wanting to set a series of buttons as transparent so that the back ground image of the form shows through. I have gone to the properties of the button and made the foreground and background colors transparent and removed all images from the button... however... it wants to maintain a 'grey' color and does not allow the underlying colors to 'bleed' through. Is this possible or not?
-
Hi there, Thanks very much for the examples..... I applied the 2nd example and it is working like a charm!
-
I have 99 buttons on a page of which I need to be able to perform a sweeping change of their .text and .tag properties. For convenience I have named the buttons "btnButton1" through "btnButton99". There are other buttons on the form I do not wish to change. I figure the easiest way to do this is through a routine as follows: dim x as int16 dim ButtonName as string for x = 1 to 99 ButtonName = "form.btnbutton" & ltrim(str(x)) ' set the specific button ButtonName.text = "sometext" ButtonName.tag = "sometag" next x Is something like this feasable in VB .NET? I realize that the variable at this time is a string and would have to have it's type changed to a control however I'm not sure if this can be done so that it is the content of the variable which is referenced as the control.
-
How to transfer data from a called form to the main form controls
HDokes replied to HDokes's topic in Windows Forms
My sincerest appreciations..... That took care of it.... and it was something that I should have seen. Sometimes one can't see the characters for the paragraphs! Thanks a bunch! -
How to transfer data from a called form to the main form controls
HDokes replied to HDokes's topic in Windows Forms
Ok... I've doen the above... and the instance gets passed, however, the controls do not show up in the instances i.e. frm properties or listing. I can see the reference to the instance (frm) as the main form but no button controls are any other controls are showing up in the sub procedure in form 2 when making the call... Form1 (main form) entries: Dim frmButtonManagement1 As Form frmButtonManagement1 = New frmButtonManagement(Me) frmButtonManagement1.Show() Form2 entries: Public Class frmButtonManagement Inherits System.Windows.Forms.Form Public formmain As Form #Region " Windows Form Designer generated code " Public Sub New(ByVal mainform As Main) MyBase.New() 'This call is required by the Windows Form Designer. InitializeComponent() formmain = mainform 'Add any initialization after the InitializeComponent() call End Sub Private Sub btnAssignTemplate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAssignTemplate.Click formmain.button1.tag = (grdButton_Assignment_Table.Item(grdButton_Assignment_Table.CurrentCell.RowNumber, 2)) End Sub I get an error that indicates "button1" is not a member of the "System.Windows.Forms.Form" -
How to transfer data from a called form to the main form controls
HDokes replied to HDokes's topic in Windows Forms
Ok... nearly time to go find a clock tower to climb. I am an old school programmer... pretty darn proficient... and efficient if I do say.... Assembler, C, VB6 and older (all the way to BASIC interpretive), PLC Ladder Logic,... you get the jist.... Why is this so dern difficult to absorb regarding .NET? Ok... so I learned that .NET no longer allows you to do ANYTHING you once did in every ealier version of vb.... including the fact that instances are not automatically created upon the execution of a class... and that public variables REALLY aren't public.... so here's what I have tried to do to get around this confusion.... I created a public shared subroutine in the Main form, called "main", (again... this is the primary form initiated upon startup). in the arguments of the share sub I provide the ability to pass a variable by value called from form2 and then assign the variable to a control located on form1 (Main). Once I used the 'shared' directive I was promplty told I could no longer refer to the local control in the form of "me.localcontrol"..... the name of the main form..... is main!... you'd think I could use main.localcontrol... but NOOOOOOOOO (<---- he says in his best John Belushi imitatoin) What's a guy to do? ...... I figure it out.... climb the clock tower and start shootin!!! :) Ok... jest aside, Here is the sub within main being called... and then the call from form2... Public Shared Sub Button1tag(ByVal strPathName As String) Main.Button1.Tag = strPathName End Sub error returned: Expression does not produce a value. call from form 2 Private Sub btnAssignTemplate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAssignTemplate.Click Main.Button1tag(grdButton_Assignment_Table.Item(grdButton_Assignment_Table.CurrentCell.RowNumber, 2)) End Sub Now.... I'm not saying that I'm heading up the clock tower right this minute..... nope... not saying it.... but I am dang sure thinking it!!! (not to worry... the only clock tower within walking distance around here is a 6 foot grandfather clock in my livingroom... hope the kids don't come around) -
How to transfer data from a called form to the main form controls
HDokes replied to HDokes's topic in Windows Forms
Hi Mutant... Went to your link.... and implemented your solution.... I am getting the following error: C:\Sound Effects System\SoundFX\Main.vb(2698): Argument not specified for parameter 'mainform' of 'Public Sub New(mainform As Main)'. This comes as a result of the following code being called which creates the instance of the 2nd form: Dim frmButtonManagement1 As Form frmButtonManagement1 = New frmButtonManagement frmButtonManagement1.Show() I tried entering the argument to the New frmButtonManagement line however that didn't work... again... the above is being called from the first (the primary) main form. I entered your fix into the 2nd form as your link implied... -
Hello, I'd like to speak to Mr. Obvious!? I have a series of button controls on the main form. I am trying to alter their text and tag properties while in another form. My biggist problem... and I shutter to think that it's staring me betwixt the eyes, how do I reference the main form and subsequently its controls while in the other form? The main form is called..... well.... main of course. Thought I could reference it's controls from the 2nd form by using the "Main.button" notation.... however.... no dice. Any takers?
-
Hi Jon, I been at all day... storm came in shortly after you headed out so there wasn't much need to go find something else to do. I finally overcame my road blocks here. The jury is still out as to the effectiveness of this .NET environment. Seems to make things much more difficult then the need to be. In the end, I found that the wizards seen to be highly unstable. That is to say, you can run the wizard twice in a row with the same information and get different results. In this case, even though it supplied the controls to insert, delete, and update the wizard did not always create the runtime code to allow the buttons to work. Hit or miss it seams. Anyway.... was able to figure out how to go through the properties of each DataAdapter and enter in the information for the missing routines... i.e. in seemed to drop 'delete' and 'update' if it was gonna drop anything. The insert command always came through. Now... after updating the record set my grid adds additional line (duplicates of what is there already)... I suspect this is an issue of positioning in some fashion but have not been able to determine what. If I close the form than reopen it, the additions are there and the duplicate lines are gone so it seems to be just a screen thing. I really appreciate your assistance. The combination of that and tenacity has prevailed..... I hate tenacity.... :)
-
Are we having fun yet????? I have performed the same creation of a data form using 2 tables and I'll be darned if I haven't gotten 3 different results in the wizard.... sometimes it will add the delete/update statements to one table and not the other... sometimes no statements.... no rhyme or reason... ... in an UDATE statement like the following... what does the "=?" mean. I am assuming it means "equals anything" however the added 'or' statements with their "IS NULL" would have me wondering why would care that they are... if a change was made in the dataset.... then update the dern thing... UPDATE [button Template Table] SET ButtonIDSet = ?, TemplateID = ?, TemplateName = ? WHERE (TemplateID = ?) AND (ButtonIDSet = ? OR ? IS NULL AND ButtonIDSet IS NULL) AND (TemplateName = ? OR ? IS NULL AND TemplateName IS NULL)