|
This should have been an easy task, but won't work for me. The following format: dataadapter.update(dataset) works fine when updating data, but errors out when attempting to update a new table. I have inserted records into the dataset through code, they are visible in the dataset, have a row state of added - just won't update the underlying tables! HELP!!
Betty
|
|
|
|
|
Does your dataadapter have an SQL INSERT command associated with it, or just an SQL UPDATE?
DataAdapter.Update()[^] docs on MSDN.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
If an exe A.EXE calls an ActiveX DLL B.DLL, which opens a form which has an OCX called C.OCX:
Is there a way C.OCX can tell teh name of the DLL which launched the form that called it?
|
|
|
|
|
No there isn't. The only way it can tell is if your OCX has function which take a parameter as such. The form would then have to pass a reference to itself to the function, which is never done by default.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Hi,
Is it possible to display data from a comma seperated value file (CSV) into a datagrid in VB.Net?
Any possible ideas with be great.
thanks.....
|
|
|
|
|
Of course it is. You'll have to open the file and parse it up using the Split function, putting each line/field into a DataTable object yourself. This DataTable can then be used as a DataSource in a DataGrid.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Thanks for your help.......
|
|
|
|
|
Hi,
Could someone tell me how I could overlay a file's icon with my own overlay icon?
For example; I would like to set my overlay icon on a selected file and be able to remove the overlay when I want.
Any Help would be greatly appreciated.
thanks,
Zenly
|
|
|
|
|
I really need some help on this one...
I'm trying to make an application that I will be stored on a cd-rom.
This application will help me to execute .exe and .zip files
from the same cd-rom as my application.
But I can't find out how to execute files from the application path.
I remember that I have seen this kind of code somewhere. But that would
take me hours or even days to find that again.
I've tried using Shell and the Environment class but with
no good results.
So what should I do? Any tips?
|
|
|
|
|
Try: System.Windows.Forms.Application.StartupPath
|
|
|
|
|
Hi guys,
I'm programming in VB6.
I'm using a SSTab and a datagrid to show some informations of a table of a sql database. The number of Tabs i can have depend of the number of records i have in the table. (example: 5 records found, so i'll set my SSTab.Tabs propertie to 5 at runtime. "Like SSTab.Tabs=5")
And the information is displayed in the datagrid. But, when i have more then 1 record, i must create the datagrid at runtime too, so that i create a datagrid control array at design time and use this code at runtime to create my datagrid :
Load MSGrid1(TabIndex)
TabIndex is a variable that contains the number of Tab of the SSTab.
My problem is : The MSGrid1 created at runtime still appear in the first tab of the SSTab.
My question is how can i create the grid at runtime and make appear in the tab i want it to appear at runtime using VB6 codes?
Sincerely yours
Marc
|
|
|
|
|
Hello there
I want to make right to left window and it should display cross,Maximize and minimize buttons on the left side instead of right. this can be done in message box.. check this code on any event
Dim msg As MessageBox
msg.Show("Right ", Me.Text, MessageBoxButtons.OK, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1, MessageBoxOptions.RtlReading)
I need this type of right to left alignment on form
any solution ????
Rizwan Bashir
|
|
|
|
|
Rizwan Bashir wrote:
I want to make right to left window and it should display cross,Maximize and minimize buttons on the left side instead of right.
[...]
I need this type of right to left alignment on form
I guess this is what you're looking for:
Creating Mirrored Windows Forms and Controls[^]
Best regards
Dennis
|
|
|
|
|
Thanks Dennis it solved my all the problems including treeview,listview and offcourse the form
Best Regards
Rizwan Bashir
Rizwan Bashir
|
|
|
|
|
|
Hi, the question i got is: how can i use the lame_enc.dll in a program i'm developing in vb.net, 'cause i cannot add it as a reference (because is not a COM component)???
If a have to call the dll using functions, could you please give me a little example about the way that i should do it?? or if there's another way (easier), well even better!!
|
|
|
|
|
victor_ba85 wrote:
Hi, the question i got is: how can i use the lame_enc.dll in a program i'm developing in vb.net, 'cause i cannot add it as a reference (because is not a COM component)???
Take a look at this:
C Sharp MP3 Compressor[^]
Even if you don't know C# it could still be a starting point to figure out how to use the DLL. You could also just integrate the project in your own solution.
Best regards
Dennis
|
|
|
|
|
How to create array of controls like labels or combobox at run time, so that when the user input an integer, it will create the controls dinamically. Can this be done? Thanks in advance.
<italic>Work hard and a bit of luck is the key to success. You don`t need to be genius, to be rich.
|
|
|
|
|
its party time...... do the steps
' Form Level declaration
Friend txt() As System.Windows.Forms.TextBox
'Form Load
redim txt(0)
' on specified event where you need to display do this
' I am displying ths stuff in for loop on a panel control just to keep
' the scroll bar if it exceed the displying limit
put your for loop around this..... where count if the loop counter.
Me.txt(Count) = New System.Windows.Forms.TextBox
Me.txt(Count).Location = New System.Drawing.Point(left, top)
Me.txt(Count).Size = New System.Drawing.Size(200, 20)
Me.txt(Count).Text = count
' the panel control
pnlControls.Controls.AddRange(New System.Windows.Forms.Control() {Me.txt(Count)})
top = top + 21
txt(Count).Visible = True
txt(Count).MaxLength = 10
' if you want to put the events also paste this
AddHandler txt(count).MouseDown, AddressOf FunctionName
AddHandler txt(count).MouseUp, AddressOf FunctionName2
' remember the Function should be defined like this
Private Sub FunctionName(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs)
Msgbox "I am a happy man"
End Sub
Rizwan
|
|
|
|
|
Oops sorry Rizwan, I`m not using VB.NET. Could you tell me in VB6. Thanks
<italic>Work hard and a bit of luck is the key to success. You don`t need to be genius, to be rich.
|
|
|
|
|
goodmast3r wrote:
I'm not using VB.NET. Could you tell me in VB6.
Guess you're on your own with that one. Although it is possible in VB 6 it isn't nearly as elegant as in VB.NET. Anyway, maybe this will help to get started:
Introducing Visual Basic 6 [pdf][^] (page 6)
Best regards
Dennis
|
|
|
|
|
goodmast3r wrote:
How to create array of controls like labels or combobox at run time, so that when the user input an integer, it will create the controls dinamically. Can this be done?
In addition to what Rizwan already wrote you might want to call Control.SuspendLayout()[^] and Control.ResumeLayout()[^] depending on how complex your operations are. I used two loops just to point out the two steps of the initial creation of the objects and a later manipulation.
Dim newLeft As Integer = 0
Dim newTop As Integer = 0
Dim counter As Integer = 0
Dim newButton As Button
Dim myButtons(4) As Button
Me.SuspendLayout()
For counter = 0 To myButtons.Length - 1
newButton = New Button()
newButton.Left = newLeft
newButton.Top = newTop
myButtons(counter) = newButton
newLeft += 32
newTop += 32
Next counter
Me.Controls.AddRange(myButtons)
Me.ResumeLayout()
For counter = 0 To myButtons.Length - 1
myButtons(counter).Text = "Button #" & (counter + 1).ToString("d")
Next counter
Best regards
Dennis
|
|
|
|
|
How to build array of controls like label or textbox at run time? When the user give an integer of 5 it will create array of labels, consist of 5 labels. Can this be done? Please help. Thanks in advance
<italic>Work hard and a bit of luck is the key to success. You don`t need to be genius, to be rich.
|
|
|
|
|
I will assume you are working in VB as control arrays are not yet available in VB.Net.
To load a control without an existing control on the form do the following.
Set ctlTxtName = Me.Controls.Add("VB.TextBox", "txtName", Me) To load a control to a control array, will need to already have an existing control array on the form. eg. Text1(0)
Dim x as integer
For x = 1 to 5
Load Text1(x)
Next x
Michael
I firmly believe that any man's finest hour, the greatest fulfillment of all that he holds dear, is that moment when he has worked his heart out in a good cause and lies exhausted on the field of battle - victorious.
Vince Lombardi (1913-1970)
|
|
|
|
|
Im trying to implement a splash screen in VB.NET but am having problems acheiving the result I'm after.
Basically what I want is to start with a splash screen with a logo and at the bottom of that splash screen show the progress of the program loading. Eg Connecting to Database, Loading XYZ etc at the bottom of the splash screen.
My problem is I can get the splash screen to show OK but all the things being done (such as connecting to DB loading form etc) all seem to be done before the actual logo is painted on the screen. Therefore you just see a white box where the splash screen is and dont get to see the progress of the code. I originally was firing all the code on the load event of the splash screen but then i changed it to the paint event but i still cant get it to work.
Any help would be muchly appreciated.
Thanks,
Daniel.
|
|
|
|